[PATCH 35/44] FT: check destination mac addr on RRB receive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michael Braun <michael-dev@xxxxxxxxxxxxx>

As the linux variant of l2_packet_init does not use its own_addr argument
and l2_packet_receive does not filter on destination mac, this needs to be
checked in the callback.

If there are multiple BSS listening for FT RRB packets, all their BSSID
need to be local to the bridge interface. As l2_packet_init is going to
receive all of them going for any local address, those RRB messages
started turning up on BSS not destinated for and least cluttering logs.

Signed-off-by: Michael Braun <michael-dev@xxxxxxxxxxxxx>
---
 src/ap/wpa_auth_glue.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c
index 116c4fb..69aba7b 100644
--- a/src/ap/wpa_auth_glue.c
+++ b/src/ap/wpa_auth_glue.c
@@ -775,6 +775,9 @@ static void hostapd_rrb_receive(void *ctx, const u8 *src_addr, const u8 *buf,
 	ethhdr = (struct l2_ethhdr *) buf;
 	wpa_printf(MSG_DEBUG, "FT: RRB received packet " MACSTR " -> "
 		   MACSTR, MAC2STR(ethhdr->h_source), MAC2STR(ethhdr->h_dest));
+	if ((!is_multicast_ether_addr(ethhdr->h_dest)) &&
+	    (os_memcmp(hapd->own_addr, ethhdr->h_dest, ETH_ALEN) != 0))
+		return;
 	wpa_ft_rrb_rx(hapd->wpa_auth, ethhdr->h_source, buf + sizeof(*ethhdr),
 		      len - sizeof(*ethhdr));
 }
-- 
1.9.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux