From df131d4597ec27db8593cf714d1d527fa70ab31d Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 28 Nov 2014 18:36:40 +0200 Subject: [PATCH] proxyarp: Try multicast-to-unicast conversion only for authorized STAs There is no point in trying to send the unicast converted version to a STA that is not in authorized state since the driver would be expected to drop normal TX Data frames in such state. Signed-off-by: Jouni Malinen --- src/ap/dhcp_snoop.c | 5 ++++- src/ap/ndisc_snoop.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ap/dhcp_snoop.c b/src/ap/dhcp_snoop.c index c5e37fb4f..0f62eb7ac 100644 --- a/src/ap/dhcp_snoop.c +++ b/src/ap/dhcp_snoop.c @@ -130,9 +130,12 @@ static void handle_dhcp(void *ctx, const u8 *src_addr, const u8 *buf, } if (hapd->conf->disable_dgaf && is_broadcast_ether_addr(buf)) { - for (sta = hapd->sta_list; sta; sta = sta->next) + for (sta = hapd->sta_list; sta; sta = sta->next) { + if (!(sta->flags & WLAN_STA_AUTHORIZED)) + continue; x_snoop_mcast_to_ucast_convert_send(hapd, sta, (u8 *) buf, len); + } } } diff --git a/src/ap/ndisc_snoop.c b/src/ap/ndisc_snoop.c index 39d15c7fb..cfd90a2c6 100644 --- a/src/ap/ndisc_snoop.c +++ b/src/ap/ndisc_snoop.c @@ -136,6 +136,8 @@ static void handle_ndisc(void *ctx, const u8 *src_addr, const u8 *buf, /* fall through */ case NEIGHBOR_ADVERTISEMENT: for (sta = hapd->sta_list; sta; sta = sta->next) { + if (!(sta->flags & WLAN_STA_AUTHORIZED)) + continue; x_snoop_mcast_to_ucast_convert_send(hapd, sta, (u8 *) buf, len); }