aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/files/netifd.sh
Commit message (Collapse)AuthorAgeFilesLines
* hostapd: mv netifd.sh hostapd.shDaniel Albers2017-02-151-763/+0
| | | | | | same name for the file on the host and target Signed-off-by: Daniel Albers <daniel.albers@public-files.de>
* hostapd: default to wps_independent 1Steven Honson2017-01-261-1/+2
| | | | Signed-off-by: Steven Honson <steven@honson.id.au>
* hostapd: expose wps_independent and ap_setup_locked as uci optionsSteven Honson2017-01-261-3/+5
| | | | | | | ap_setup_locked is named wps_ap_setup_locked in uci for consistency with other wps related uci options. Signed-off-by: Steven Honson <steven@honson.id.au>
* hostapd: fix stray "out of range" shell errors in hostapd.shJo-Philipp Wich2017-01-231-2/+2
| | | | | | | | | | | | The hostapd_append_wpa_key_mgmt() procedure uses the possibly uninitialized $ieee80211r and $ieee80211w variables in a numerical comparisation, leading to stray "netifd: radio0 (0000): sh: out of range" errors in logread when WPA-PSK security is enabled. Ensure that those variables are substituted with a default value in order to avoid emitting this (harmless) shell error. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* wpa_supplicant: Fix mesh encryption configSujith Manoharan2017-01-111-1/+4
| | | | | | | | | | | | | | | wpa_supplicant allows only SAE as the key management type for mesh mode. The recent key_mgmt rework unconditionally added WPA-PSK - this breaks interface bringup and wpa_s throws this error message: Line 10: key_mgmt for mesh network should be open or SAE Line 10: failed to parse network block. Failed to read or parse configuration '/var/run/wpa_supplicant-wlan0.conf Fix this by making sure that only SAE is used for mesh. Signed-off-by: Sujith Manoharan <m.sujith@gmail.com>
* hostapd: enable SHA256-based algorithmsStijn Tintel2017-01-031-2/+2
| | | | | | | | | | | Enable support for stronger SHA256-based algorithms in hostapd and wpa_supplicant when using WPA-EAP or WPA-PSK with 802.11w enabled. We cannot unconditionally enable it, as it requires hostapd to be compiled with 802.11w support, which is disabled in the -mini variants. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Tested-by: Sebastian Kemper <sebastian_ml@gmx.net>
* hostapd: add function to handle wpa_key_mgmtStijn Tintel2017-01-031-9/+10
| | | | | | | | Now that wpa_key_mgmt handling for hostapd and wpa_supplicant are consistent, we can move parts of it to a dedicated function. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Tested-by: Sebastian Kemper <sebastian_ml@gmx.net>
* wpa_supplicant: rework wpa_key_mgmt handlingStijn Tintel2017-01-031-8/+9
| | | | | | | | Rework wpa_key_mgmt handling for wpa_supplicant to be consistent with how it is done for hostapd. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Tested-by: Sebastian Kemper <sebastian_ml@gmx.net>
* hostapd support for VLANs through a file in addition to Radius.Petr Konecny2016-10-311-18/+25
| | | | Signed-off-by: Petr Konecny <pekon@google.com>
* hostapd: Allow RADIUS accounting without 802.1xPetko Bordjukov2016-08-111-10/+9
| | | | | | | | RADIUS accounting can be used even when RADIUS authentication is not used. Move the accounting configuration outside of the EAP-exclusive sections. Signed-off-by: Petko Bordjukov <bordjukov@gmail.com>
* branding: add LEDE brandingJohn Crispin2016-03-241-2/+2
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* hostapd.sh: Add support for "anonymous_identity" config fieldHauke Mehrtens2016-04-171-2/+3
| | | | | | | | | | | | | | | | | | The wpa_supplicant supports an "anonymous_identity" field, which some EAP networks require. From the documentation: anonymous_identity: Anonymous identity string for EAP (to be used as the unencrypted identity with EAP types that support different tunnelled identity, e.g., EAP-TTLS). This change modifies the hostapd.sh script to propagate this field from the UCI config to the wpa_supplicant.conf file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> Reviewed-by: Manuel Munz <freifunk@somakoma.de> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 49181
* wpa_supplicant: add support for EAP-TLS phase2Felix Fietkau2016-01-191-2/+12
| | | | | | | | | Introduce config options client_cert2, priv_key2 and priv_key2_pwd used for EAP-TLS phase2 authentication in WPA-EAP client mode. Signed-off-by: Daniel Golle <daniel@makrotopia.org> SVN-Revision: 48345
* wpa_supplicant: improve generating phase2 config line for WPA-EAPFelix Fietkau2016-01-181-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WPA-EAP supports several phase2 (=inner) authentication methods when using EAP-TTLS, EAP-PEAP or EAP-FAST (the latter is added as a first step towards the UCI model supporting EAP-FAST by this commit) The value of the auth config variable was previously expected to be directly parseable as the content of the 'phase2' option of wpa_supplicant. This exposed wpa_supplicant's internals, leaving it to view-level to set the value properly. Unfortunately, this is currently not the case, as LuCI currently allows values like 'PAP', 'CHAP', 'MSCHAPV2'. Users thus probably diverged and set auth to values like 'auth=MSCHAPV2' as a work-around. This behaviour isn't explicitely documented anywhere and is not quite intuitive... The phase2-string is now generated according to $eap_type and $auth, following the scheme also found in hostap's test-cases: http://w1.fi/cgit/hostap/tree/tests/hwsim/test_ap_eap.py The old behaviour is also still supported for the sake of not breaking existing, working configurations. Examples: eap_type auth 'ttls' 'EAP-MSCHAPV2' -> phase2="autheap=MSCHAPV2" 'ttls' 'MSCHAPV2' -> phase2="auth=MSCHAPV2" 'peap' 'EAP-GTC' -> phase2="auth=GTC" Deprecated syntax supported for compatibility: 'ttls' 'autheap=MSCHAPV2' -> phase2="autheap=MSCHAPV2" I will suggest a patch to LuCI adding EAP-MSCHAPV2, EAP-GTC, ... to the list of Authentication methods available. Signed-off-by: Daniel Golle <daniel@makrotopia.org> SVN-Revision: 48309
* wpa_supplicant: set regulatory domain the same way as hostapdFelix Fietkau2016-01-031-0/+6
| | | | | | | | | | | | | In sta-only configuration, wpa_supplicant needs correct regulatory domain because otherwise it may skip channel of its AP during scan. Another alternative is to fix "iw reg set" in mac80211 netifd script. Currently it fails if some phy has private regulatory domain which matches configured one. Signed-off-by: Dmitry Ivanov <dima@ubnt.com> SVN-Revision: 48099
* wpa-supplicant: Get 802.11s ssid information from option mesh_idJohn Crispin2015-11-241-0/+3
| | | | | | | | | | | | The scripts for authsae and iw use the option mesh_id to get set the "meshid" during a mesh join. But the script for wpad-mesh ignores the option mesh_id and instead uses the option ssid. Unify the mesh configuration and let the wpa_supplicant script also use the mesh_id from the configuration. Signed-off-by: Sven Eckelmann <sven@open-mesh.com> SVN-Revision: 47615
* hostapd: Use network_get_device instead of uci_get_stateFelix Fietkau2015-11-111-2/+5
| | | | | | | | This fixes the IAPP functionality. Signed-off-by: Petko Bordjukov <bordjukov@gmail.com> SVN-Revision: 47455
* hostapd: add default value to eapol_version (#20641)Felix Fietkau2015-11-021-0/+1
| | | | | | | | | | | | | | r46861 introduced a new option eapol_version to hostapd, but did not provide a default value. When the option value is evaluated, the non-existing value causes errors to the systen log: "netifd: radio0: sh: out of range" Add a no-op default value 0 for eapol_version. Only values 1 or 2 are actually passed on, so 0 will not change the default action in hostapd. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> SVN-Revision: 47361
* hostapd: Add eapol_version config optionFelix Fietkau2015-09-111-1/+6
| | | | | | | | | | | | | Add eapol_version to the openwrt wireless config ssid section. Only eapol_version=1 and 2 will get passed to hostapd, the default in hostapd is 2. This is only useful for really old client devices that don't accept eapol_version=2. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> SVN-Revision: 46861
* hostapd: Add vlan_file option to netifd.shJohn Crispin2015-08-171-1/+6
| | | | | | | | | | | | | Other VLAN related options are already being processed in netifd.sh but the vlan_file option is missing. This option allows the mapping of vlan IDs to network interfaces and will be used in dynamic VLAN feature for binding stations to interfaces based on VLAN assignments. The change is done similarly to the wpa_psk_file option. Signed-off-by: Gong Cheng <chengg11@yahoo.com> SVN-Revision: 46652
* wpa-supplicant: add 802.11r client supportFelix Fietkau2015-07-151-1/+6
| | | | | | | | | | | | Add 802.11r client support to wpa_supplicant. It's only enabled in wpa_supplicant-full. hostapd gained 802.11r support in commit r45051. Tested on a TP-Link TL-WR710N sta psk client with two 802.11r enabled openwrt accesspoints (TP-Link TL-WDR3600). Signed-off-by: Stefan Hellermann <stefan@the2masters.de> SVN-Revision: 46377
* hostapd: move ht_coex variable to mac80211.sh, guarded by 802.11n supportFelix Fietkau2015-06-061-4/+2
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45917
* hostapd: add a new option to control HT coexistance separate from noscanFelix Fietkau2015-06-021-2/+4
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45873
* hostapd/netifd: encrypted mesh with wpa_supplicantFelix Fietkau2015-04-201-18/+29
| | | | | | Signed-off-by: Daniel Golle <daniel@makrotopia.org> SVN-Revision: 45519
* netifd: fix ieee80211r 'sh: bad number' in mac80211 setup (bug #19345)Felix Fietkau2015-04-111-0/+1
| | | | | | | | | | | | | | | | | | | Two errors "netifd: radio0: sh: bad number" have recently surfaced in system log in trunk when wifi interfaces come up. I tracked the errors to checking numerical values of some config options without ensuring that the option has any value. The errors I see have apparently been introduced by r45051 (ieee80211r in hostapd) and r45326 (start_disabled in mac80211). My patches fix two instances of "bad number", but there may be a third one, as the original report in bug 19345 pre-dates r45326 and already has two "bad number" errors for radio0. https://dev.openwrt.org/ticket/19345 Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> SVN-Revision: 45380
* hostapd: add 802.11r supportFelix Fietkau2015-03-261-1/+36
| | | | | | 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: backport BSSID black/whitelistsJohn Crispin2015-02-131-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds the configuration options "bssid_whitelist" and "bssid_blacklist" used to limit the AP selection of a network to a specified (finite) set or discard certain APs. This can be useful for environments where multiple networks operate using the same SSID and roaming between those is not desired. It is also useful to ignore a faulty or otherwise unwanted AP. In many applications it is useful not just to enumerate a group of well known access points, but to use a address/mask notation to match an entire set of addresses (ca:ff:ee:00:00:00/ff:ff:ff:00:00:00). This is especially useful if an OpenWrt device with two radios is used to retransmit the same network (one in AP mode for other clients, one as STA for the uplink); the following configuration prevents the device from associating with itself, given that the own AP to be avoided is using the bssid 'C0:FF:EE:D0:0D:42': config wifi-iface option device 'radio2' option network 'uplink' option mode 'sta' option ssid 'MyNetwork' option encryption 'none' list bssid_blacklist 'C0:FF:EE:D0:0D:42/00:FF:FF:FF:FF:FF' This change consists of the following cherry-picked upstream commits: b3d6a0a8259002448a29f14855d58fe0a624ab76 b83e455451a875ba233b3b8ac29aff8b62f064f2 79cd993a623e101952b81fa6a29c674cd858504f (squashed to implement bssid_{white,black}lists) 0047306bc9ab7d46e8cc22ff9a3e876c47626473 (Add os_snprintf_error() helper) Signed-off-by: Stefan Tomanek <stefan.tomanek+openwrt@wertarbyte.de> SVN-Revision: 44438
* mac80211/hostapd: fix HT mode setup for RSN ad-hoc networksFelix Fietkau2015-01-241-1/+2
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 44100
* hostapd: Add uapsd option to netifd.shFelix Fietkau2015-01-051-2/+4
| | | | | | | | | | | | | The uapsd option sets the uapsd_advertisement_enabled flag in hostapd. The check for phy support is already implemented here in hostapd since 2011: http://w1.fi/cgit/hostap/commit/?id=70619a5d8a3d32faa43d66bcb1b670cacf0c243e So this can be safely set to 1 as default. Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net> SVN-Revision: 43846
* hostapd: add support for configuring supported ratesFelix Fietkau2014-12-271-5/+15
| | | | | | | | patch by Wilco Baan Hofman from #18627 Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43782
* hostapd: improve 802.1x dynamic vlan support with bridge namesJohn Crispin2014-12-011-2/+5
| | | | | | | | | | In r41872 and r42787 Dynamic VLAN support was reintroduced, but the vlan_bridge parameter is not read while setting up the config, so the default is used which is undesirable for some uses. Signed-off-by: Ben Franske <ben.mm@franske.com> SVN-Revision: 43473
* hostapd: Add wpa_psk_file option to netifd.shJohn Crispin2014-10-201-1/+7
| | | | | | | | | | | | | | | | | | The wpa_psk_file option offers the possibility to use a different WPA-PSK key for each client. The directive points to a file with the following syntax: mac_address wpa_passphrase_or_hex_key Example: 00:11:22:33:44:55 passphrase_for_client_1 00:11:22:33:44:67 passphrase_for_client_2 00:11:22:33:44:89 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef So it is possible to specify both ASCII passphrases and raw 64-chars hex keys. Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net> SVN-Revision: 43001
* hostapd: read missing parameter for dynamic VLANsJohn Crispin2014-10-061-1/+1
| | | | | | | | | | In r41872 Dynamic VLAN support was reintroduced, but the vlan_naming parameter is not read while setting up the config, so it always defaults to 1. Signed-off-by: Reiner Herrmann <reiner@reiner-h.de> SVN-Revision: 42787
* hostapd: allow using iapp for any encryption type (fixes #18022)Felix Fietkau2014-10-051-2/+3
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 42764
* hostapd: do not remove foreign wpa_supplicant socketsJohn Crispin2014-09-171-1/+1
| | | | | | | | https://dev.openwrt.org/ticket/17886 Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 42586
* hostapd: remove bogus default setting for wps_pin (#17873)Felix Fietkau2014-09-151-2/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 42553
* hostapd: fix some whitespacesLuka Perkov2014-08-111-3/+3
| | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 42111
* hostapd: Reintroduce Full Dynamic VLAN supportJo-Philipp Wich2014-07-291-1/+14
| | | | | | | | | | This patch brings full dynamic vlan support to netifd that existed in hostapd.sh in Attitude Adjustment. Signed-off-by: Joseph CG Walker <Joe@ChubbyPenguin.net> [jow@openwrt.org: changed commit message, rebased on top of current hostapd.sh] Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 41872
* hostapd: add a require_mode option in wifi-device sections to select the ↵Felix Fietkau2014-07-151-1/+7
| | | | | | | | minimum hardware mode that the AP requires from clients Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 41665
* hostapd: move reading of rsn_preauth out of auth_type=eap contextFelix Fietkau2014-06-051-3/+3
| | | | | | | | | | rsn_preauth is used outside of "case $auth_type", so if it is set for an EAP-enabled SSID, it would also be set for the following non-EAP-enabled SSIDs, because it would not be read again. Signed-off-by: Reiner Herrmann <reiner@reiner-h.de> SVN-Revision: 41012
* hostapd: replace undefined $bridge with $network_bridgeFelix Fietkau2014-06-041-3/+3
| | | | | | Signed-off-by: Reiner Herrmann <reiner@reiner-h.de> SVN-Revision: 41002
* hostapd: Add optional support for hostapd own_ip_addr in wireless configJohn Crispin2014-06-021-1/+3
| | | | | | | | | | | | `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: add an option for 802.11h (enabled by default)Felix Fietkau2014-05-031-2/+6
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 40690
* 802.11s: fix authsae support in netifdJohn Crispin2014-04-121-1/+1
| | | | | | | | | | This patch implements support for 802.11s protected mesh wireless networks (using authsae) in the netifd framework. Until meshd-nl80211 implements a proper -P option for the PID file, this uses shell backgrounding in order to be able to get the PID for the process. Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net> SVN-Revision: 40497
* hostapd: fix "bad number" error due to missing wps_pbc_in_m1 option (since ↵Felix Fietkau2014-04-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | r39995) r39995 introduced a new parameter wps_pbc_in_m1 to wifi wps config, but apparently did not provide a default value 0. When that option's non-existing value is later evaluated in /lib/netifd/hostapd.sh, it causes the "bad number" error to be logged in syslog if user has not set the wps_pbc_in_m1 option. The error materialises only if user has enabled wps. Sat Apr 12 13:25:01 2014 daemon.notice netifd: radio1 (1254): sh: bad number Sat Apr 12 13:25:01 2014 daemon.notice netifd: radio0 (1253): sh: bad number Discussion in bug 15508: https://dev.openwrt.org/ticket/15508#comment:3 Error is caused by line 282: https://dev.openwrt.org/browser/trunk/package/network/services/hostapd/files/netifd.sh#L282 My patch sets the parameter's default value to 0, which does nothing. The default might also be set a bit later in the function, but this felt like the most clear place to do that. Signed-off-by hnyman <hannu.nyman@iki.fi> SVN-Revision: 40469
* hostapd: add pbc_in_m1 optionFelix Fietkau2014-03-211-2/+3
| | | | | | | | | | | | Option pbc_in_m1 is being used as a WPS capability discovery workaround for PBC with Windows 7. Add possibility to enable this workaround from UCI. To enable it, turn on wps and set wps_pbc_in_m1 parameter to 1. Signed-off-by: Pawel Kulakowski <pawel.kulakowski@tieto.com> SVN-Revision: 39995
* hostapd: add validation rules to wireless handlerJohn Crispin2014-02-181-6/+6
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 39620
* hostapd: do not get basic_rate as a simple string variableFelix Fietkau2014-02-021-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39448