summaryrefslogtreecommitdiffstats
path: root/contrib/wpa/src/common/wpa_helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/wpa/src/common/wpa_helpers.c')
-rw-r--r--contrib/wpa/src/common/wpa_helpers.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/wpa/src/common/wpa_helpers.c b/contrib/wpa/src/common/wpa_helpers.c
index 28913b9..8e1c09e 100644
--- a/contrib/wpa/src/common/wpa_helpers.c
+++ b/contrib/wpa/src/common/wpa_helpers.c
@@ -172,7 +172,8 @@ int get_wpa_status(const char *ifname, const char *field, char *obuf,
if (ctrl == NULL)
return -1;
len = sizeof(buf);
- if (wpa_ctrl_request(ctrl, "STATUS", 6, buf, &len, NULL) < 0) {
+ if (wpa_ctrl_request(ctrl, "STATUS-NO_EVENTS", 16, buf, &len,
+ NULL) < 0) {
wpa_ctrl_close(ctrl);
return -1;
}
@@ -221,7 +222,8 @@ int wait_ip_addr(const char *ifname, int timeout)
if (get_wpa_status(ifname, "ip_address", ip, sizeof(ip)) == 0
&& strlen(ip) > 0) {
printf("IP address found: '%s'\n", ip);
- return 0;
+ if (strncmp(ip, "169.254.", 8) != 0)
+ return 0;
}
ctrl = wpa_open_ctrl(ifname);
if (ctrl == NULL)
OpenPOWER on IntegriCloud