aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-07-25 19:52:27 +0300
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:19:55 -0600
commit2d13cad04acae94b2d3991e432c62b36abe9509d (patch)
tree46b92192bca030ffe5f5df9d2467df69d91c4ef1 /hostapd
parentcc8915600ad4b8bae41a5b37193f3684e9974707 (diff)
downloadandroid_external_wpa_supplicant_8-2d13cad04acae94b2d3991e432c62b36abe9509d.tar.gz
android_external_wpa_supplicant_8-2d13cad04acae94b2d3991e432c62b36abe9509d.tar.bz2
android_external_wpa_supplicant_8-2d13cad04acae94b2d3991e432c62b36abe9509d.zip
FST: Do not replace previous attachment
hapd->iface->fst must not be overridden if it is already pointing to FST instance. Without this, duplicated FST-ATTACH could result in memory leak and process termination. Change-Id: Ib2f13d8661c8561b2bf75e821a9bd6621c10c94b Signed-off-by: Jouni Malinen <j@w1.fi> Git-commit: ff7a4bd13fe4a0058c5b865d390a7d57646a8d1e Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 891455
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/ctrl_iface.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index f9e317e5..ea8e0f8f 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -2479,6 +2479,10 @@ hostapd_global_ctrl_iface_fst_attach(struct hapd_interfaces *interfaces,
if (!fst_parse_attach_command(cmd, ifname, sizeof(ifname), &cfg)) {
hapd = hostapd_get_iface(interfaces, ifname);
if (hapd) {
+ if (hapd->iface->fst) {
+ wpa_printf(MSG_INFO, "FST: Already attached");
+ return -1;
+ }
fst_hostapd_fill_iface_obj(hapd, &iface_obj);
hapd->iface->fst = fst_attach(ifname, hapd->own_addr,
&iface_obj, &cfg);