Commit 56f06239 authored by Petr Menšík's avatar Petr Menšík Committed by Simon Kelley

Allow trailing dot in CNAME.

I got reported bug in Fedora [1], that cname is broken in new releases.
At first I though this was false report, but there is still new
regression in cname handling.

Before, it accepted alias with trailing dot. Not it would accept only
target, but not alias.

cname=alias.,target

is no longer valid. The issue is it will count size to skip after
canonicalize. If that ignores trailing dot, next name would be "". And
that is invalid and refused, dnsmasq refuses to start.

I also think that any whitespace like tab should be possible after
comma. So this fixes also 30858e3b.
parent f3223fbf
......@@ -3856,6 +3856,7 @@ err:
while (arg != last)
{
int arglen = strlen(arg);
alias = canonicalise_opt(arg);
if (!alias || !target)
......@@ -3871,7 +3872,7 @@ err:
new->target = target;
new->ttl = ttl;
for (arg += strlen(arg)+1; *arg == ' '; arg++);
for (arg += arglen+1; *arg && isspace(*arg); arg++);
}
break;
......
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