mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-24 12:48:32 +00:00
Fix --server=/domain/#
This commit is contained in:
@@ -863,11 +863,13 @@ char *parse_server(char *arg, struct server_details *sdetails)
|
|||||||
struct addrinfo hints = { 0 };
|
struct addrinfo hints = { 0 };
|
||||||
|
|
||||||
*sdetails->interface = 0;
|
*sdetails->interface = 0;
|
||||||
|
sdetails->addr_type = AF_UNSPEC;
|
||||||
|
|
||||||
if (strcmp(arg, "#") == 0)
|
if (strcmp(arg, "#") == 0)
|
||||||
{
|
{
|
||||||
if (sdetails->flags)
|
if (sdetails->flags)
|
||||||
*sdetails->flags |= SERV_USE_RESOLV;
|
*sdetails->flags |= SERV_USE_RESOLV;
|
||||||
|
sdetails->addr_type = AF_LOCAL;
|
||||||
sdetails->valid = 1;
|
sdetails->valid = 1;
|
||||||
return NULL;
|
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 _("bad address");
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user