diff options
Diffstat (limited to 'package/network/services/hostapd')
3 files changed, 23 insertions, 14 deletions
diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc index a28c282493..7b3862e0e2 100644 --- a/package/network/services/hostapd/files/hostapd.uc +++ b/package/network/services/hostapd/files/hostapd.uc @@ -574,7 +574,9 @@ function iface_reload_config(name, phydev, config, old_config) // try to preserve MAC address of this BSS by reassigning another // BSS if necessary - if (cur_config.default_macaddr && + if ((cur_config.default_macaddr || cur_config.random_macaddr) && + cur_config.random_macaddr == prev_config.random_macaddr && + cur_config.default_macaddr == prev_config.default_macaddr && !macaddr_list[prev_config.bssid]) { macaddr_list[prev_config.bssid] = i; cur_config.bssid = prev_config.bssid; @@ -918,6 +920,8 @@ function iface_load_config(phy, radio, filename) while ((line = rtrim(f.read("line"), "\n")) != null) { if (line == "#default_macaddr") bss.default_macaddr = true; + if (line == "#random_macaddr") + bss.random_macaddr = true; let val = split(line, "=", 2); if (!val[0]) diff --git a/package/network/services/hostapd/patches/601-ucode_support.patch b/package/network/services/hostapd/patches/601-ucode_support.patch index a5aa2e6a79..44705efa37 100644 --- a/package/network/services/hostapd/patches/601-ucode_support.patch +++ b/package/network/services/hostapd/patches/601-ucode_support.patch @@ -148,21 +148,26 @@ as adding/removing interfaces. { struct hostapd_bss_config *conf = hapd->conf; u8 ssid[SSID_MAX_LEN + 1]; -@@ -1434,7 +1438,13 @@ static int hostapd_setup_bss(struct host +@@ -1434,12 +1438,17 @@ static int hostapd_setup_bss(struct host if (!first || first == -1) { u8 *addr = hapd->own_addr; + bool use_existing = first == -1; +#ifdef CONFIG_IEEE80211BE -+ if (hapd->conf->mld_ap) { ++ if (hapd->conf->mld_ap) + addr = NULL; -+ } else +#endif /* CONFIG_IEEE80211BE */ if (!is_zero_ether_addr(conf->bssid)) { /* Allocate the configured BSSID. */ os_memcpy(hapd->own_addr, conf->bssid, ETH_ALEN); -@@ -1469,6 +1479,7 @@ static int hostapd_setup_bss(struct host + +- if (hostapd_mac_comp(hapd->own_addr, ++ if (0 && hostapd_mac_comp(hapd->own_addr, + hapd->iface->bss[0]->own_addr) == + 0) { + wpa_printf(MSG_ERROR, "BSS '%s' may not have " +@@ -1469,6 +1478,7 @@ static int hostapd_setup_bss(struct host hapd->mld_link_id, hapd->conf->iface); goto setup_mld; } @@ -170,7 +175,7 @@ as adding/removing interfaces. } #endif /* CONFIG_IEEE80211BE */ -@@ -1477,7 +1488,7 @@ static int hostapd_setup_bss(struct host +@@ -1477,7 +1487,7 @@ static int hostapd_setup_bss(struct host conf->iface, addr, hapd, &hapd->drv_priv, force_ifname, if_addr, conf->bridge[0] ? conf->bridge : NULL, @@ -179,7 +184,7 @@ as adding/removing interfaces. wpa_printf(MSG_ERROR, "Failed to add BSS (BSSID=" MACSTR ")", MAC2STR(hapd->own_addr)); hapd->interface_added = 0; -@@ -1500,7 +1511,7 @@ static int hostapd_setup_bss(struct host +@@ -1500,7 +1510,7 @@ static int hostapd_setup_bss(struct host #ifdef CONFIG_IEEE80211BE setup_mld: @@ -188,7 +193,7 @@ as adding/removing interfaces. wpa_printf(MSG_DEBUG, "MLD: Set link_id=%u, mld_addr=" MACSTR ", own_addr=" MACSTR, -@@ -1518,6 +1529,8 @@ setup_mld: +@@ -1518,6 +1528,8 @@ setup_mld: } #endif /* CONFIG_IEEE80211BE */ @@ -197,7 +202,7 @@ as adding/removing interfaces. if (conf->wmm_enabled < 0) conf->wmm_enabled = hapd->iconf->ieee80211n | hapd->iconf->ieee80211ax; -@@ -1843,7 +1856,7 @@ int hostapd_set_acl(struct hostapd_data +@@ -1843,7 +1855,7 @@ int hostapd_set_acl(struct hostapd_data } @@ -206,7 +211,7 @@ as adding/removing interfaces. { #ifdef CONFIG_IEEE80211BE int ret; -@@ -2516,7 +2529,7 @@ static int hostapd_owe_iface_iter2(struc +@@ -2516,7 +2528,7 @@ static int hostapd_owe_iface_iter2(struc #endif /* CONFIG_OWE */ @@ -215,7 +220,7 @@ as adding/removing interfaces. { #ifdef CONFIG_OWE /* Check whether the enabled BSS can complete OWE transition mode -@@ -2986,7 +2999,7 @@ hostapd_alloc_bss_data(struct hostapd_if +@@ -2986,7 +2998,7 @@ hostapd_alloc_bss_data(struct hostapd_if } @@ -224,7 +229,7 @@ as adding/removing interfaces. { if (!hapd) return; -@@ -3194,7 +3207,7 @@ fail: +@@ -3194,7 +3206,7 @@ fail: } @@ -233,7 +238,7 @@ as adding/removing interfaces. { #ifdef CONFIG_IEEE80211BE struct hostapd_mld *mld, **all_mld; -@@ -4074,7 +4087,8 @@ int hostapd_remove_iface(struct hapd_int +@@ -4074,7 +4086,8 @@ int hostapd_remove_iface(struct hapd_int hapd_iface = interfaces->iface[i]; if (hapd_iface == NULL) return -1; diff --git a/package/network/services/hostapd/patches/701-reload_config_inline.patch b/package/network/services/hostapd/patches/701-reload_config_inline.patch index b91ff62e05..bb4160edd9 100644 --- a/package/network/services/hostapd/patches/701-reload_config_inline.patch +++ b/package/network/services/hostapd/patches/701-reload_config_inline.patch @@ -58,7 +58,7 @@ as adding/removing interfaces. return NULL; --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -3400,8 +3400,13 @@ hostapd_interface_init_bss(struct hapd_i +@@ -3399,8 +3399,13 @@ hostapd_interface_init_bss(struct hapd_i } } |