(get_addrs_int): try the different ways sequentially instead of just
one. this helps if your heimdal was built with v6-support but your kernel doesn't have it, for example. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6806 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -240,14 +240,24 @@ static krb5_error_code
|
||||
get_addrs_int (krb5_context context, krb5_addresses *res, int loop)
|
||||
{
|
||||
krb5_error_code ret = -1;
|
||||
|
||||
#if defined(AF_INET6) && defined(SIOCGIF6CONF) && defined(SIOCGIF6FLAGS)
|
||||
ret = find_all_addresses (context, res, loop,
|
||||
AF_INET6, SIOCGIF6CONF, SIOCGIF6FLAGS,
|
||||
sizeof(struct in6_ifreq));
|
||||
#elif defined(AF_INET) && defined(SIOCGIFCONF) && defined(SIOCGIFFLAGS)
|
||||
ret = find_all_addresses (context, res, loop,
|
||||
AF_INET, SIOCGIFCONF, SIOCGIFFLAGS,
|
||||
sizeof(struct ifreq));
|
||||
if (ret)
|
||||
ret = find_all_addresses (context, res, loop,
|
||||
AF_INET6, SIOCGIF6CONF, SIOCGIF6FLAGS,
|
||||
sizeof(struct in6_ifreq));
|
||||
#endif
|
||||
#if defined(HAVE_IPV6) && defined(SIOCGIFCONF)
|
||||
if (ret)
|
||||
ret = find_all_addresses (context, res, loop,
|
||||
AF_INET6, SIOCGIFCONF, SIOCGIFFLAGS,
|
||||
sizeof(struct ifreq));
|
||||
#endif
|
||||
#if defined(AF_INET) && defined(SIOCGIFCONF) && defined(SIOCGIFFLAGS)
|
||||
if (ret)
|
||||
ret = find_all_addresses (context, res, loop,
|
||||
AF_INET, SIOCGIFCONF, SIOCGIFFLAGS,
|
||||
sizeof(struct ifreq));
|
||||
#endif
|
||||
if(ret || res->len == 0)
|
||||
ret = gethostname_fallback (res);
|
||||
|
Reference in New Issue
Block a user