DNS not working for IPv6-only host names when using Miredo

Bug #1728445 reported by Martin Rosenau
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

When IPv6 is only available using "miredo" (I don't know about the case of native IPv6) "systemd-resolve" seems not to query for AAAA entries when AF_UNSPEC or simply a NULL pointer is passed to getaddrinfo().

This has the effect that tools that support both IPv4 and IPv6 and use AF_UNSPEC or NULL will simply fail to connect IPv6-only servers when the name has to be resolved via DNS.

(The problem was occurring with the Firefox web browser.)

(The AAAA record is however queried if AF_INET6 is explicitly passed to that function.)

A possible quick fix is to modify the /etc/nsswitch.conf:

  Before: "hosts: ... resolve [!UNAVAIL=return] dns"
  After: "hosts: ... resolve dns"
  Or even remove "resolve" completely: "hosts: ... dns"

However it would be better to create the possibility to configure how the system should behave in the case of AF_UNSPEC:

- Only ask for the A record
- Only ask for the AAAA record
- Ask for both, prefer A
- Ask for both, prefer AAAA

Revision history for this message
Steve Langasek (vorlon) wrote :

systemd-resolve is not part of resolvconf, it is part of systemd; reassigning.

A possible quick fix is to modify the /etc/nsswitch.conf:

  Or even remove "resolve" completely: "hosts: ... dns"

We are not installing libnss-resolve by default in Ubuntu, we are using systemd-resolved as a DNS resolver only. Perhaps the solution for you is to remove the libnss-resolve package from your system? Why do you have it installed?

affects: resolvconf (Ubuntu) → systemd (Ubuntu)
Revision history for this message
Martin Rosenau (martin-djr) wrote :

At least I did not install this packet manually.

Maybe there is another packet that I have installed depending on libnss-resolve...

Dan Streetman (ddstreet)
Changed in systemd (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.