pdns
pdns copied to clipboard
Fatal error: Unable to convert '10' to a netmask
- Program: Authoritative
- Issue type: Bug report
Short description
allow-axfr-ips=84.113.113.116 10/8
leads to:
Fatal error: Unable to convert '10' to a netmask
Environment
- Operating system: Debian stretch
- Software version: 4.1.0-1pdns.stretch
- Software source: powerdns.com repo
Expected behaviour
10/8 should be treated the same as 10.0.0.0/8.
For anyone ending up here, for example due to trying to do DDNS with more than one allowed IP/range. Make sure to pass multiple arguments to pdnsutil, not an escaped string.
## correct!
# pdnsutil set-meta example.com ALLOW-DNSUPDATE-FROM 1.2.3.4/32 5.6.7.8/32
Set 'example.com' meta ALLOW-DNSUPDATE-FROM = 1.2.3.4/32, 5.6.7.8/32
## this works too!
# pdnsutil set-meta example.com ALLOW-DNSUPDATE-FROM 1.2.3.4 5.6.7.8
Set 'example.com' meta ALLOW-DNSUPDATE-FROM = 1.2.3.4, 5.6.7.8
## WRONG (output is missing comma)
# pdnsutil set-meta example.com ALLOW-DNSUPDATE-FROM "1.2.3.4/32 5.6.7.8/32"
Set 'example.com' meta ALLOW-DNSUPDATE-FROM = 1.2.3.4/32 5.6.7.8/32
## also WRONG, even though the output looks the same as the correct one :)
# pdnsutil set-meta example.com ALLOW-DNSUPDATE-FROM "1.2.3.4/32, 5.6.7.8/32"
Set 'example.com' meta ALLOW-DNSUPDATE-FROM = 1.2.3.4/32, 5.6.7.8/32
(Using a MySQL/MariaDB backend. Haven't tried it with anything else.)