Page MenuHomeVyOS Platform

Incorrect addresses returned with interaction of static /etc/hosts with DNS64
Needs testing, HighPublic

Description

I've created a bug report for PowerDNS:

https://github.com/PowerDNS/pdns/issues/11770

Summary:

When using both the options:
``
export-etc-hosts=yes

dns64-prefix=2001:db8:abcd:64::/96
``
I believe there is a missing test to see if the IPv6 address already exists for that host name and don't do the DNS64 processing to synthesize an IPv6 address if that host has an IPv6 address already configured in /etc/hosts.
Short description

It is returning the DNS64 synthesized address instead of the actual configured IPv6 address in the /etc/host file, even though the IPv6 address is configured in the /etc/hosts file.

DNS64 synthesized address should ONLY be generated if there is NOT a pre-configured IPv6 address for that host name in the /etc/hosts file.

Since the /etc/hosts was just recently fixed to add capability for IPv6 lookups in PDNS 4.8 (alpha) then this interaction may have been inadvertently overlooked.
Environment

Operating system: VyOS (Debian "Buster")
Software version: 1.3
Software source: PDNS 4.5 (compiled into VyOS 1.3)

Steps to reproduce

PDNS configuration file /run/powerdns/recursor.conf:

export-etc-hosts=yes
dns64-prefix=2001:db8:abcd:64::/96

Then when the /etc/hosts file has
10.1.10.51 myhost
2001:db8:abcd:10::51 myhost

Look up 'myhost' with:
$ host myhost
Expected behaviour

myhost has address 10.1.10.51
mhost has IPv6 address 2001:db8abcd:10::51

Actual behaviour

myhost has address 10.1.10.51
mhost has IPv6 address 2001:db8:abcd:64::a01:a33

Other information

I just discovered that PDNS recursor just recently had code added to "export-etc-hosts" option to handle IPv6.

My theory is that the interaction between that and 'dns64-prefix' was overlooked.

Details

Difficulty level
Unknown (require assessment)
Version
1.3
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)