pdns icon indicating copy to clipboard operation
pdns copied to clipboard

Fatal error: Unable to convert '10' to a netmask

Open zeha opened this issue 8 years ago • 1 comments

  • 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.

zeha avatar Jan 05 '18 18:01 zeha

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.)

PAStheLoD avatar Jul 29 '24 11:07 PAStheLoD