If it obtains the same nameserver address for multiple interfaces, NM fails to de-duplicate the list of addresses it gives to dnsmasq via nm-dns-dnsmasq.conf and just includes the same address multiple times

Bug #1015493 reported by Thomas Hood
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

From /var/log/syslog:

Jun 20 10:03:25 tenerife dhclient: DHCPREQUEST of 192.168.2.103 on eth0 to 255.255.255.255 port 67
Jun 20 10:03:25 tenerife dhclient: DHCPOFFER of 192.168.2.103 from 192.168.2.254
Jun 20 10:03:25 tenerife dhclient: DHCPACK of 192.168.2.103 from 192.168.2.254
Jun 20 10:03:25 tenerife dhclient: bound to 192.168.2.103 -- renewal in 276336 seconds.
Jun 20 10:03:25 tenerife NetworkManager[1090]: <info> (eth0): DHCPv4 state changed preinit -> bound
Jun 20 10:03:25 tenerife NetworkManager[1090]: <info> address 192.168.2.103
Jun 20 10:03:25 tenerife NetworkManager[1090]: <info> prefix 24 (255.255.255.0)
Jun 20 10:03:25 tenerife NetworkManager[1090]: <info> gateway 192.168.2.254
Jun 20 10:03:25 tenerife NetworkManager[1090]: <info> nameserver '192.168.2.254'
Jun 20 10:03:25 tenerife NetworkManager[1090]: <info> Activation (eth0) Stage 5 of 5 (IPv4 Configure Commit) scheduled...
Jun 20 10:03:25 tenerife NetworkManager[1090]: <info> Activation (eth0) Stage 5 of 5 (IPv4 Commit) started...

# cat /var/run/nm-dns-dnsmasq.conf
server=192.168.2.254
server=192.168.2.254
---
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
DistroRelease: Ubuntu 12.04
EcryptfsInUse: Yes
IfupdownConfig:
 auto lo
 iface lo inet loopback
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
IpRoute:
 default via 192.168.20.254 dev eth0 proto static
 169.254.0.0/16 dev eth0 scope link metric 1000
 192.168.20.0/24 dev eth0 proto kernel scope link src 192.168.20.103 metric 1
 192.168.20.0/24 dev wlan0 proto kernel scope link src 192.168.20.196 metric 9
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
 WimaxEnabled=true
Package: network-manager 0.9.4.0+git201206081144.2efeac8-0ubuntu1th1
PackageArchitecture: amd64
ProcEnviron:
 TERM=xterm
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.2.0-26.41-generic 3.2.19
Tags: precise
Uname: Linux 3.2.0-26-generic x86_64
UnreportableReason: This is not an official Ubuntu package. Please remove any third party package and try again.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
mtime.conffile..etc.NetworkManager.NetworkManager.conf: 2012-07-04T09:47:16.565166
nmcli-dev:
 DEVICE TYPE STATE DBUS-PATH
 wlan0 802-11-wireless connected /org/freedesktop/NetworkManager/Devices/1
 eth0 802-3-ethernet connected /org/freedesktop/NetworkManager/Devices/0
nmcli-nm:
 RUNNING VERSION STATE NET-ENABLED WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN
 running 0.9.4.0 connected enabled enabled enabled enabled disabled

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Please attach at least all of /var/log/syslog so that we can see NM bring up the interface fully. Even the output of 'nmcli con status id <your connection>' would be helpful here, once the connection is fully brought up.

Could it be that both IPv4 and IPv6 independently list 192.168.2.254 as your DNS server? That would be a configuration issue, as IPv6 should specify either an IPv6 address or no address at all.

Regardless, impact would AFAICT be minimal. Patches welcome ;)

Changed in network-manager (Ubuntu):
status: New → Incomplete
importance: Undecided → Low
Revision history for this message
Thomas Hood (jdthood) wrote : CRDA.txt

apport information

tags: added: apport-collected precise
description: updated
Revision history for this message
Thomas Hood (jdthood) wrote : Dependencies.txt

apport information

Revision history for this message
Thomas Hood (jdthood) wrote : IpAddr.txt

apport information

Revision history for this message
Thomas Hood (jdthood) wrote : IwConfig.txt

apport information

Revision history for this message
Thomas Hood (jdthood) wrote : NetDevice.eth0.txt

apport information

Revision history for this message
Thomas Hood (jdthood) wrote : NetDevice.lo.txt

apport information

Revision history for this message
Thomas Hood (jdthood) wrote : NetDevice.wlan0.txt

apport information

Revision history for this message
Thomas Hood (jdthood) wrote : NetworkManager.conf.txt

apport information

Revision history for this message
Thomas Hood (jdthood) wrote : PciNetwork.txt

apport information

Revision history for this message
Thomas Hood (jdthood) wrote : RfKill.txt

apport information

Revision history for this message
Thomas Hood (jdthood) wrote : WifiSyslog.txt

apport information

Revision history for this message
Thomas Hood (jdthood) wrote : modified.conffile..etc.NetworkManager.NetworkManager.conf.txt

apport information

Revision history for this message
Thomas Hood (jdthood) wrote : nmcli-con.txt

apport information

Revision history for this message
Thomas Hood (jdthood) wrote : Re: NM writes duplicate lines in /var/run/nm-dns-dnsmasq.conf

And here's syslog.1, since I notice that the log rotated the requested part of the syslog out of /var/log/syslog.

Revision history for this message
Thomas Hood (jdthood) wrote :

$ cat /var/run/nm-dns-dnsmasq.conf
server=192.168.20.254
server=192.168.20.254
$ nmcli con status id vrfblx
GENERAL.NAME: vrfblx
GENERAL.UUID: da5d33ae-f25e-4039-9ac8-81ba3cdd30a7
GENERAL.DEVICES: wlan0
GENERAL.STATE: activated
GENERAL.DEFAULT: no
GENERAL.DEFAULT6: no
GENERAL.VPN: no
GENERAL.ZONE: --
GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/3
GENERAL.SPEC-OBJECT: /org/freedesktop/NetworkManager/AccessPoint/0
GENERAL.MASTER-PATH: --
IP4.ADDRESS[1]: ip = 192.168.20.196/24, gw = 192.168.20.254
IP4.DNS[1]: 192.168.20.254
DHCP4.OPTION[1]: expiry = 1342512051
DHCP4.OPTION[2]: broadcast_address = 192.168.20.255
DHCP4.OPTION[3]: dhcp_message_type = 5
DHCP4.OPTION[4]: routers = 192.168.20.254
DHCP4.OPTION[5]: dhcp_lease_time = 604800
DHCP4.OPTION[6]: ip_address = 192.168.20.196
DHCP4.OPTION[7]: subnet_mask = 255.255.255.0
DHCP4.OPTION[8]: domain_name_servers = 192.168.20.254
DHCP4.OPTION[9]: network_number = 192.168.20.0
DHCP4.OPTION[10]: dhcp_server_identifier = 192.168.20.254

Changed in network-manager (Ubuntu):
status: Incomplete → New
Revision history for this message
Thomas Hood (jdthood) wrote :

I have both wired and wireless connections to the same LAN.

If I disable wireless then there is only one instance of the address left in nm-dns-dnsmasq.conf.

If I instead disconnect the Ethernet cable then there is only one instance of the address left in nm-dns-dnsmasq.conf.

So it seems that the two lines correspond to two interfaces, eth0 and wlan0, by which the (same) nameserver address can be reached.

Whatever the cause of the duplication might be, though, I'd think that NM should de-duplicate the list of addresses it gives to dnsmasq.

summary: - NM writes duplicate lines in /var/run/nm-dns-dnsmasq.conf
+ If it obtains the same nameserver address for multiple interfaces, NM
+ fails to de-duplicate the list of addresses it gives to dnsmasq via nm-
+ dns-dnsmasq.conf and just includes the same address multiple times
Thomas Hood (jdthood)
Changed in network-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Thomas Hood (jdthood) wrote :

This bug still exists even though NM now communicates with dnsmasq over D-Bus.

   Aug 25 21:31:33 sanrife dnsmasq[7027]: using nameserver 192.168.1.254#53
   Aug 25 21:31:33 sanrife dnsmasq[7027]: using nameserver 192.168.1.254#53

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.