mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-17 17:43:06 -05:00
AP: Enable multicast snooping on bridge if ProxyARP IPv6 is in use
This is needed to allow correct ProxyARP behavior for IPv6. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
b79911853f
commit
60eb9e173e
src
@ -51,6 +51,14 @@ int x_snoop_init(struct hostapd_data *hapd)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_IPV6
|
||||||
|
if (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;
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_IPV6 */
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1577,6 +1577,7 @@ enum drv_br_port_attr {
|
|||||||
|
|
||||||
enum drv_br_net_param {
|
enum drv_br_net_param {
|
||||||
DRV_BR_NET_PARAM_GARP_ACCEPT,
|
DRV_BR_NET_PARAM_GARP_ACCEPT,
|
||||||
|
DRV_BR_MULTICAST_SNOOPING,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct drv_acs_params {
|
struct drv_acs_params {
|
||||||
|
@ -8307,9 +8307,9 @@ static const char * drv_br_net_param_str(enum drv_br_net_param param)
|
|||||||
switch (param) {
|
switch (param) {
|
||||||
case DRV_BR_NET_PARAM_GARP_ACCEPT:
|
case DRV_BR_NET_PARAM_GARP_ACCEPT:
|
||||||
return "arp_accept";
|
return "arp_accept";
|
||||||
}
|
default:
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -8321,6 +8321,13 @@ static int wpa_driver_br_set_net_param(void *priv, enum drv_br_net_param param,
|
|||||||
const char *param_txt;
|
const char *param_txt;
|
||||||
int ip_version = 4;
|
int ip_version = 4;
|
||||||
|
|
||||||
|
if (param == DRV_BR_MULTICAST_SNOOPING) {
|
||||||
|
os_snprintf(path, sizeof(path),
|
||||||
|
"/sys/devices/virtual/net/%s/bridge/multicast_snooping",
|
||||||
|
bss->brname);
|
||||||
|
goto set_val;
|
||||||
|
}
|
||||||
|
|
||||||
param_txt = drv_br_net_param_str(param);
|
param_txt = drv_br_net_param_str(param);
|
||||||
if (param_txt == NULL)
|
if (param_txt == NULL)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@ -8336,6 +8343,7 @@ static int wpa_driver_br_set_net_param(void *priv, enum drv_br_net_param param,
|
|||||||
os_snprintf(path, sizeof(path), "/proc/sys/net/ipv%d/conf/%s/%s",
|
os_snprintf(path, sizeof(path), "/proc/sys/net/ipv%d/conf/%s/%s",
|
||||||
ip_version, bss->brname, param_txt);
|
ip_version, bss->brname, param_txt);
|
||||||
|
|
||||||
|
set_val:
|
||||||
if (linux_write_system_file(path, val))
|
if (linux_write_system_file(path, val))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user