summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/option.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/option.c b/src/option.c
index 4263dd6..06030c5 100644
--- a/src/option.c
+++ b/src/option.c
@@ -863,11 +863,13 @@ char *parse_server(char *arg, struct server_details *sdetails)
struct addrinfo hints = { 0 };
*sdetails->interface = 0;
-
+ sdetails->addr_type = AF_UNSPEC;
+
if (strcmp(arg, "#") == 0)
{
if (sdetails->flags)
*sdetails->flags |= SERV_USE_RESOLV;
+ sdetails->addr_type = AF_LOCAL;
sdetails->valid = 1;
return NULL;
}
@@ -1047,7 +1049,7 @@ char *parse_server_addr(struct server_details *sdetails)
}
}
}
- else
+ else if (sdetails->addr_type != AF_LOCAL)
return _("bad address");
return NULL;