From: Jouni Malinen Date: Tue, 9 Jun 2020 09:43:53 +0000 (+0300) Subject: WPS UPnP: Fix FreeBSD build X-Git-Tag: hostap_2_10~1169 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f119f8a04a5737a1fe8d0776a7c9c625cdd51298;p=thirdparty%2Fhostap.git WPS UPnP: Fix FreeBSD build struct ifreq does not include the ifr_netmask alternative on FreeBSD, so replace that more specific name with ifr_addr that works with both Linux and FreeBSD. Fixes: 5b78c8f961f2 ("WPS UPnP: Do not allow event subscriptions with URLs to other networks") Signed-off-by: Jouni Malinen --- diff --git a/src/wps/wps_upnp.c b/src/wps/wps_upnp.c index ab685d52e..16fefc77b 100644 --- a/src/wps/wps_upnp.c +++ b/src/wps/wps_upnp.c @@ -951,7 +951,7 @@ int get_netif_info(const char *net_if, unsigned *ip_addr, char **ip_addr_text, errno, strerror(errno)); goto fail; } - addr = (struct sockaddr_in *) &req.ifr_netmask; + addr = (struct sockaddr_in *) &req.ifr_addr; netmask->s_addr = addr->sin_addr.s_addr; }