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>
This commit is contained in:
Jouni Malinen 2017-03-26 12:41:36 +03:00 committed by Jouni Malinen
parent e2f00bb5ff
commit a5269dc209

View file

@ -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)