mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Fix breakage of --local=/domain.name/1.2.3.4 in immediately previous commit.
This commit is contained in:
12
src/option.c
12
src/option.c
@@ -2977,9 +2977,9 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
if (servers_only && option == 'S')
|
if (servers_only && option == 'S')
|
||||||
flags |= SERV_FROM_FILE;
|
flags |= SERV_FROM_FILE;
|
||||||
|
|
||||||
while (parse_server_next(&sdetails))
|
while ((flags & SERV_LITERAL_ADDRESS) || parse_server_next(&sdetails))
|
||||||
{
|
{
|
||||||
if ((err = parse_server_addr(&sdetails)))
|
if (!(flags & SERV_LITERAL_ADDRESS) && (err = parse_server_addr(&sdetails)))
|
||||||
ret_err(err);
|
ret_err(err);
|
||||||
|
|
||||||
/* When source is set only use DNS records of the same type and skip all others */
|
/* When source is set only use DNS records of the same type and skip all others */
|
||||||
@@ -3009,9 +3009,13 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
|
|
||||||
domain += strlen(domain) + 1;
|
domain += strlen(domain) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (flags & SERV_LITERAL_ADDRESS)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (sdetails.resolved)
|
|
||||||
freeaddrinfo(sdetails.hostinfo);
|
if (sdetails.resolved)
|
||||||
|
freeaddrinfo(sdetails.hostinfo);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user