diff options
author | Jouni Malinen <j@w1.fi> | 2009-11-21 22:00:33 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2009-11-21 22:00:33 +0200 |
commit | 3c2166d63c3f8db9699bd29b152121ca63c70415 (patch) | |
tree | f9983e856b6d8ce402b0a61e5b54001d98d068aa /src/wps | |
parent | 247500cab70f49f027d0694e78f9be408981307b (diff) | |
download | external_wpa_supplicant_8_ti-3c2166d63c3f8db9699bd29b152121ca63c70415.zip external_wpa_supplicant_8_ti-3c2166d63c3f8db9699bd29b152121ca63c70415.tar.gz external_wpa_supplicant_8_ti-3c2166d63c3f8db9699bd29b152121ca63c70415.tar.bz2 |
WPS: Do not try to send byebye advertisements if socket is not valid
If initialization fails, we could potentially try to sendto() on -1
socket which would fail. No point in doing that, so just return early
from the function.
Diffstat (limited to 'src/wps')
-rw-r--r-- | src/wps/wps_upnp_ssdp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wps/wps_upnp_ssdp.c b/src/wps/wps_upnp_ssdp.c index 93706ea..d48bfdb 100644 --- a/src/wps/wps_upnp_ssdp.c +++ b/src/wps/wps_upnp_ssdp.c @@ -239,7 +239,7 @@ void advertisement_state_machine_stop(struct upnp_wps_device_sm *sm, struct sockaddr_in dest; eloop_cancel_timeout(advertisement_state_machine_handler, NULL, sm); - if (!send_byebye) + if (!send_byebye || sm->multicast_sd < 0) return; a->type = ADVERTISE_DOWN; |