summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Kelley <simon@thekelleys.org.uk>2022-11-07 23:24:31 +0000
committerSimon Kelley <simon@thekelleys.org.uk>2022-11-07 23:24:31 +0000
commit2fc904111d9b6ec45fc1e4ec9f1f8b43c1e67b9b (patch)
tree85fc9e6e55dac6ddee8465fbb6ef88fd9bd05c7e
parent262dadf50ed3688c6168680d22a6abf92a9e3ffa (diff)
downloaddnsmasq-2fc904111d9b6ec45fc1e4ec9f1f8b43c1e67b9b.tar.gz
Fix --server=/domain/#v2.88test3
-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;