NetworkManager/src/core/dns
Jiri Slaby (SUSE) a0482a4e35 core: nm-dns-dnsmasq: listen on ipv6 localhost too
Trying to resolve hosts using localhost errors out for ipv6 attempts:
  $ host www.seznam.cz localhost
  ;; communications error to ::1#53: connection refused
  ;; communications error to ::1#53: connection refused
  Using domain server:
  Name: localhost
  Address: 127.0.0.1#53
  Aliases:

  www.seznam.cz has address 77.75.77.222
  www.seznam.cz has address 77.75.79.222
  ;; communications error to ::1#53: connection refused
  ;; communications error to ::1#53: connection refused
  www.seznam.cz has IPv6 address 2a02:598:a::79:222
  www.seznam.cz has IPv6 address 2a02:598:2::1222
  ;; communications error to ::1#53: connection refused
  ;; communications error to ::1#53: connection refused

It's because on some distros (like openSUSE), localhost is defined both
as 127.0.0.1 and ::1.

So listen on ::1 too. This makes ipv4-switchoff easier.
/etc/resolv.conf should likely be updated to contain ::1 eventually too
(see update_dns()).

Fixes https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1188
2025-10-22 15:42:57 +02:00
..
nm-dns-dnsconfd.c dns: return error from nm_dns_uri_parse() 2025-08-14 09:40:26 +02:00
nm-dns-dnsconfd.h dns: Add dnsconfd DNS plugin 2025-01-29 14:41:47 +01:00
nm-dns-dnsmasq.c core: nm-dns-dnsmasq: listen on ipv6 localhost too 2025-10-22 15:42:57 +02:00
nm-dns-dnsmasq.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-dns-manager.c dns: specify a temporary file name when writing no-stub-resolv.conf 2025-10-22 09:56:39 +02:00
nm-dns-manager.h emit DNS CONFIG_CHANGED signal even dns=none 2023-09-26 15:00:32 +08:00
nm-dns-plugin.c dns: add "update-pending" state to NMDnsPlugin 2022-04-15 09:04:29 +02:00
nm-dns-plugin.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-dns-systemd-resolved.c core: add support for connection.dnssec 2025-10-13 11:57:53 +02:00
nm-dns-systemd-resolved.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00