]> git.ipfire.org Git - thirdparty/hostap.git/commit
FT: Fix hostapd_wpa_auth_oui_iter() iteration for multicast packets
authorJinglin Wang <bryanwang@synology.com>
Fri, 13 Dec 2019 08:30:27 +0000 (16:30 +0800)
committerJouni Malinen <j@w1.fi>
Sun, 29 Dec 2019 18:09:52 +0000 (20:09 +0200)
commit4834c6869d555108b0d5673265f987c0cdad80d6
treecc099324ee51925bf8b798f9b5393df2e8225684
parent18780c6d6706ee90c98eb5f27454c1bcf7b4e1bc
FT: Fix hostapd_wpa_auth_oui_iter() iteration for multicast packets

When using FT wildcard feature, the inter-AP protocol will send
broadcast messages to discover related APs.

For example,
12/6 16:24:43 FT: Send PMK-R1 pull request to remote R0KH address
    ff:ff:ff:ff:ff:ff
12/6 16:24:43 FT: Send out sequence number request to
    ff:ff:ff:ff:ff:ff

If you have multiple interfaces/BSSs in a single hostapd process,
hostapd_wpa_auth_oui_iter() returned 1 after the first interface was
processed. Iteration in for_each_interface() will be stopped since it
gets a non-zero return value from hostapd_wpa_auth_oui_iter().

Even worse, the packet will not be sent to ethernet because
for_each_interface() returns non-zero value. hostapd_wpa_auth_send_oui()
will then return data_len immediately.

To prevent this, hostapd_wpa_auth_oui_iter() should not return 1 after
any successful transmission to other interfaces, if the dst_addr of
packet is a multicast address.

Signed-off-by: Jinglin Wang <bryanwang@synology.com>
Signed-off-by: MinHong Wang <minhongw@synology.com>
src/ap/wpa_auth_glue.c