(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)
|
get_addrs_int (krb5_context context, krb5_addresses *res, int loop)
|
||||||
{
|
{
|
||||||
krb5_error_code ret = -1;
|
krb5_error_code ret = -1;
|
||||||
|
|
||||||
#if defined(AF_INET6) && defined(SIOCGIF6CONF) && defined(SIOCGIF6FLAGS)
|
#if defined(AF_INET6) && defined(SIOCGIF6CONF) && defined(SIOCGIF6FLAGS)
|
||||||
ret = find_all_addresses (context, res, loop,
|
if (ret)
|
||||||
AF_INET6, SIOCGIF6CONF, SIOCGIF6FLAGS,
|
ret = find_all_addresses (context, res, loop,
|
||||||
sizeof(struct in6_ifreq));
|
AF_INET6, SIOCGIF6CONF, SIOCGIF6FLAGS,
|
||||||
#elif defined(AF_INET) && defined(SIOCGIFCONF) && defined(SIOCGIFFLAGS)
|
sizeof(struct in6_ifreq));
|
||||||
ret = find_all_addresses (context, res, loop,
|
#endif
|
||||||
AF_INET, SIOCGIFCONF, SIOCGIFFLAGS,
|
#if defined(HAVE_IPV6) && defined(SIOCGIFCONF)
|
||||||
sizeof(struct ifreq));
|
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
|
#endif
|
||||||
if(ret || res->len == 0)
|
if(ret || res->len == 0)
|
||||||
ret = gethostname_fallback (res);
|
ret = gethostname_fallback (res);
|
||||||
|
Reference in New Issue
Block a user