From 5d05d2299983b5d34615cd269b04806bba173c0d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 28 Jul 2009 11:51:58 -0700 Subject: 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. --- source3/utils/net_lookup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/utils/net_lookup.c') 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