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_ads.c | 2 +- source3/utils/net_lookup.c | 4 ++-- source3/utils/net_util.c | 8 ++++---- source3/utils/smbfilter.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 9ca52a87bc..4e27278154 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -1655,7 +1655,7 @@ static int net_ads_printer_publish(struct net_context *c, int argc, const char * /* Get printer data from SPOOLSS */ - resolve_name(servername, &server_ss, 0x20); + resolve_name(servername, &server_ss, 0x20, false); nt_status = cli_full_connection(&cli, global_myname(), servername, &server_ss, 0, 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