Allow empty server spec in --rev-server, to match --server.

This commit is contained in:
Simon Kelley
2020-02-11 21:58:59 +00:00
parent c65b77c87f
commit a9b022ab65
3 changed files with 9 additions and 2 deletions

View File

@@ -81,6 +81,8 @@ version 2.81
Add filtering by tag of --dhcp-host directives. Based on a patch Add filtering by tag of --dhcp-host directives. Based on a patch
by Harald Jensås. by Harald Jensås.
Allow empty server spec in --rev-server, to match --server.
version 2.80 version 2.80
Add support for RFC 4039 DHCP rapid commit. Thanks to Ashram Method Add support for RFC 4039 DHCP rapid commit. Thanks to Ashram Method

View File

@@ -484,7 +484,7 @@ source address specified but the port may be specified directly as
part of the source address. Forcing queries to an interface is not part of the source address. Forcing queries to an interface is not
implemented on all platforms supported by dnsmasq. implemented on all platforms supported by dnsmasq.
.TP .TP
.B --rev-server=<ip-address>/<prefix-len>,<ipaddr>[#<port>][@<source-ip>|<interface>[#<port>]] .B --rev-server=<ip-address>/<prefix-len>[,<ipaddr>][#<port>][@<source-ip>|<interface>[#<port>]]
This is functionally the same as This is functionally the same as
.B --server, .B --server,
but provides some syntactic sugar to make specifying address-to-name queries easier. For example but provides some syntactic sugar to make specifying address-to-name queries easier. For example

View File

@@ -2618,7 +2618,12 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
struct in6_addr addr6; struct in6_addr addr6;
unhide_metas(arg); unhide_metas(arg);
if (!arg || !(comma=split(arg)) || !(string = split_chr(arg, '/')) || !atoi_check(string, &size)) if (!arg)
ret_err(gen_err);
comma=split(arg);
if (!(string = split_chr(arg, '/')) || !atoi_check(string, &size))
ret_err(gen_err); ret_err(gen_err);
if (inet_pton(AF_INET, arg, &addr4)) if (inet_pton(AF_INET, arg, &addr4))