mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 11:22:50 +00:00
Some checks failed
Build OpenWrt/uCentral images / build (cig_wf186h) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf186w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf188n) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf189) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf196) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-a1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-b1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap102) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap104) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap105) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap111) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap112) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_3) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xe) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (indio_um-305ax) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sercomm_ap72tip) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630c-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-211g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-id2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-od2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr5018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018-v4) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax820) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax840) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap640) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap650) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap655) (push) Has been cancelled
Build OpenWrt/uCentral images / trigger-testing (push) Has been cancelled
Build OpenWrt/uCentral images / create-x64_vm-ami (push) Has been cancelled
Signed-off-by: John Crispin <john@phrozen.org>
67 lines
2.4 KiB
Diff
67 lines
2.4 KiB
Diff
--- a/src/ap/ap_config.h
|
|
+++ b/src/ap/ap_config.h
|
|
@@ -284,6 +284,7 @@ struct hostapd_bss_config {
|
|
char iface[IFNAMSIZ + 1];
|
|
char bridge[IFNAMSIZ + 1];
|
|
char ft_iface[IFNAMSIZ + 1];
|
|
+ char snoop_iface[IFNAMSIZ + 1];
|
|
char vlan_bridge[IFNAMSIZ + 1];
|
|
char wds_bridge[IFNAMSIZ + 1];
|
|
int bridge_hairpin; /* hairpin_mode on bridge members */
|
|
--- a/src/ap/x_snoop.c
|
|
+++ b/src/ap/x_snoop.c
|
|
@@ -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] &&
|
|
+ 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;
|
|
@@ -54,7 +56,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;
|
|
@@ -73,8 +76,12 @@ x_snoop_get_l2_packet(struct hostapd_dat
|
|
{
|
|
struct hostapd_bss_config *conf = hapd->conf;
|
|
struct l2_packet_data *l2;
|
|
+ const char *ifname = conf->bridge;
|
|
|
|
- l2 = l2_packet_init(conf->bridge, NULL, ETH_P_ALL, handler, hapd, 1);
|
|
+ if (conf->snoop_iface[0])
|
|
+ ifname = conf->snoop_iface;
|
|
+
|
|
+ l2 = l2_packet_init(ifname, NULL, ETH_P_ALL, handler, hapd, 1);
|
|
if (l2 == NULL) {
|
|
wpa_printf(MSG_DEBUG,
|
|
"x_snoop: Failed to initialize L2 packet processing %s",
|
|
--- a/hostapd/config_file.c
|
|
+++ b/hostapd/config_file.c
|
|
@@ -2322,6 +2322,8 @@ static int hostapd_config_fill(struct ho
|
|
os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge));
|
|
} else if (os_strcmp(buf, "bridge_hairpin") == 0) {
|
|
bss->bridge_hairpin = atoi(pos);
|
|
+ } else if (os_strcmp(buf, "snoop_iface") == 0) {
|
|
+ os_strlcpy(bss->snoop_iface, pos, sizeof(bss->snoop_iface));
|
|
} else if (os_strcmp(buf, "vlan_bridge") == 0) {
|
|
os_strlcpy(bss->vlan_bridge, pos, sizeof(bss->vlan_bridge));
|
|
} else if (os_strcmp(buf, "wds_bridge") == 0) {
|