Make --server=/#/<addr> behave the same as --server=<addr>

For consistency with --address and older dnsmasq releases.
This commit is contained in:
Simon Kelley
2023-04-05 17:29:04 +01:00
parent df242de5c6
commit 86ee779e22

View File

@@ -3058,8 +3058,8 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
else
flags &= ~SERV_FOR_NODOTS;
/* address=/#/ matches the same as without domain */
if (option == 'A' && cur_domain[0] == '#' && cur_domain[1] == 0)
/* address=/#/ matches the same as without domain, as does server=/#/.... for consistency. */
if (cur_domain[0] == '#' && cur_domain[1] == 0)
cur_domain[0] = 0;
}