[PATCH 1/2] ctrl_iface: BSS command return FAIL on no data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The BSS supplicant command returns a 0 len reply when failing to
pasrse some information for a BSS.
This patch make the function wpa_supplicant_ctrl_iface_bss()
return -1 on such cases instead of 0 and therefore the BSS command
will return FAIL.
This is important since when using udp control interfaces
sending a 0 len reply does not send a reply at all and the
control interface can wait forever (or until a timeout is reached)
for a reply.

Signed-off-by: Jonathan Afek <jonathanx.afek@xxxxxxxxx>
---
 wpa_supplicant/ctrl_iface.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 2ff47cb..401cd61 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -4560,6 +4560,8 @@ static int wpa_supplicant_ctrl_iface_bss(struct wpa_supplicant *wpa_s,
 		bss = dl_list_entry(next, struct wpa_bss, list_id);
 	} while (bss && len);
 
+	if (0 == ret)
+		return -1;
 	return ret;
 }
 
-- 
1.9.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux