mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 16:58:41 -05:00
vlan: Ignore multiple NEWLINK messages
hostapd receives NEWLINK messages multiple times and thus does configuration of the the vlan interface multiple times. This is not required and leads to the following during cleanup in test pmksa_cache_preauth_vlan_used: 1. run-test.py does: brctl delif brvlan1 wlan3.1 2. hostapd processes NEWLINK and does: brctl addif brvlan1 wlan3.1 3. run-test.py does: brctl delbr brvlan1 -> fails as wlan3.1 is still in the bridge This patch fixes this by ignoring repeated NEWLINK messages. Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
This commit is contained in:
parent
371205dd0c
commit
de31fb052c
@ -114,6 +114,7 @@ struct hostapd_vlan {
|
|||||||
struct hostapd_vlan *next;
|
struct hostapd_vlan *next;
|
||||||
int vlan_id; /* VLAN ID or -1 (VLAN_ID_WILDCARD) for wildcard entry */
|
int vlan_id; /* VLAN ID or -1 (VLAN_ID_WILDCARD) for wildcard entry */
|
||||||
char ifname[IFNAMSIZ + 1];
|
char ifname[IFNAMSIZ + 1];
|
||||||
|
int configured;
|
||||||
int dynamic_vlan;
|
int dynamic_vlan;
|
||||||
#ifdef CONFIG_FULL_DYNAMIC_VLAN
|
#ifdef CONFIG_FULL_DYNAMIC_VLAN
|
||||||
|
|
||||||
|
@ -485,7 +485,8 @@ static void vlan_newlink(char *ifname, struct hostapd_data *hapd)
|
|||||||
wpa_printf(MSG_DEBUG, "VLAN: vlan_newlink(%s)", ifname);
|
wpa_printf(MSG_DEBUG, "VLAN: vlan_newlink(%s)", ifname);
|
||||||
|
|
||||||
while (vlan) {
|
while (vlan) {
|
||||||
if (os_strcmp(ifname, vlan->ifname) == 0) {
|
if (os_strcmp(ifname, vlan->ifname) == 0 && !vlan->configured) {
|
||||||
|
vlan->configured = 1;
|
||||||
|
|
||||||
if (hapd->conf->vlan_bridge[0]) {
|
if (hapd->conf->vlan_bridge[0]) {
|
||||||
os_snprintf(br_name, sizeof(br_name), "%s%d",
|
os_snprintf(br_name, sizeof(br_name), "%s%d",
|
||||||
|
Loading…
Reference in New Issue
Block a user