hostapd: update to 2022-07-29
[openwrt/openwrt.git] / package / network / services / hostapd / patches / 740-snoop_iface.patch
index 2ed73750ca2dccfea1e9df2b20fcf878a1927f3b..608f15a2564f091dcca0f0efe61c5092ff5e0a12 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -278,6 +278,7 @@ struct hostapd_bss_config {
+@@ -284,6 +284,7 @@ struct hostapd_bss_config {
        char iface[IFNAMSIZ + 1];
        char bridge[IFNAMSIZ + 1];
        char ft_iface[IFNAMSIZ + 1];
        char iface[IFNAMSIZ + 1];
        char bridge[IFNAMSIZ + 1];
        char ft_iface[IFNAMSIZ + 1];
@@ -10,9 +10,9 @@
  
 --- a/src/ap/x_snoop.c
 +++ b/src/ap/x_snoop.c
  
 --- a/src/ap/x_snoop.c
 +++ b/src/ap/x_snoop.c
-@@ -31,14 +31,16 @@ int x_snoop_init(struct hostapd_data *ha
-               return -1;
-       }
+@@ -33,14 +33,16 @@ int x_snoop_init(struct hostapd_data *ha
+       hapd->x_snoop_initialized = true;
  
 -      if (hostapd_drv_br_port_set_attr(hapd, DRV_BR_PORT_ATTR_HAIRPIN_MODE,
 +      if (!conf->snoop_iface[0] &&
  
 -      if (hostapd_drv_br_port_set_attr(hapd, DRV_BR_PORT_ATTR_HAIRPIN_MODE,
 +      if (!conf->snoop_iface[0] &&
@@ -29,7 +29,7 @@
                wpa_printf(MSG_DEBUG,
                           "x_snoop: Failed to enable proxyarp on the bridge port");
                return -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
+@@ -54,7 +56,8 @@ int x_snoop_init(struct hostapd_data *ha
        }
  
  #ifdef CONFIG_IPV6
        }
  
  #ifdef CONFIG_IPV6
@@ -39,7 +39,7 @@
                wpa_printf(MSG_DEBUG,
                           "x_snoop: Failed to enable multicast snooping on the bridge");
                return -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
+@@ -73,8 +76,12 @@ x_snoop_get_l2_packet(struct hostapd_dat
  {
        struct hostapd_bss_config *conf = hapd->conf;
        struct l2_packet_data *l2;
  {
        struct hostapd_bss_config *conf = hapd->conf;
        struct l2_packet_data *l2;
@@ -55,7 +55,7 @@
                           "x_snoop: Failed to initialize L2 packet processing %s",
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
                           "x_snoop: Failed to initialize L2 packet processing %s",
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -2360,6 +2360,8 @@ static int hostapd_config_fill(struct ho
+@@ -2318,6 +2318,8 @@ static int hostapd_config_fill(struct ho
                os_strlcpy(bss->bridge, pos, sizeof(bss->bridge));
                if (!bss->wds_bridge[0])
                        os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge));
                os_strlcpy(bss->bridge, pos, sizeof(bss->bridge));
                if (!bss->wds_bridge[0])
                        os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge));