aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-07-18 03:26:47 (GMT)
committerJouni Malinen <j@w1.fi>2010-07-18 16:39:15 (GMT)
commit8033b0e37ef764a8bfd712c2c2535c6b472f5049 (patch)
tree30a312880375f1a10d0cd26c1258e0c523c97a51
parent878ab3db8127c6e70d1b0a55e2f893d3e0678a49 (diff)
downloadhostap-07-8033b0e37ef764a8bfd712c2c2535c6b472f5049.zip
hostap-07-8033b0e37ef764a8bfd712c2c2535c6b472f5049.tar.gz
hostap-07-8033b0e37ef764a8bfd712c2c2535c6b472f5049.tar.bz2
Verify that l2_packet is initialized before notification call
It is possible that l2_packet is not used with wpa_supplicant in some cases, so better make sure we do not end up notifying l2_packet code about authentications unless it was actually initialized in the first place. (cherry picked from commit 3f967fe055cecf1f94c9ce43768b186b24ef4841)
-rw-r--r--wpa_supplicant/events.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index ae1d67c..0c1b3c8 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1173,7 +1173,8 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
wpa_supplicant_scard_init(wpa_s, wpa_s->current_ssid);
}
wpa_sm_notify_assoc(wpa_s->wpa, bssid);
- l2_packet_notify_auth_start(wpa_s->l2);
+ if (wpa_s->l2)
+ l2_packet_notify_auth_start(wpa_s->l2);
/*
* Set portEnabled first to FALSE in order to get EAP state machine out