Message ID | 20191213083028.4082-2-bryanwang@synology.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/2] FT: Fix hostapd_wpa_auth_oui_iter iteration for multicast packet | expand |
Am 13.12.19 um 09:30 schrieb Jinglin Wang: > Fast BSS Transition requires related AP operating in the same mobility > domain. Therefore, we can check whether local managed BSS is operating > the same mobility domain before sending multicast/unicast messages to > it. While we can do this, it makes testing the mobility domain check in the network receive path more complicated. What is the relevant benefit of this change? Regards, M. Braun
If you have multiple interfaces in one single instance, you can save multiple eloop iterations that call back to those interfaces' rx, if the packet is multicast. I think the memory allocation, copy, linked-list op, and eloop registration might take more time if we didn't compare? For example, a tri-band device with mesh capability, there will be at least 2 backhauls and 3 fronthuals. Other features like guest network and multiple SSID might have more interfaces involved, depends on their driver. But I think you're right, we should not make the path more complicated. Perhaps we should compare only if it's multicast? What are your thoughts on this? On 2019-12-14 23:59, M. Braun <michael-dev@fami-braun.de> wrote: > While we can do this, it makes testing the mobility domain check in the > network receive path more complicated. What is the relevant benefit of > this change?
diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c index 7061c2155..85b77f75e 100644 --- a/src/ap/wpa_auth_glue.c +++ b/src/ap/wpa_auth_glue.c @@ -717,6 +717,11 @@ static int hostapd_wpa_auth_oui_iter(struct hostapd_iface *iface, void *ctx) hapd = iface->bss[j]; if (hapd == idata->src_hapd) continue; + if (os_memcmp(hapd->conf->mobility_domain, + idata->src_hapd->conf->mobility_domain, + MOBILITY_DOMAIN_ID_LEN) != 0) { + continue; + } if (!is_multicast_ether_addr(idata->dst_addr) && os_memcmp(hapd->own_addr, idata->dst_addr, ETH_ALEN) != 0) continue;