mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Fix parsing of synth-domain=domain,addr,addr,prefix
This commit is contained in:
10
src/option.c
10
src/option.c
@@ -1862,7 +1862,10 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
||||
}
|
||||
else
|
||||
{
|
||||
char *prefstr;
|
||||
arg = split(comma);
|
||||
prefstr = split(arg);
|
||||
|
||||
if (inet_pton(AF_INET, comma, &new->start))
|
||||
{
|
||||
new->is6 = 0;
|
||||
@@ -1883,6 +1886,13 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
||||
#endif
|
||||
else
|
||||
ret_err(gen_err);
|
||||
|
||||
if (option != 's' && prefstr)
|
||||
{
|
||||
if (!(new->prefix = canonicalise_opt(prefstr)) ||
|
||||
strlen(new->prefix) > MAXLABEL - INET_ADDRSTRLEN)
|
||||
ret_err(_("bad prefix"));
|
||||
}
|
||||
}
|
||||
|
||||
new->domain = d;
|
||||
|
||||
Reference in New Issue
Block a user