aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-03-26 09:41:36 (GMT)
committerJouni Malinen <j@w1.fi>2017-03-26 18:13:21 (GMT)
commita5269dc209a417732fab6e8e36e5602a6f751662 (patch)
tree321c0dc5b04ca83f8167efe0f3bf334fd0d66822
parente2f00bb5ff5243024a2809dba2f264ea3714583e (diff)
downloadhostap-a5269dc209a417732fab6e8e36e5602a6f751662.zip
hostap-a5269dc209a417732fab6e8e36e5602a6f751662.tar.gz
hostap-a5269dc209a417732fab6e8e36e5602a6f751662.tar.bz2
wpa_helpers: Ignore link-local IPv4 address while waiting for DHCP
Do not accept a link-local IPv4 address when waiting for a valid DHCP address. This helps with hs20-osu-client use cases where DHCP response has not yet been received. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--src/common/wpa_helpers.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/wpa_helpers.c b/src/common/wpa_helpers.c
index f159421..8e1c09e 100644
--- a/src/common/wpa_helpers.c
+++ b/src/common/wpa_helpers.c
@@ -222,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)