diff options
author | Jeremy Allison <jra@samba.org> | 2009-07-28 11:51:58 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-07-28 11:51:58 -0700 |
commit | 5d05d2299983b5d34615cd269b04806bba173c0d (patch) | |
tree | 05b72de06182ef588d5cf1bc14806a0d22144b92 /source3/utils/net_lookup.c | |
parent | 571f20cd4db48c8d510e10b7188678d585abb2d1 (diff) | |
download | samba-5d05d2299983b5d34615cd269b04806bba173c0d.tar.gz samba-5d05d2299983b5d34615cd269b04806bba173c0d.tar.xz samba-5d05d2299983b5d34615cd269b04806bba173c0d.zip |
Added prefer_ipv4 bool parameter to resolve_name().
W2K3 DC's can have IPv6 addresses but won't serve
krb5/ldap or cldap on those addresses. Make sure when
we're asking for DC's we prefer IPv4.
If you have an IPv6-only network this prioritizing code
will be a no-op. And if you have a mixed network then you
need to prioritize IPv4 due to W2K3 DC's.
Jeremy.
Diffstat (limited to 'source3/utils/net_lookup.c')
-rw-r--r-- | source3/utils/net_lookup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c index 66f673b8d3..e770e3299f 100644 --- a/source3/utils/net_lookup.c +++ b/source3/utils/net_lookup.c @@ -53,7 +53,7 @@ static int net_lookup_host(struct net_context *c, int argc, const char **argv) sscanf(++p,"%x",&name_type); } - if (!resolve_name(name, &ss, name_type)) { + if (!resolve_name(name, &ss, name_type, false)) { /* we deliberately use DEBUG() here to send it to stderr so scripts aren't mucked up */ DEBUG(0,("Didn't find %s#%02x\n", name, name_type)); @@ -72,7 +72,7 @@ static void print_ldap_srvlist(struct dns_rr_srv *dclist, int numdcs ) int i; for ( i=0; i<numdcs; i++ ) { - if (resolve_name(dclist[i].hostname, &ss, 0x20) ) { + if (resolve_name(dclist[i].hostname, &ss, 0x20, true) ) { char addr[INET6_ADDRSTRLEN]; print_sockaddr(addr, sizeof(addr), &ss); #ifdef HAVE_IPV6 |