hostap/src/ap
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
..
accounting.c Fix spelling of initialize in a comment and an error message 2015-06-10 12:02:46 +03:00
accounting.h Add Acct-Session-Id into Access-Request messages 2012-12-18 18:13:31 +02:00
acs.c ACS: Scan only channels specified in the channel list 2015-05-24 10:38:27 +03:00
acs.h Move declaration of hostapd_acs_completed() into correct header file 2013-12-31 19:34:43 +02:00
ap_config.c hostapd: check validity of cwMin/cwMax values 2015-05-07 20:57:32 +03:00
ap_config.h Fix removal of tagged interface and bridge when multiple BSS share them 2015-06-14 13:33:07 +03:00
ap_drv_ops.c Fix pairwise cipher suite bitfields to the driver in mixed mode 2015-06-10 13:49:59 +03:00
ap_drv_ops.h atheros: Clear WPS appie during deinit 2015-03-24 15:05:43 +02:00
ap_list.c Simplify HT Operation element parsing 2015-04-22 22:05:11 +03:00
ap_list.h AP: Use monotonic time for AP list 2013-12-07 20:50:15 -08:00
ap_mlme.c Remove unused STA entry information 2014-03-15 09:57:10 +02:00
ap_mlme.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
authsrv.c Improve error messages related to EAP DB 2015-03-28 13:16:26 +02:00
authsrv.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
beacon.c Fix pairwise cipher suite bitfields to the driver in mixed mode 2015-06-10 13:49:59 +03:00
beacon.h Remove obsolete license notifications 2013-12-24 22:59:52 +02:00
bss_load.c AP: Add support for BSS load element (STA Count, Channel Utilization) 2014-10-21 23:25:48 +03:00
bss_load.h AP: Add support for BSS load element (STA Count, Channel Utilization) 2014-10-21 23:25:48 +03:00
ctrl_iface_ap.c Make VLAN ID available in STA info over control interface 2015-04-26 15:58:10 +03:00
ctrl_iface_ap.h Add STOP_AP control interface command 2015-02-08 13:35:49 +02:00
dfs.c Extend offloaded ACS QCA vendor command to support VHT 2015-03-23 12:18:05 +02:00
dfs.h DFS offload: Add main DFS handler for offloaded case 2015-03-05 17:21:30 +02:00
dhcp_snoop.c dhcp_snoop: Make IPv4 addresses human readable in debug log 2015-01-30 18:55:22 +02:00
dhcp_snoop.h AP: Add support for Proxy ARP, DHCP snooping mechanism 2014-10-28 01:08:29 +02:00
drv_callbacks.c Extend hw_mode to support any band for offloaded ACS case 2015-05-27 12:17:57 +03:00
eap_user_db.c Improve error messages related to EAP DB 2015-03-28 13:16:26 +02:00
gas_serv.c Use os_calloc() instead of os_zalloc() 2014-12-08 11:42:07 +02:00
gas_serv.h GAS server: Remove incomplete remote ANQP processing 2014-03-13 21:12:39 +02:00
hostapd.c Replace HOSTAPD_MAX_SSID_LEN with SSID_MAX_LEN 2015-04-22 11:44:18 +03:00
hostapd.h Fix removal of tagged interface and bridge when multiple BSS share them 2015-06-14 13:33:07 +03:00
hs20.c HS 2.0R2 AP: Add support for deauthentication request 2014-02-26 01:24:24 +02:00
hs20.h HS 2.0R2 AP: Add support for deauthentication request 2014-02-26 01:24:24 +02:00
hw_features.c hostapd: Make sure band selection does not result in NULL dereference 2015-06-02 20:06:49 +03:00
hw_features.h hostapd: Fix some compilation errors 2015-03-29 20:51:14 +03:00
iapp.c IAPP: Avoid warnings on unused write 2014-10-11 18:03:38 +03:00
iapp.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
ieee802_1x.c Do not use C++ reserved words as variable names 2015-04-26 13:36:55 +03:00
ieee802_1x.h ERP: Add ERP_FLUSH for hostapd 2014-12-14 15:47:04 +02:00
ieee802_11.c Check Public Action length explicitly before reading Action Code 2015-05-03 16:33:08 +03:00
ieee802_11.h Simplify VHT Capabilities element parsing 2015-04-22 22:05:11 +03:00
ieee802_11_auth.c vlan: Verify RADIUS returned VLAN-ID and dynamic_vlan=required 2015-04-25 10:28:19 +03:00
ieee802_11_auth.h Use a shared function for freeing PSK list 2012-11-25 18:01:55 +02:00
ieee802_11_ht.c Simplify HT Capabilities element parsing 2015-04-22 22:05:11 +03:00
ieee802_11_shared.c AP: Add support for Proxy ARP, DHCP snooping mechanism 2014-10-28 01:08:29 +02:00
ieee802_11_vht.c Simplify VHT Capabilities element parsing 2015-04-22 22:05:11 +03:00
Makefile tests: Add ap-mgmt-fuzzer 2015-04-22 11:44:19 +03:00
ndisc_snoop.c Make IPv6 NA multicast-to-unicast conversion configurable 2015-04-27 12:30:09 +03:00
ndisc_snoop.h proxyarp: Use C library header files and CONFIG_IPV6 2014-11-25 16:58:21 +02:00
p2p_hostapd.c Use P2P_IE_VENDOR_TYPE more consistently 2014-03-05 23:36:54 +02:00
p2p_hostapd.h Remove the GPL notification from files contributed by Atheros 2012-02-11 19:39:36 +02:00
peerkey_auth.c PeerKey: Clean up EAPOL-Key Key Data processing on AP 2014-11-23 21:03:40 +02:00
pmksa_cache_auth.c Add Suite B 192-bit AKM 2015-01-27 01:43:52 +02:00
pmksa_cache_auth.h RADIUS DAS: Allow PMKSA cache entry to be removed without association 2015-01-16 15:55:39 +02:00
preauth_auth.c Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
preauth_auth.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
sta_info.c Remove unused leftover from multi-SSID design 2015-04-22 11:17:32 +03:00
sta_info.h Remove unused leftover from multi-SSID design 2015-04-22 11:17:32 +03:00
tkip_countermeasures.c AP: Use monotonic time for MMIC failure/TKIP countermeasures 2013-12-24 07:13:34 +02:00
tkip_countermeasures.h hostapd: Fix a regression in TKIP countermeasures processing 2012-11-18 13:06:03 +02:00
utils.c Print debug entry on STA pruning from other interfaces 2015-04-13 17:08:10 +03:00
vlan_init.c Fix removal of tagged interface and bridge when multiple BSS share them 2015-06-14 13:33:07 +03:00
vlan_init.h Remove unused leftover from multi-SSID design 2015-04-22 11:17:32 +03:00
vlan_util.c vlan: Print libnl error message on vlan_add / vlan_del 2015-05-07 20:54:26 +03:00
vlan_util.h Add option to use netlink to create and remove VLAN interfaces 2012-08-10 14:09:05 +03:00
wmm.c AP WMM: Fix integer underflow in WMM Action frame parser 2015-05-03 18:26:50 +03:00
wmm.h Remove obsolete license notifications 2013-12-24 22:59:52 +02:00
wnm_ap.c WNM: Fix possible memory leak by free buf 2015-01-20 02:14:19 +02:00
wnm_ap.h Add BSS_TM_REQ command to send BSS Transition Management Request 2014-11-22 16:34:34 +02:00
wpa_auth.c Remove WPA per-VLAN groups when no more stations remain 2015-04-26 16:56:22 +03:00
wpa_auth.h Replace SSID_LEN with SSID_MAX_LEN 2015-04-22 11:44:19 +03:00
wpa_auth_ft.c FT: Fix WMM TSPEC validation in driver-based AP MLME case 2015-04-22 11:44:19 +03:00
wpa_auth_glue.c Replace SSID_LEN with SSID_MAX_LEN 2015-04-22 11:44:19 +03:00
wpa_auth_glue.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
wpa_auth_i.h Remove WPA per-VLAN groups when no more stations remain 2015-04-26 16:56:22 +03:00
wpa_auth_ie.c Add Suite B 192-bit AKM 2015-01-27 01:43:52 +02:00
wpa_auth_ie.h HS 2.0R2 AP: Add OSEN implementation 2014-02-26 01:24:24 +02:00
wps_hostapd.c WPS: Add support for 60 GHz band 2015-04-28 00:22:16 +03:00
wps_hostapd.h WPS NFC: Add AP mode connection handover report 2014-01-27 21:10:55 +02:00
x_snoop.c AP: Enable multicast snooping on bridge if ProxyARP IPv6 is in use 2015-04-13 14:00:32 +03:00
x_snoop.h AP: Add multicast-to-unicast conversion send for "x_snoop" 2014-11-19 16:25:13 +02:00