]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
proxyarp: Try multicast-to-unicast conversion only for authorized STAs
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 28 Nov 2014 16:36:40 +0000 (18:36 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 28 Nov 2014 20:36:56 +0000 (22:36 +0200)
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 <jouni@qca.qualcomm.com>
src/ap/dhcp_snoop.c
src/ap/ndisc_snoop.c

index c5e37fb4fb0ff830b7860e85757d9cf0a496f8d2..0f62eb7ac6816bccca6a0233880aa5f3c4d7f8db 100644 (file)
@@ -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);
+               }
        }
 }
 
index 39d15c7fb9093d4df2ca62fe28bcb5a4981d6c29..cfd90a2c60e0c7cdc054716ed982cd5212d18e58 100644 (file)
@@ -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);
                }