summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/client/client.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 9c53472840..3795472f6d 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -4563,10 +4563,16 @@ static int do_host_query(const char *query_host)
browse_host(true);
- if (interpret_string_addr(&ss, query_host, 0) && (ss.ss_family != AF_INET)) {
- d_printf("%s is an IPv6 address -- no workgroup available\n",
- query_host);
- return 1;
+ /* Ensure that the host can do IPv4 */
+
+ if (!interpret_addr(query_host)) {
+ struct sockaddr_storage ss;
+ if (interpret_string_addr(&ss, query_host, 0) &&
+ (ss.ss_family != AF_INET)) {
+ d_printf("%s is an IPv6 address -- no workgroup available\n",
+ query_host);
+ return 1;
+ }
}
if (port != 139) {