summaryrefslogtreecommitdiff
path: root/package/network/services/hostapd/files/hostapd.sh
Commit message (Collapse)AuthorAgeFilesLines
* hostapd: remove unused local var declarationLeon M. George2017-12-131-2/+0
| | | | | Signed-off-by: Leon M. George <leon@georgemail.eu> (cherry picked from commit 63462910ddb01d9a7391d793228767628aa65db2)
* hostapd: don't set htmode for wpa_supplicantLeon M. George2017-12-131-2/+0
| | | | | | | no longer supported Signed-off-by: Leon M. George <leon@georgemail.eu> (cherry picked from commit cc0847eda337f948f5ff6e75014aa88e48779677)
* hostapd: explicitly set beacon interval for wpa_supplicantSven Eckelmann2017-12-131-0/+1
| | | | | | | | | | | | | | | | The beacon_int is currently set explicitly for hostapd and when LEDE uses iw to join and IBSS/mesh. But it was not done when wpa_supplicant was used to join an encrypted IBSS or mesh. This configuration is required when an AP interface is configured together with an mesh interface. The beacon_int= line must therefore be re-added to the wpa_supplicant config. The value is retrieved from the the global variable. Fixes: 1a16cb9c67f0 ("mac80211, hostapd: always explicitly set beacon interval") Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Felix Fietkau <nbd@nbd.name> [rebase] (cherry picked from commit 772afef61dc68e2470f4da130fac862ccf2fb105)
* hostapd: configure NAS ID regardless of encryptionYury Shvedov2017-12-131-3/+3
| | | | | | | | | | | | RADIUS protocol could be used not only for authentication but for accounting too. Accounting could be configured for any type of networks. However there is no way to configure NAS Identifier for non-WPA networks without this patch. Signed-off-by: Yury Shvedov <yshvedov@wimarksystems.com> [cleanup commit message] Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit 37c1513b1f98c93bf84bbcedd9782568e7d4abba)
* hostapd: add acct_interval optionYury Shvedov2017-12-131-2/+5
| | | | | | | | | Make an ability to configure Accounting-Interim-Interval via UCI Signed-off-by: Yury Shvedov <yshvedov@wimarksystems.com> [add hostapd prefix, cleanup commit message] Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit 0e7bbcd43b6f4b54ecc5c40130b5f86cbc9f1c07)
* hostapd: Expose the tdls_prohibit option to UCITimo Sigurdsson2017-12-071-1/+6
| | | | | | | | | | | | | | | | | wpa_disable_eapol_key_retries can't prevent attacks against the Tunneled Direct-Link Setup (TDLS) handshake. Jouni Malinen suggested that the existing hostapd option tdls_prohibit can be used to further complicate this possibility at the AP side. tdls_prohibit=1 makes hostapd advertise that use of TDLS is not allowed in the BSS. Note: If an attacker manages to lure both TDLS peers into a fake AP, hiding the tdls_prohibit advertisement from them, it might be possible to bypass this protection. Make this option configurable via UCI, but disabled by default. Signed-off-by: Timo Sigurdsson <public_timo.s@silentcreek.de> (cherry picked from commit 6515887ed9b3f312635409702113dca7c14043e5)
* hostapd: add wpa_disable_eapol_key_retries optionStijn Tintel2017-10-171-0/+5
| | | | | | | | | | | | | | | Commit b6c3931ad6554357a108127797c8d7097a93f18f introduced an AP-side workaround for key reinstallation attacks. This option can be used to mitigate KRACK on the station side, in case those stations cannot be updated. Since many devices are out there will not receive an update anytime soon (if at all), it makes sense to include this workaround. Unfortunately this can cause interoperability issues and reduced robustness of key negotiation, so disable the workaround by default, and add an option to allow the user to enable it if he deems necessary. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit c5f97c9372da3229350184fb263c97d9ea8944c5)
* treewide: fix shellscript syntax errors/typosLorenzo Santina2017-09-131-1/+1
| | | | | | | | | Fix multiple syntax errors in shelscripts (of packages only) These errors were causing many conditions to not working properly Signed-off-by: Lorenzo Santina <lorenzo.santina@edu.unito.it> [increase PKG_RELEASE, drop command substitution from directip.sh] Signed-off-by: Mathias Kresin <dev@kresin.em>
* hostapd: fix iapp_interface optionLorenzo Santina2017-09-101-1/+1
| | | | | | | ifname variable were not assigned due to syntax error causing the hostapd config file to have an empty iapp_interface= option Signed-off-by: Lorenzo Santina <lorenzo.santina.dev@gmail.com>
* mac80211, hostapd: always explicitly set beacon intervalMatthias Schiffer2017-05-271-3/+2
| | | | | | | | | | | | | | | | One of the latest mac80211 updates added sanity checks, requiring the beacon intervals of all VIFs of the same radio to match. This often broke AP+11s setups, as these modes use different default intervals, at least in some configurations (observed on ath9k). Instead of relying on driver or hostapd defaults, change the scripts to always explicitly set the beacon interval, defaulting to 100. This also applies the beacon interval to 11s interfaces, which had been forgotten before. VIF-specific beacon_int setting is removed from hostapd.sh. Fixes FS#619. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* hostapd: add legacy_rates option to disable 802.11b data rates.Nick Lowe2017-05-271-8/+20
| | | | | | | | | | | | | | | | | | Setting legacy_rates to 0 disables 802.11b data rates. Setting legacy_rates to 1 enables 802.11b data rates. (Default) The basic_rate option and supported_rates option are filtered based on this. The rationale for the change, stronger now than in 2014, can be found in: https://mentor.ieee.org/802.11/dcn/14/11-14-0099-00-000m-renewing-2-4ghz-band.pptx The balance of equities between compatibility with b clients and the detriment to the 2.4 GHz ecosystem as a whole strongly favors disabling b rates by default. Signed-off-by: Nick Lowe <nick.lowe@gmail.com> Signed-off-by: Felix Fietkau <nbd@nbd.name> [cleanup, defaults change]
* hostapd: mv netifd.sh hostapd.shDaniel Albers2017-03-011-0/+763
| | | | | | same name for the file on the host and target Signed-off-by: Daniel Albers <daniel.albers@public-files.de>
* hostapd: remove unused hostapd-common-old packageFelix Fietkau2016-08-051-399/+0
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* branding: add LEDE brandingJohn Crispin2016-03-241-2/+2
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* hostapd: Use network_get_device instead of uci_get_stateFelix Fietkau2015-11-111-2/+7
| | | | | | | | This fixes the IAPP functionality. Signed-off-by: Petko Bordjukov <bordjukov@gmail.com> SVN-Revision: 47455
* hostapd: add 802.11r supportFelix Fietkau2015-03-261-0/+29
| | | | | | Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> SVN-Revision: 45051
* hostapd: allow multiple key management algorithmsFelix Fietkau2015-03-261-2/+4
| | | | | | | | | To enable 802.11r, wpa_key_mgmt should contain FT-EAP or FT-PSK. Allow multiple key management algorithms to make this possible. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> SVN-Revision: 45050
* hostapd: append nasid to config for all WPA typesFelix Fietkau2015-03-261-2/+6
| | | | | | | | | | The 802.11r implementation in hostapd uses nas_identifier as PMK-R0 Key Holder identifier. As 802.11r can also be used with WPA Personal, nasid should be appended to the hostapd config for all WPA types. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> SVN-Revision: 45049
* hostapd: remove bogus default setting for wps_pin (#17873)Felix Fietkau2014-09-151-2/+2
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 42553
* hostapd: Add optional support for hostapd own_ip_addr in wireless configJohn Crispin2014-06-021-0/+2
| | | | | | | | | | | | `own_ip_addr` is used by hostapd as NAS-IP-Address. This is used to identify the AP that is requesting the authentication of the user and could be used to define which AP's can authenticate users. Some vendors implement only NAS-Identifier or NAS-IP-Address and not both. This patch adds ownip as an optional parameter in /etc/config/wireless. Signed-off-by: Thomas Wouters <thomaswouters@gmail.com> SVN-Revision: 40934
* hostapd: recognize 8021x as an authentication modeFelix Fietkau2013-10-081-1/+1
| | | | | | | | | | | | | | Currently, in order to configure the authentication daemon in 8021x mode, we need to set wireless.@wifi-iface[0].encryption="wpa" Though it works it confuses folks as 8021x is using WEP encryption and not WPA. Therefore the terminology itself is confusing. This change adds 8021x as a recognized string for 8021x authentication. Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> SVN-Revision: 38339
* hostapd: add external registrar supportFelix Fietkau2013-10-081-0/+3
| | | | | | | | | | | | | Setting wireless.@wifi-iface[N].ext_registrar=1 will enable UPNP advertising and add an external registrar to the interface this vif belongs to (br-lan if the vif is included in the LAN bridge). By enabling this we append upnp_iface=xxx to the hostapd config file. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> SVN-Revision: 38338
* hostapd: fix hostapd RSN preauthentication PMKSA cachingFelix Fietkau2013-10-081-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 2009 OpenWrt's hostapd config added an "auth_cache" boolean to be used to address a reported issue #12129 [0] on a forum [1]. The reported issue on the ticket is different that the one described on the forum. The commit was r33359. This change broke proper RSN preauthentication [2] [3] [4] expectations on hostapd's configuration for WPA2 and this in turn disabled PMKSA caching and Opportunistic Key Caching. This change: * Leaves the "auth_cache" to be used only for WPA networks for those looking to use this as a workaround to a reported issue but annotates a warning over its usage. * Separate "auth_cache" from WPA2 RSN preauthentication, leaving WPA2 RSN preauthentication to enabled only with "rsn_preauth" with the expected and recommended settings. * Adds a new WPA2 RSN preauthentication "rsn_preauth_testing" to be used when evaluating funcionality for WPA2 RSN preauthentication with the expected and recommended settings with the only difference so far with what should be enabled by default to disable Opportunistic Key Caching. Disabling the PMKSA cache should mean the STA could not roam off and back onto the AP that had PMKSA caching disabled and would require a full authentication cycle. This fixes this for WPA2 networks with RSN preauthentication enabled. This change should be applied to AA as well as trunk. TL DR; The issue described on the forum has to do with failure of a STA being able to try to authenticate again with the AP if it failed its first try. This may have been an issue with hostapd in 2009 but as per some tests I cannot reproduce this today on a WPA2 network. The issue described on the ticket alludes to a security issue with the design of using a Radius server to authenticate to an AP. The issue vaguely alludes to the circumstances of zapping a user, deleting their authentication credentials to log in to the network, and that if RSN preauthentication is enabled with PMKSA caching that the user that was zapped would still be able to authenticate. Lets treat these as separate issues. I cannot reproduce the first issue reported on the forums of not being able to authenticate anymore on a WPA2 network. The issue reported on the ticket modified WPA2 RSN preauthentication by adding two fields to the hostapd configuration if auth_cache was enabled: * disable_pmksa_caching=1 * okc=0 The first one disables PMKSA authentication cache. The second one disables Opportunistic Key Caching. The issue reported on the ticket was fixed by implementing a workaround in hostapd's configuration. Disabling PMKSA caching breaks proper use of WPA2 RSN pre authentication. The usage of disable_pmksa_caching=1 prevents hostapd from adding PMKSA entries into its cache when a successful 802.1x authentication occurs. In practice RSN preauthentication would trigger a STA to perform authentication with other APs on the same SSID, it would then have its own supplicant PMKSA cache held. If a STA roams between one AP to another no new authenitcation would need to be performed as the new AP would already have authenticated the STA. The purpose of the PMKSA cache on the AP side would be for the AP to use the same PMKID for a STA when the STA roams off onto another BSSID and later comes back to it. Disabling Opportunistic Key Caching could help the reported issue as well but its not the correct place to address this. Opportunistic Key Caching enables an AP with different interfaces to share the PMKSA cache. Its a technical enhancement and disabling it would be useful to let a testing suite properly test for RSN preauthentication given that otherwise Opportunistic Key Caching would enable an interface being tested to derive its own derive the PMKSA entry. In production though okc=1 should be enabled to help with RSN preauthentication. The real fix for this particular issue outside of the scope of hostapd's configuration and it should not be dealt with as a workaround to its configuration and breaking expected RSN preauthentication and technical optimizations. Revert this change and enable users to pick and choose to enable or disable disable_pmksa_caching and okc expecting them to instead have read clearly more what these do. As for the core issure ported, the correct place to fix this is to enable a sort of messaging between the RADIUS server and its peers so that if caching for authentication is enabled that cache can be cleared upon user credential updates. Updating a user password (not just zapping a user) is another possible issue that would need to be resolved here. Another part of the solution might be to reduce the cache timing to account for any systematic limitations (RADIUS server not able to ask peers to clear cache might be one). [0] https://dev.openwrt.org/changeset/33359 [1] https://forum.openwrt.org/viewtopic.php?id=19596 [2] http://wireless.kernel.org/en/users/Documentation/hostapd#IEEE_802.11i.2FRSN.2FWPA2_pre-authentication [3] http://wireless.kernel.org/en/users/Documentation/wpa_supplicant#RSN_preauthentication [4] http://wiki.openwrt.org/doc/recipes/rsn_preauthentication Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> SVN-Revision: 38336
* hostapd: Add WPS unconfigured & WPS pin method supportFelix Fietkau2013-10-081-3/+13
| | | | | | | Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> SVN-Revision: 38335
* hostapd: Add eap_reauth_period config optionFelix Fietkau2013-10-081-0/+2
| | | | | | | | | | | | This adds the eap_reauth_period to be used for modifying the RADIUS server reauthentication authentication period, a parameter that gets passed directly to the hostapd configuration file. Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> SVN-Revision: 38334
* hostapd: Settings for DAE/CoA serverFelix Fietkau2013-08-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | hostapd supports "Dynamic Authorization Extensions", making it possible to forcibly disconnect a user by sending it a RADIUS "Disconnect-Request" packet. I've added three new variables to enable setting of the "radius_das_client" and "radius_das_port" variables in the hostapd configuration, which enable these extensions. * dae_client - IP of the client that can send disconnect requests * dae_secret - shared secret for DAE packets These are combined into the "radius_das_client" option in hostapd.conf To enable the server, both dae_client and dae_secret must be set. * dae_port - optional, default value is 3799 as specified in RFC 5176 Signed-off-by: Martijn van de Streek <martijn@vandestreek.net> SVN-Revision: 37734
* hostapd: truncate default mac file before adding entries to it (#13797)Jo-Philipp Wich2013-07-011-0/+2
| | | | SVN-Revision: 37114
* hostapd: correctly handle macfile uci optionJo-Philipp Wich2013-06-171-9/+24
| | | | | | | | | | | | | Make hostapd.sh correctly handle the macfile uci option. Such option specifies the macfile name to pass into the hostapd configuration file. Moreover, if a maclist option has been specified, copy the macfile before appending new entries. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> SVN-Revision: 36944
* mac80211/hostapd: short_preamble is a per-vif option and should be enabled ↵Felix Fietkau2013-02-111-0/+4
| | | | | | by default SVN-Revision: 35565
* mac80211, hostapd: Fix macfilter for multi bssid setupsFelix Fietkau2012-12-041-0/+21
| | | | | | | | | | | Previously only the first macfilter configuration would have been used on all interfaces. However, the configuration was always done per vif already. Hence, move the macfilter setup into hostapd.sh where and create one mac list file per vif. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> SVN-Revision: 34470
* packages: sort network related packages into package/network/Felix Fietkau2012-10-101-0/+276
SVN-Revision: 33688