Files
openwrt/package
Felix Fietkau 87623c1e67 hostapd: give the radio 0 link of an MLD the MLD address
bss_macaddr_next() gives the address of an MLD to its link on radio 0, and
the address generation relies on that. Two paths keep an old link address
instead, even after the MLD address changed:

- Step 2 of iface_reload_config() keeps the old BSSID of the first BSS when
  the new one is a default address, because the first BSS cannot change it
  in place.
- The keep loop in iface_restart() gives a surviving BSS with a default
  address its previous BSSID again.

The link then keeps its old address, and the MLD address is on no link.

In one case, a config change gave ap-mld0 a new MLD address and reloaded it
in place. Link 0 kept the previous MLD address as its link address, so the
new MLD address was on no link. From then on, about 30 % of the unicast
frames to the associated backhaul station were lost (68 of 100 echo requests
arrived), while the AP counted no failed transmission. A new association did
not clear it; a full wifi down/up did.

Move the decision of bss_macaddr_next() into bss_mld_addr(). The keep loop
of iface_restart() skips a link whose previous address is not the MLD
address, so the link gets the MLD address. Step 2 takes the restart path in
the same case. A link that already has the MLD address stays in place, and
plain BSSes, links on other radios and static addresses keep the old
behaviour.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-09-29 17:29:25 +02:00
..