Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1031891: network-manager: dnsmasq fails to get upstream DNS servers from DBus

132 views
Skip to first unread message

Benoit Friry

unread,
Feb 24, 2023, 2:00:04 PM2/24/23
to
Package: network-manager
Version: 1.42.2-1
Severity: normal

Dear Maintainer,

I use network-manager + dnsmasq on my laptop to give DHCP & DNS
resolution to local virtual machines.

In a file in /etc/NetworkManager/conf.d, I have set
[main]
dns=dnsmasq

In a file in /etc/NetworkManager/dnsmasq.d, I have set
strict-order
interface=br0
dhcp-no-override
dhcp-authoritative
dhcp-range=192.168.113.100,192.168.113.254,255.255.255.0
dhcp-range=fc00:071::,ra-only

$ cat /etc/resolv.conf
# Generated by NetworkManager
search friry.net
nameserver 127.0.0.1
options edns0 trust-ad

Until version 1.40.10-1 of network-manager, it worked. VM & hosts called
dnsmasq on 127.0.0.1:53, and dnsmasq called upstream server (provided by
DHCP from Wifi AP).

Since upgrade to 1.42.0-1 (also tested on 1.42.2-1), resolution fails.

$ dig www.google.com @127.0.0.1

; <<>> DiG 9.18.11-2-Debian <<>> www.google.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 13869
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; EDE: 14 (Not Ready)
;; QUESTION SECTION:
;www.google.com. IN A

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Fri Feb 24 19:20:53 CET 2023
;; MSG SIZE rcvd: 49

dig www.google.com @<Wifi AP DNS IPv4> correctly resolves address.

After some investigation, I saw "warning: no upstream servers
"configured" in NetworkManager journal.

In journal, I see server configuration from DBus regularly and each time
the wifi is restarted, without any change.

$ nmcli dev show|grep DNS
IP4.DNS[1]: os
IP6.DNS[1]: <Wifi AP DNS IPv6>

$ env -i gdbus introspect -y -o
/org/freedesktop/NetworkManager/IP4Config/5 \
-d org.freedesktop.NetworkManager
shows <Wifi AP DNS IPv4> in "aa{sv} NameserverData" field.

So, it seems DNS upstream server is available via DBus, but dnsmasq
cannot get it anymore.

Thanks,
Benoit


-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-3-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8),
LANGUAGE=fr:en_US
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages network-manager depends on:
ii adduser 3.131
ii dbus [default-dbus-system-bus] 1.14.6-1
ii libaudit1 1:3.0.9-1
ii libbluetooth3 5.66-1
ii libc6 2.36-8
ii libcurl3-gnutls 7.87.0-2
ii libglib2.0-0 2.74.5-1
ii libgnutls30 3.7.8-5
ii libjansson4 2.14-2
ii libmm-glib0 1.20.4-1
ii libndp0 1.8-1
ii libnewt0.52 0.52.23-1+b1
ii libnm0 1.42.2-1
ii libpsl5 0.21.2-1
ii libreadline8 8.2-1.3
ii libselinux1 3.4-1+b5
ii libsystemd0 252.5-2
ii libteamdctl0 1.31-1
ii libudev1 252.5-2
ii policykit-1 122-3
ii polkitd 122-3
ii udev 252.5-2

Versions of packages network-manager recommends:
ii dnsmasq-base [dnsmasq-base] 2.89-1
ii libpam-systemd 252.5-2
ii modemmanager 1.20.4-1
ii ppp 2.4.9-1+1.1+b1
ii wireless-regdb 2022.06.06-1
ii wpasupplicant 2:2.10-11

Versions of packages network-manager suggests:
ii iptables 1.8.9-2
pn libteam-utils <none>

Versions of packages network-manager is related to:
ii isc-dhcp-client 4.4.3-P1-1.1

-- no debconf information

Michael Biebl

unread,
Feb 24, 2023, 4:10:05 PM2/24/23
to
Hi Benoit

Am 24.02.23 um 19:42 schrieb Benoit Friry:

> I use network-manager + dnsmasq on my laptop to give DHCP & DNS
> resolution to local virtual machines.
>

Would you mind raising this upstream at
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues

Upstream will likely have follow-up questions.

It's probably a good idea to include a debug log for 1.42.2-1 and
1.40.10-1 as well, which might help spot the regression.

Michael
OpenPGP_signature

Michael Biebl

unread,
Feb 25, 2023, 8:02:02 AM2/25/23
to
Control: tags -1 + moreinfo unreproducible

Am 24.02.23 um 19:42 schrieb Benoit Friry:

> After some investigation, I saw "warning: no upstream servers
> "configured" in NetworkManager journal.

I tried to reproduce the issue, but failed. Here is there relevant
excerpt from the journal log:

> Feb 25 13:48:42 pluto dnsmasq[30488]: DBus support enabled: connected to system bus
> Feb 25 13:48:42 pluto NetworkManager[30382]: <info> [1677329322.3929] device (wlan0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
> Feb 25 13:48:42 pluto dnsmasq[30488]: warning: no upstream servers configured
> Feb 25 13:48:42 pluto dnsmasq-dhcp[30488]: DHCP, IP range 192.168.113.100 -- 192.168.113.254, lease time 1h
> Feb 25 13:48:42 pluto dnsmasq-dhcp[30488]: router advertisement on fc00:71::
> Feb 25 13:48:42 pluto dnsmasq-dhcp[30488]: DHCP, sockets bound exclusively to interface br0
> Feb 25 13:48:42 pluto dnsmasq[30488]: cleared cache
> Feb 25 13:48:42 pluto dnsmasq[30488]: setting upstream servers from DBus
> Feb 25 13:48:42 pluto dnsmasq[30488]: using nameserver 192.168.XXX.1#53(via wlan0)
> Feb 25 13:48:42 pluto dnsmasq[30488]: using nameserver 192.168.XXX.1#53 for domain fritz.box
> Feb 25 13:48:42 pluto dnsmasq[30488]: using nameserver 192.168.XXX.1#53 for domain 179.168.192.in-addr.arpa


Given that I can't reproduce the issue, it's best if you file the issue
upstream yourself.

Regards,
Michael
OpenPGP_signature

Benoit Friry

unread,
Feb 25, 2023, 11:50:04 AM2/25/23
to
Hi Michael,

I will open a bug upstream.

Downgrading to network-manager_1.40.12-1~bpo11+1_amd64.deb and
libnm0_1.40.12-1~bpo11+1_amd64.deb resolves the issue.

Which logs would be useful?

I tried:

1/ Set dns=none

2/ Start dnsmasq with
/usr/sbin/dnsmasq --no-resolv --keep-in-foreground \
--no-hosts --bind-interfaces \
--pid-file=/run/NetworkManager/dnsmasq.pid \
--listen-address=127.0.0.1 --cache-size=400 --clear-on-reload \
--conf-file=/dev/null --proxy-dnssec \
--enable-dbus=org.freedesktop.NetworkManager.dnsmasq \
--conf-dir=/etc/NetworkManager/dnsmasq.d \
-d

But console output show nothing useful.

Thanks,
Benoit

Benoit Friry

unread,
Mar 2, 2023, 10:50:04 AM3/2/23
to
Upstream bug report:
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1238

Apparently, same issue occurs on openSUSE.

Michael Biebl

unread,
Mar 2, 2023, 11:40:04 AM3/2/23
to

Am 02.03.23 um 16:43 schrieb Benoit Friry:
> Upstream bug report:
> https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1238
>
> Apparently, same issue occurs on openSUSE.

Thanks, marking as forwarded.
OpenPGP_signature
0 new messages