aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2021-08-19 00:58:19 +0200
committerDavid Bauer <mail@david-bauer.net>2021-08-28 01:31:15 +0200
commit7073e88a767390c77b5fe426c2080dd392a4e932 (patch)
tree0278831a572dd204b0b90e30e0bc62486d2f0fd4 /package/network/services/hostapd
parent99786e121bf3ad049ab261c78b1ca8f022a1089f (diff)
downloadupstream-7073e88a767390c77b5fe426c2080dd392a4e932.tar.gz
upstream-7073e88a767390c77b5fe426c2080dd392a4e932.tar.bz2
upstream-7073e88a767390c77b5fe426c2080dd392a4e932.zip
hostapd: fix Proxy-ARP with Hotspot 2.0 disabled
The disable_dgaf config fiels is only available in case Hostapd is compiled with Hotspot 2.0 support, however Proxy-ARP does not depend on Hotspot 2.0. Only add the code related to this config field when Hotspot 2.0 is enabled to fix compilation with the aformentioned preconditions. Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'package/network/services/hostapd')
-rw-r--r--package/network/services/hostapd/patches/741-proxyarp-fix-compilation-with-Hotspot-2.0-disabled.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/package/network/services/hostapd/patches/741-proxyarp-fix-compilation-with-Hotspot-2.0-disabled.patch b/package/network/services/hostapd/patches/741-proxyarp-fix-compilation-with-Hotspot-2.0-disabled.patch
new file mode 100644
index 0000000000..657ef5f2ed
--- /dev/null
+++ b/package/network/services/hostapd/patches/741-proxyarp-fix-compilation-with-Hotspot-2.0-disabled.patch
@@ -0,0 +1,51 @@
+From ad694836b2ded6b97b426bf331627537cdbff591 Mon Sep 17 00:00:00 2001
+From: David Bauer <mail@david-bauer.net>
+Date: Thu, 19 Aug 2021 00:52:04 +0200
+Subject: [PATCH] proxyarp: fix compilation with Hotspot 2.0 disabled
+
+The disable_dgaf config fiels is only available in case Hostapd is
+compiled with Hotspot 2.0 support, however Proxy-ARP does not depend on
+Hotspot 2.0.
+
+Only add the code related to this config field when Hotspot 2.0 is
+enabled to fix compilation with the aformentioned preconditions.
+
+Signed-off-by: David Bauer <mail@david-bauer.net>
+---
+ src/ap/dhcp_snoop.c | 2 ++
+ src/ap/ndisc_snoop.c | 2 ++
+ 2 files changed, 4 insertions(+)
+
+--- a/src/ap/dhcp_snoop.c
++++ b/src/ap/dhcp_snoop.c
+@@ -88,6 +88,7 @@ static void handle_dhcp(void *ctx, const
+ }
+ }
+
++#ifdef CONFIG_HS20
+ if (hapd->conf->disable_dgaf && is_broadcast_ether_addr(buf)) {
+ for (sta = hapd->sta_list; sta; sta = sta->next) {
+ if (!(sta->flags & WLAN_STA_AUTHORIZED))
+@@ -96,6 +97,7 @@ static void handle_dhcp(void *ctx, const
+ (u8 *) buf, len);
+ }
+ }
++#endif
+
+ if (msgtype == DHCPACK) {
+ if (b->your_ip == 0)
+--- a/src/ap/ndisc_snoop.c
++++ b/src/ap/ndisc_snoop.c
+@@ -151,10 +151,12 @@ static void handle_ndisc(void *ctx, cons
+ return;
+ }
+ break;
++#ifdef CONFIG_HS20
+ case ROUTER_ADVERTISEMENT:
+ if (hapd->conf->disable_dgaf)
+ ucast_to_stas(hapd, buf, len);
+ break;
++#endif
+ case NEIGHBOR_ADVERTISEMENT:
+ if (hapd->conf->na_mcast_to_ucast)
+ ucast_to_stas(hapd, buf, len);