[Dnsmasq-discuss] [PATCH] Accept /32 and /0 as valid CIDR prefixes for rev-server directive

/dev/rob0 rob0 at gmx.co.uk
Tue Feb 14 14:16:02 GMT 2017

On Tue, Feb 14, 2017 at 12:31:21AM +0100, olivier.gayot at sigexec.com wrote:
> [ excerpt from the man page ]
> The rev-server directive provides a syntactic sugar to make 
> specifying address-to-name queries easier. For example
> --rev-server=, is exactly equivalent to
> --server=/3.2.1.in-addr.arpa/
> It is not mentioned in the man page but specifying anything but /8 
> or /24 as the CIDR prefix has the same effect as specifying /16.
> It is not a big deal for subnets on non-octet boundaries since they 
> cannot be represented using a single in-addr.arpa address. However, 
> it is unconvenient for /32 and /0 prefixes while their analogous 
> server directives behave as expected. E.g. the following server 
> directives work as expected:
>     server=/
>     server=/in-addr.arpa/
> but the following do not:
>     rev-server=,
>     rev-server=,

The second is a bad example, and to my mind it should not work,
because x.x.x.x/0 is not a valid CIDR expression unless each x=0.
Did you try "rev-server=,"?  From the patch I am
supposing you did and got 0.0.in-addr.arpa as the zone?

> and, in practice, they behave the same as:
>     server=/168.192.in-addr.arpa/
>     server=/168.192.in-addr.arpa/
> This strange behaviour is fixed by accepting /32 and /0 CIDR 
> prefixes as valid values. Any other value will still be
> considered the same as /16.

A /0 zone is very strange and likely to break most reverse address
resolution, but a /32 zone is not unusual at all; I run 8 /32
in-addr.arpa zones for my /29 netblock.
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:

More information about the Dnsmasq-discuss mailing list