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