dnsmasq not using all DHCPv6 provided nameservers

Bug #1327477 reported by Kevin Otte
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dnsmasq (Ubuntu)
Fix Released
Undecided
Carlos Hsiao
network-manager (Ubuntu)
Invalid
Undecided
Carlos Hsiao

Bug Description

When receiving nameservers from a DHCPv6 server, NetworkManager reports receiving both my primary and secondary servers, but only advises dnsmasq about the secondary.

Jun 6 13:59:29 daedalus dhclient: XMT: Info-Request on eth0, interval 910ms.
Jun 6 13:59:29 daedalus dhclient: RCV: Reply message on eth0 from fe80::221:85ff:fe10:7749.
Jun 6 13:59:29 daedalus NetworkManager[22306]: <info> (eth0): DHCPv6 state changed nbi -> renew6
Jun 6 13:59:29 daedalus NetworkManager[22306]: <info> nameserver '2001:470:8:64f::4'
Jun 6 13:59:29 daedalus NetworkManager[22306]: <info> nameserver '2001:470:8:64f:21b:fcff:fe43:bcff'
Jun 6 13:59:29 daedalus NetworkManager[22306]: <info> domain search 'home.nivex.net.'
Jun 6 13:59:29 daedalus NetworkManager[22306]: <info> Activation (eth0) Stage 5 of 5 (IPv6 Commit) scheduled...
Jun 6 13:59:29 daedalus NetworkManager[22306]: <info> (eth0): DHCPv6 client pid 22638 exited with status 0
Jun 6 13:59:29 daedalus NetworkManager[22306]: <info> Activation (eth0) Stage 5 of 5 (IPv6 Commit) started...
Jun 6 13:59:29 daedalus avahi-daemon[991]: Registering new address record for 2001:470:8:64f:dcf5:dd0f:11f5:b6ed on eth0.*.
Jun 6 13:59:30 daedalus NetworkManager[22306]: <info> (eth0): device state change: ip-config -> secondaries (reason 'none') [70 90 0]
Jun 6 13:59:30 daedalus NetworkManager[22306]: <info> Activation (eth0) Stage 5 of 5 (IPv6 Commit) complete.
Jun 6 13:59:30 daedalus NetworkManager[22306]: <info> (eth0): device state change: secondaries -> activated (reason 'none') [90 100 0]
Jun 6 13:59:30 daedalus NetworkManager[22306]: <info> NetworkManager state is now CONNECTED_GLOBAL
Jun 6 13:59:30 daedalus NetworkManager[22306]: <info> Policy set 'Ethernet connection 1' (eth0) as default for IPv6 routing and DNS.
Jun 6 13:59:30 daedalus NetworkManager[22306]: <info> Writing DNS information to /sbin/resolvconf
Jun 6 13:59:30 daedalus dnsmasq[22603]: setting upstream servers from DBus
Jun 6 13:59:30 daedalus dnsmasq[22603]: using nameserver 2001:470:8:64f:21b:fcff:fe43:bcff#53
Jun 6 13:59:30 daedalus NetworkManager[22306]: <info> Activation (eth0) successful, device activated.

I noticed this during the Turn IPv4 Off Day (http://www.internetsociety.org/deploy360/blog/2013/12/campaign-turn-off-ipv4-on-6-june-2014-for-one-day/) shakedown because my secondary was not configured to recurse over IPv6, resulting in an inability to resolve anything.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: network-manager 0.9.8.8-0ubuntu7
ProcVersionSignature: Ubuntu 3.13.0-27.50-generic 3.13.11
Uname: Linux 3.13.0-27-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CurrentDesktop: XFCE
Date: Fri Jun 6 23:18:49 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2011-12-09 (910 days ago)
InstallationMedia: Xubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
IpRoute:
 default via 172.31.3.1 dev eth0 proto static
 172.31.3.0/24 dev eth0 proto kernel scope link src 172.31.3.11 metric 1
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
 WimaxEnabled=true
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: yes
SourcePackage: network-manager
UpgradeStatus: Upgraded to trusty on 2014-04-20 (47 days ago)
nmcli-dev:
 DEVICE TYPE STATE DBUS-PATH
 wlan0 802-11-wireless unavailable /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.8.8 connected enabled disabled disabled enabled disabled

Revision history for this message
Kevin Otte (nivex) wrote :
Carlos Hsiao (weii666)
Changed in network-manager (Ubuntu):
assignee: nobody → Carlos Hsiao (weii666)
Carlos Hsiao (weii666)
Changed in network-manager (Ubuntu):
status: New → Invalid
Changed in dnsmasq (Ubuntu):
status: New → Confirmed
assignee: nobody → Carlos Hsiao (weii666)
Revision history for this message
Carlos Hsiao (weii666) wrote :

On 14.04, Netowrk-Manager is fine. The problem is at dnsmasq receiving ipv6 nameservers from dbus.
Here is the proposed fix in parsing ipv6 address length.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "dnsmasq-2.68-fix-ipv6-ns.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Simon Kelley (simon-thekelleys) wrote :

I think the following, much simpler, patch should solve the problem.

Simon.

diff --git a/src/dbus.c b/src/dbus.c
index 93c597c..4696442 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -156,13 +156,16 @@ static void dbus_read_servers(DBusMessage *message)
              dbus_message_iter_get_basic(&iter, &p[i]);
              dbus_message_iter_next (&iter);
              if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_BYTE)
- break;
+ {
+ i++;
+ break;
+ }
            }

 #ifndef HAVE_IPV6
          my_syslog(LOG_WARNING, _("attempt to set an IPv6 server address via DBus - no IPv6 support"));
 #else
- if (i == sizeof(struct in6_addr)-1)
+ if (i == sizeof(struct in6_addr))
            {
              memcpy(&addr.in6.sin6_addr, p, sizeof(struct in6_addr));
 #ifdef HAVE_SOCKADDR_SA_LEN

Revision history for this message
Simon Déziel (sdeziel) wrote :

Simon's patch [1] was included in version 2.72 (Vivid and later). Marking as fix released.

1: http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=006c162382aaa30f63413b876ecbe805280c3d36

Changed in dnsmasq (Ubuntu):
status: Confirmed → Fix Released
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.