hostap/src
Michael Braun 132dfbe8c2 Fix removal of tagged interface and bridge when multiple BSS share them
Currently, if multiple bss share are bridge and tagged vlan interface,
only the first instance of struct hostapd_vlan for this vlanid will have
the DVLAN_CLEAN_VLAN flag added. Thus, when this instance is removed,
the tagged vlan interface will be removed from bridge, thought other bss
might still need it. Similarily, the bridge will be left over, as the
does not have zero ports when the first instance of a struct
hostapd_vlan is freed.

This patch fixes this by having a global (per process) reference counter
for dynamic tagged vlan and dynamically created bridge interfaces, so
they are only removed after all local users are freed. (struct
hapd_interfaces *)->vlan_priv is used to hold src/ap/vlan_init.c global
per-process data like drv_priv does; right now this is only used for the
interface reference counting, but could get extended when needed. Then
possibly some vlan_global_init / vlan_global_deinit should be added, but
this is not required right now.

Additionally, vlan->configured is checked to avoid reference counter
decreasing before vlan_newlink increased them.

In order to avoid race conditions, vlan_dellink is called explicitly
after hostapd_vlan_if_remove. Otherwise there would be a short timeframe
between hostapd_vlan_if_remove and vlan_dellink during which the struct
hostapd_vlan still exists, so ap_sta_bind_vlan would try to attach
stations to it.

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2015-06-14 13:33:07 +03:00
..
ap Fix removal of tagged interface and bridge when multiple BSS share them 2015-06-14 13:33:07 +03:00
common P2P: Add Operating class 125 for P2P supported channels 2015-06-12 20:39:49 +03:00
crypto OpenSSL: Fix build iwth OpenSSL 0.9.8 2015-06-06 17:15:47 +03:00
drivers Extend hw_mode to support any band for offloaded ACS case 2015-05-27 12:17:57 +03:00
eap_common EAP-SAKE: Make attribute parser more readable 2015-05-03 16:32:50 +03:00
eap_peer EAP-EKE: Add Session-Id 2015-05-24 11:58:45 +03:00
eap_server EAP-EKE: Add Session-Id 2015-05-24 11:58:45 +03:00
eapol_auth Declare all read only data structures as const 2015-04-25 17:33:06 +03:00
eapol_supp Declare all read only data structures as const 2015-04-25 17:33:06 +03:00
l2_packet tests: Add eapol-fuzzer 2015-04-22 11:44:19 +03:00
p2p P2P: Add Operating class 125 for P2P supported channels 2015-06-12 20:39:49 +03:00
pae MACsec: Update protect frames and replay on reauthentication 2014-12-09 16:56:10 +02:00
radius RADIUS: Fix a copy-paste error in variable name 2015-04-29 12:08:27 +03:00
rsn_supp Simplify VHT Capabilities element parsing 2015-04-22 22:05:11 +03:00
tls libtommath: Fix check mp_init_multi() result 2015-05-03 16:53:59 +03:00
utils Document the wpa_msg_cb "global" parameter 2015-06-10 16:02:00 +03:00
wps WPS: Add more debug prints to httpread 2015-05-03 18:26:50 +03:00
lib.rules Add QUIET=1 option for make 2014-12-29 15:49:05 +02:00
Makefile MACsec: Add PAE implementation 2014-05-09 20:42:44 +03:00