1 From ad694836b2ded6b97b426bf331627537cdbff591 Mon Sep 17 00:00:00 2001
2 From: David Bauer <mail@david-bauer.net>
3 Date: Thu, 19 Aug 2021 00:52:04 +0200
4 Subject: [PATCH] proxyarp: fix compilation with Hotspot 2.0 disabled
6 The disable_dgaf config fiels is only available in case Hostapd is
7 compiled with Hotspot 2.0 support, however Proxy-ARP does not depend on
10 Only add the code related to this config field when Hotspot 2.0 is
11 enabled to fix compilation with the aformentioned preconditions.
13 Signed-off-by: David Bauer <mail@david-bauer.net>
15 src/ap/dhcp_snoop.c | 2 ++
16 src/ap/ndisc_snoop.c | 2 ++
17 2 files changed, 4 insertions(+)
19 --- a/src/ap/dhcp_snoop.c
20 +++ b/src/ap/dhcp_snoop.c
21 @@ -88,6 +88,7 @@ static void handle_dhcp(void *ctx, const
26 if (hapd->conf->disable_dgaf && is_broadcast_ether_addr(buf)) {
27 for (sta = hapd->sta_list; sta; sta = sta->next) {
28 if (!(sta->flags & WLAN_STA_AUTHORIZED))
29 @@ -96,6 +97,7 @@ static void handle_dhcp(void *ctx, const
35 if (msgtype == DHCPACK) {
37 --- a/src/ap/ndisc_snoop.c
38 +++ b/src/ap/ndisc_snoop.c
39 @@ -151,10 +151,12 @@ static void handle_ndisc(void *ctx, cons
44 case ROUTER_ADVERTISEMENT:
45 if (hapd->conf->disable_dgaf)
46 ucast_to_stas(hapd, buf, len);
49 case NEIGHBOR_ADVERTISEMENT:
50 if (hapd->conf->na_mcast_to_ucast)
51 ucast_to_stas(hapd, buf, len);