aboutsummaryrefslogtreecommitdiff
path: root/package/network/services/hostapd/files
Commit message (Collapse)AuthorAge
* wifi-scripts: add new package, move wifi scripts to a single placeFelix Fietkau2024-02-03
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: fail R0KH and R1KH derivation when wpa_psk_file is usedRany Hany2024-01-25
| | | | | | | | | When wpa_psk_file is used, there is a chance that no PSK is set. This means that the FT key will be generated using only the mobility domain which could be considered a security vulnerability but only for a very specific and niche config. Signed-off-by: Rany Hany <rany_hany@riseup.net>
* hostapd: fix 11r defaults when using SAEJesus Fernandez Manzano2024-01-25
| | | | | | | | When using WPA3-SAE or WPA2/WPA3 Personal Mixed, we can not use ft_psk_generate_local because it will break FT for SAE. Instead use the r0kh and r1kh configuration approach. Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.ai>
* hostapd: fix 11r defaults when using WPAJesus Fernandez Manzano2024-01-25
| | | | | | | | | | | | | | 802.11r can not be used when selecting WPA. It needs at least WPA2. This is because 802.11r advertises FT support in-part through the Authentication and Key Management (AKM) suites in the Robust Security Network (RSN) Information Element, which was included in the 802.11i amendment and WPA2 certification program. Pre-standard WPA did not include the RSN IE, but the WPA IE. This IE can not advertise the AKM suite for FT. Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.ai>
* hostapd: remove obsolete functionFelix Fietkau2024-01-25
| | | | | | Leftover from authsae, which was removed a long time ago Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add back missing function for updating wpa_supplicant macaddr listFelix Fietkau2024-01-13
| | | | | | | Make the call deferred instead of blocking to avoid deadlock issues Fixes: 3df9322771cc ("hostapd: make ubus calls to wpa_supplicant asynchronous") Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: fix an exception in hostapd.uc on interface add failureFelix Fietkau2024-01-13
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* Revert "mac80211: rework interface setup, fix race condition"Felix Fietkau2024-01-13
| | | | | | | | This reverts commit b7f9742da82fa9b122e8d63e48a9a5c0dec298f2. There are several reports of regressions with this commit. Will be added back once I've figured out and fixed the cause Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mac80211: rework interface setup, fix race conditionFelix Fietkau2024-01-11
| | | | | | | Only tell netifd about vifs when the setup is complete and hostapd + wpa_supplicant have been notified Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: make ubus calls to wpa_supplicant asynchronousFelix Fietkau2024-01-11
| | | | | | | | This fixes a deadlock issue where depending on the setup order, hostapd and wpa_supplicant could end up waiting for each other Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: use new udebug ubus api to make debug rings configurableFelix Fietkau2023-11-30
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add missing acl entries for udebugFelix Fietkau2023-11-20
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add udebug supportFelix Fietkau2023-11-20
| | | | | | | This is not activated by default and must be explicitly enabled via ubus It supports reporting log messages and netlink packets Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: fix undeclared variable iface_nameNazar Mokrynskyi2023-11-19
| | | Signed-off-by: Nazar Mokrynskyi <nazar@mokrynskyi.com>
* hostapd: use rtnl to set up interfacesFelix Fietkau2023-11-08
| | | | | | In wpa_supplicant, set up wlan interfaces before adding them Signed-off-by: Felix Fietkau <nbd@nbd.name>
* wifi: fix applying mesh parameters when wpa_supplicant is in useFelix Fietkau2023-11-08
| | | | | | | Apply them directly using nl80211 after setting up the interface. Use the same method in wdev.uc as well Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: do not trim trailing whitespace, except for newlineFelix Fietkau2023-10-31
| | | | | | Fixes adding SSID or key with trailing whitespace Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: fix wpa_supplicant mac address allocation on ap+staFelix Fietkau2023-09-28
| | | | | | | | | | | If the full interface is restarted while bringing up an AP, it can trigger a wpa_supplicant interface start before wpa_supplicant is notified of the allocated mac addresses. Fix this by moving the iface_update_supplicant_macaddr call to just after the point where mac addresses are allocated. Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: fix mac address of interfaces created via wdev.ucFelix Fietkau2023-09-27
| | | | | | Use the wdev config with the generated MAC address Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: use phy name for hostapd interfaces instead of first-bss ifnameFelix Fietkau2023-09-19
| | | | | | Improves reliability in error handling Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add missing ubus ACL entries for AP+client (#13449)Felix Fietkau2023-09-15
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: support dynamic reload of vlan files when renaming interfacesFelix Fietkau2023-09-15
| | | | | | | Avoids unnecessary AP restart on ifname changes when wifi-vlan sections are present. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: fix more AP+STA issuesFelix Fietkau2023-09-14
| | | | | | | | | | | | When STA is disconnected, ensure that the interface is in a cleanly stopped state: - if in regular enable/disable state, stop beacons if necessary - in any other state, disable the interface When the STA is up, ignore repeated start commands for the same channel, in order to avoid unnecessary AP restarts Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: rework reload support and MAC address handlingFelix Fietkau2023-09-13
| | | | | | | | | | | | | | | MAC address and interface name assigned by mac80211.sh depend on the order in which interfaces are brought up. This order changes when interfaces get added or removed, which can cause unnecessary reload churn. One part of the fix it making MAC address allocation more dynamic in both wpa_supplicant and hostapd, by ignoring the provided MAC address using the next available one, whenever the config does not explicitly specify one. The other part is making use of support for renaming netdevs at runtime and preserving the MAC address for renamed netdevs. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: move mac address allocation from mac80211.sh to wdev.ucFelix Fietkau2023-09-13
| | | | | | Preparation for upcoming hostapd reload improvements Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: allow adding initial AP without breaking STA interface connectionFelix Fietkau2023-09-03
| | | | | | | | | | When switching from a STA-only configuration to AP+STA on the same phy, the STA was previously restarted in order to notify hostapd of the new frequency, which might not match the AP configuration. Fix the STA restart by querying the operating frequency from within hostapd when bringing up the AP. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: fix config change detection on boolean valuesFelix Fietkau2023-09-03
| | | | | | Check for null instead of truish value Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: remove eap-eap192 auth type valueFelix Fietkau2023-08-31
| | | | | | It is no longer used Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: support eap-eap2 and eap2 auth_type valuesFelix Fietkau2023-08-31
| | | | | | | WPA3 Enterprise-transitional requires optional MFP support and SHA1+SHA256 WPA3 Enterprise-only requires SHA1 support disabled and mandatory MFP. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: fix FILS key mgmt type for WPA3 Enterprise 192 bitFelix Fietkau2023-08-31
| | | | | | Use the SHA384 variant to account for longer keys with more security Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: in AP/STA, shut down AP interfaces when STA enters scanning stateFelix Fietkau2023-08-23
| | | | | | | | When the STA is brought up, it is set to DISABLED before adding the bss to ucode, so the first trigger to disable the AP is missed. Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: allow reduced neighbor report configurationDavid Bauer2023-08-22
| | | | | | | Reduced neighbor reports can be enabled by setting the "rnr" uci option to 1. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: fix bringing up mesh without supplicant when mcast rate is specifiedFelix Fietkau2023-08-17
| | | | | | The iw command expects a specific command line argument Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: do not store data in object prototypeFelix Fietkau2023-08-12
| | | | | | | It cannot be properly cloned, since it is attached to the resource type. Use a separate registry for data. Fixes object confusion issues Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: restart wifi when the bssid of the first interface changesFelix Fietkau2023-08-11
| | | | | | Full restart is necessary, since the bss wdev is not re-created Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: shut down client mode on the same phy while restarting APFelix Fietkau2023-08-11
| | | | | | | An active client mode interface could prevent the AP from claiming its channel and mess up the bringup sequence order Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: reimplement AP/STA support via ucodeFelix Fietkau2023-08-10
| | | | | | | | | | | Drop obsolete control interface patches. This fixes some corner cases in the previous code where the segment 0 center frequency was not adjusted properly, leading to logspam and non-working AP interfaces. Additionally, shutting down the AP was broken, because the next beacon update would re-enable it, leading to a race condition on assoc. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: remove config_id parameters from hostapd.confFelix Fietkau2023-08-10
| | | | | | They are no longer used Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: fix typo in ssid variable for non-supplicant mesh interface bringupFelix Fietkau2023-08-09
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add extra sanity checks for config reloadFelix Fietkau2023-08-08
| | | | | | Avoid getting stuck because of bad configurations Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: fix unused device removal on DBDC devicesFelix Fietkau2023-08-03
| | | | | | | Check the phy before removing unrelated netdevs on the same hw device Reported-by: Hartmut Birr <e9hack@gmail.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: fix undeclared variable in common.ucFelix Fietkau2023-08-02
| | | | | Fixes: https://github.com/openwrt/openwrt/issues/13210 Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add ucode support, use ucode for the main ubus objectFelix Fietkau2023-08-01
| | | | | | | | This implements vastly improved dynamic configuration reload support. It can handle configuration changes on individual wifi interfaces, as well as adding/removing interfaces. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add experimental radius serverFelix Fietkau2023-08-01
| | | | | | | | This can be used to run a standalone EAP server that can be used from other APs. It uses json as user database format and can automatically handle reload. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add UCI option for Multiple BSSIDStijn Tintel2023-06-16
| | | | | | | | | | | | | | | Add an UCI option to enable Multiple BSSID Advertisement. Enabling this will announce all BSSIDS on a phy in a single beacon frame. The interface that is brought up first will be the transmitting profile, all others are non-transmitting profiles and will be advertised in the Multiple BSSID element in Beacon and Probe Response frames of the first interface. This depends on driver and client support. Enabling this will result in all but the first interface not being visible at all for clients that do not support it. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* hostapd: remove unused legacy wireless extension supportFelix Fietkau2023-05-26
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: enable radius server supportFelix Fietkau2023-03-07
| | | | | | This is useful in combination with the built-in eap server support Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add support for defining multiple acct/auth serversFelix Fietkau2023-03-07
| | | | | | | This allows adding backup servers, in case the primary ones fail. Assume that port and shared secret are going to be the same. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: always use sae_password for mesh/SAE authLeon M. Busch-George2023-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a corner case when using passwords that are exactly 64 characters in length with mesh mode or passwords longer than 63 characters with SAE because 'psk' is used instead of 'sae_password'. SAE is obligatory for 802.11s (mesh point). The 'psk' option for hostapd is suited for WPA2 and enforces length restrictions on passwords. Values of 64 characters are treated as PMKs. With SAE, PMKs are always generated during the handshake and there are no length restrictions. The 'sae_password' option is more suited for SAE and should be used instead. Before this patch, the 'sae_password' option is only used with mesh mode passwords that are not 64 characters long. As a consequence: - mesh passwords can't be 64 characters in length - SAE only works with passwords with lengths >8 and <=63 (due to psk limitation). Fix this by always using 'sae_password' with SAE/mesh and applying the PMK differentiation only when PSK is used. Fixes: #11324 Signed-off-by: Leon M. Busch-George <leon@georgemail.eu> [ improve commit description ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* hostapd: add quotes in assignmentsLeon M. Busch-George2023-02-19
| | | | | | It's generally advised to use quotes for variable assignments in bash. Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>