(find_all_addresses): try to use SA_LEN to step over addresses if
there's no `sa_lan' field git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6537 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -168,11 +168,9 @@ find_all_addresses (krb5_context context,
|
||||
#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
|
||||
sz = max(sz, sizeof(ifr->ifr_name) + sa->sa_len);
|
||||
#endif
|
||||
#ifdef HAVE_IPV6
|
||||
if (sa->sa_family == AF_INET6)
|
||||
sz = max(sz, sizeof(ifr->ifr_name) + sizeof(struct sockaddr_in6));
|
||||
#ifdef SA_LEN
|
||||
sz = max(sz, SA_LEN(sa));
|
||||
#endif
|
||||
|
||||
memcpy (ifreq.ifr_name, ifr->ifr_name, sizeof(ifr->ifr_name));
|
||||
|
||||
if (ioctl(fd, siocgifflags, &ifreq) < 0) {
|
||||
|
Reference in New Issue
Block a user