Add conditional for FreeBSD to use the correct structure element for address

This commit is contained in:
Ryan Steinmetz 2019-03-29 09:51:45 -04:00
parent 08e8f7667d
commit 2a9f3d981f
No known key found for this signature in database
GPG Key ID: D2C3D2B2FEF36DD7

View File

@ -1941,7 +1941,11 @@ ProbeInterfaces(in_addr_t bindAddr)
if ((ifc.ifc_len - r) < sizeof(*ifr))
break;
# ifdef HAVE_SA_LEN
# ifdef __FreeBSD__
if (sa->sa_len > sizeof(ifr->ifr_addr))
# else
if (sa->sa_len > sizeof(ifr->ifr_ifru))
# endif
r += sizeof(ifr->ifr_name) + sa->sa_len;
else
# endif