Post CVE-2020-12695 cleanup patch:

Resolve a Linuxism to fix the build.

MFC after:	3 days
X-MFC with:	r361957, r361958, r361959
This commit is contained in:
Cy Schubert 2020-06-09 05:43:51 +00:00
parent 7d748adc91
commit ee7b7f3f05
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=361960

View File

@ -950,7 +950,11 @@ int get_netif_info(const char *net_if, unsigned *ip_addr, char **ip_addr_text,
errno, strerror(errno));
goto fail;
}
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
addr = (struct sockaddr_in *) &req.ifr_addr;
#else
addr = (struct sockaddr_in *) &req.ifr_netmask;
#endif
netmask->s_addr = addr->sin_addr.s_addr;
}