From: Stefan Paetow Date: Thu, 11 Mar 2021 18:47:36 +0000 (+0000) Subject: eapol_test: Add address family for IPv4 in Windows build X-Git-Tag: hostap_2_10~437 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e80e6a2f17db93973917a03c4cd0970b16471256;p=thirdparty%2Fhostap.git eapol_test: Add address family for IPv4 in Windows build Add the address family when manually constructing IPv4 addresses in eapol_test on Windows. Otherwise other functions, like hostapd_ip_txt() in src/utils/ip_addr.c, that rely on addr->af being set fail miserably. The non-Windows option uses hostapd_parse_ip_addr() which does this as part of the helper function. Signed-off-by: Stefan Paetow --- diff --git a/wpa_supplicant/eapol_test.c b/wpa_supplicant/eapol_test.c index 9f69736b7..d137ad6ac 100644 --- a/wpa_supplicant/eapol_test.c +++ b/wpa_supplicant/eapol_test.c @@ -1025,6 +1025,7 @@ static void wpa_init_conf(struct eapol_test_data *e, *pos++ = a[1]; *pos++ = a[2]; *pos++ = a[3]; + as->addr.af = AF_INET; } #else /* CONFIG_NATIVE_WINDOWS or CONFIG_ANSI_C_EXTRA */ if (hostapd_parse_ip_addr(authsrv, &as->addr) < 0) {