Commit eec5c1e2 authored by Simon Kelley's avatar Simon Kelley

Fix parsing of synth-domain=domain,addr,addr,prefix

parent 1f776a4a
......@@ -1860,9 +1860,12 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
else
ret_err(gen_err);
}
else
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment