IBSS: Check ibss_rsn init before starting new IBSS authentication

Sanity check added to avoid segmentation fault which occurs, when
issuing ibss_rsn ctrl iface cmd and IBSS was not initialized previously
via IBSS network selection.

Signed-off-by: Eduardo Abinader <eduardo.abinader@openbossa.org>
This commit is contained in:
Eduardo Abinader 2015-05-01 10:14:16 -04:00 committed by Jouni Malinen
parent 74d912f134
commit 01e87ef64f

View file

@ -571,6 +571,9 @@ int ibss_rsn_start(struct ibss_rsn *ibss_rsn, const u8 *addr)
struct ibss_rsn_peer *peer;
int res;
if (!ibss_rsn)
return -1;
/* if the peer already exists, exit immediately */
peer = ibss_rsn_get_peer(ibss_rsn, addr);
if (peer)