aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2021-09-01 19:12:27 +0200
committerFelix Fietkau <nbd@nbd.name>2021-11-23 18:30:04 +0100
commit4a53adbd43698249b434050757f3506c65dee41b (patch)
tree95ad2ec62d0129efdf017b726bb5a1e9717d9416 /package/network/services/hostapd
parent345f8fc7f33843ea1cc2a1741409bc53a57120e5 (diff)
downloadupstream-4a53adbd43698249b434050757f3506c65dee41b.tar.gz
upstream-4a53adbd43698249b434050757f3506c65dee41b.tar.bz2
upstream-4a53adbd43698249b434050757f3506c65dee41b.zip
hostapd: let netifd set bridge port attributes for snooping
Avoids race conditions on bridge member add/remove Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry-picked from commit 17d19a7d4398789ae8da3daf8e0db167d58b0782)
Diffstat (limited to 'package/network/services/hostapd')
-rw-r--r--package/network/services/hostapd/patches/740-snoop_iface.patch31
1 files changed, 30 insertions, 1 deletions
diff --git a/package/network/services/hostapd/patches/740-snoop_iface.patch b/package/network/services/hostapd/patches/740-snoop_iface.patch
index 722d1e713a..8d928f8505 100644
--- a/package/network/services/hostapd/patches/740-snoop_iface.patch
+++ b/package/network/services/hostapd/patches/740-snoop_iface.patch
@@ -10,7 +10,36 @@
--- a/src/ap/x_snoop.c
+++ b/src/ap/x_snoop.c
-@@ -71,8 +71,12 @@ x_snoop_get_l2_packet(struct hostapd_dat
+@@ -31,14 +31,16 @@ int x_snoop_init(struct hostapd_data *ha
+ return -1;
+ }
+
+- if (hostapd_drv_br_port_set_attr(hapd, DRV_BR_PORT_ATTR_HAIRPIN_MODE,
++ if (!conf->snoop_iface[0] &&
++ hostapd_drv_br_port_set_attr(hapd, DRV_BR_PORT_ATTR_HAIRPIN_MODE,
+ 1)) {
+ wpa_printf(MSG_DEBUG,
+ "x_snoop: Failed to enable hairpin_mode on the bridge port");
+ return -1;
+ }
+
+- if (hostapd_drv_br_port_set_attr(hapd, DRV_BR_PORT_ATTR_PROXYARP, 1)) {
++ if (!conf->snoop_iface[0] &&
++ hostapd_drv_br_port_set_attr(hapd, DRV_BR_PORT_ATTR_PROXYARP, 1)) {
+ wpa_printf(MSG_DEBUG,
+ "x_snoop: Failed to enable proxyarp on the bridge port");
+ return -1;
+@@ -52,7 +54,8 @@ int x_snoop_init(struct hostapd_data *ha
+ }
+
+ #ifdef CONFIG_IPV6
+- if (hostapd_drv_br_set_net_param(hapd, DRV_BR_MULTICAST_SNOOPING, 1)) {
++ if (!conf->snoop_iface[0] &&
++ hostapd_drv_br_set_net_param(hapd, DRV_BR_MULTICAST_SNOOPING, 1)) {
+ wpa_printf(MSG_DEBUG,
+ "x_snoop: Failed to enable multicast snooping on the bridge");
+ return -1;
+@@ -71,8 +74,12 @@ x_snoop_get_l2_packet(struct hostapd_dat
{
struct hostapd_bss_config *conf = hapd->conf;
struct l2_packet_data *l2;