From: Arik Nemtsov Date: Wed, 25 Jun 2014 14:41:54 +0000 (+0300) Subject: TDLS: Abort local setup when failing to add STA X-Git-Tag: hostap_2_3~236 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81905409b53a4c2be4e97735856b7af26be93b48;p=thirdparty%2Fhostap.git TDLS: Abort local setup when failing to add STA The driver might not always be able to add the new station. Abort the setup when this happens. Signed-off-by: Arik Nemtsov --- diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c index c1d0c62f7..2a6ecc645 100644 --- a/src/rsn_supp/tdls.c +++ b/src/rsn_supp/tdls.c @@ -2527,8 +2527,11 @@ int wpa_tdls_start(struct wpa_sm *sm, const u8 *addr) peer->initiator = 1; /* add the peer to the driver as a "setup in progress" peer */ - wpa_sm_tdls_peer_addset(sm, peer->addr, 1, 0, 0, NULL, 0, NULL, NULL, 0, - NULL, 0, NULL, 0, NULL, 0); + if (wpa_sm_tdls_peer_addset(sm, peer->addr, 1, 0, 0, NULL, 0, NULL, + NULL, 0, NULL, 0, NULL, 0, NULL, 0)) { + wpa_tdls_disable_peer_link(sm, peer); + return -1; + } peer->tpk_in_progress = 1;