aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-02-22 22:03:00 (GMT)
committerJouni Malinen <j@w1.fi>2017-02-26 10:05:40 (GMT)
commit57a2aacabf0f20efbdcd9828206edbbc328bc7ed (patch)
tree152a5b49a60f26d702ee31f1d5f85e841e37fd2d /src
parent21ed24f5ad3b713d1174a1ce55025b7266ff878d (diff)
downloadhostap-57a2aacabf0f20efbdcd9828206edbbc328bc7ed.zip
hostap-57a2aacabf0f20efbdcd9828206edbbc328bc7ed.tar.gz
hostap-57a2aacabf0f20efbdcd9828206edbbc328bc7ed.tar.bz2
Add option to disable broadcast deauth in hostapd on AP start/stop
The new broadcast_deauth parameter can be used to disable sending of the Deauthentication frame whenever AP is started or stopped. The default behavior remains identical to the past behavior (broadcast_deauth=1). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src')
-rw-r--r--src/ap/ap_config.c2
-rw-r--r--src/ap/ap_config.h2
-rw-r--r--src/ap/hostapd.c9
3 files changed, 10 insertions, 3 deletions
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
index 9abcab7..a996ea8 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -107,6 +107,8 @@ void hostapd_config_defaults_bss(struct hostapd_bss_config *bss)
bss->dhcp_server_port = DHCP_SERVER_PORT;
bss->dhcp_relay_port = DHCP_SERVER_PORT;
#endif /* CONFIG_FILS */
+
+ bss->broadcast_deauth = 1;
}
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index fdd5a1a..cbdb786 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -617,6 +617,8 @@ struct hostapd_bss_config {
#endif /* CONFIG_FILS */
int multicast_to_unicast;
+
+ int broadcast_deauth;
};
/**
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index d05dc5c..4ae7520 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -491,9 +491,12 @@ static int hostapd_flush_old_stations(struct hostapd_data *hapd, u16 reason)
ret = -1;
}
}
- wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "Deauthenticate all stations");
- os_memset(addr, 0xff, ETH_ALEN);
- hostapd_drv_sta_deauth(hapd, addr, reason);
+ if (hapd->conf && hapd->conf->broadcast_deauth) {
+ wpa_dbg(hapd->msg_ctx, MSG_DEBUG,
+ "Deauthenticate all stations");
+ os_memset(addr, 0xff, ETH_ALEN);
+ hostapd_drv_sta_deauth(hapd, addr, reason);
+ }
hostapd_free_stas(hapd);
return ret;