IPv6 nameservers not removed from /etc/resolv.conf when switching to a IPv4 network
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ndisc6 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I installed rdnssd on a laptop which I mostly use in two places. At one place, I have dual stack network, with dual stack DNS servers, in the other place, the network is IPv4 only.
When I go to the first place, rdnssd correctly receives the advertised DNS (IPv6) servers and places them in /etc/resolv.conf. Everything works.
However, when I go to the second network, the IPv6 addresses for the DNS servers remain in /etc/resolv.conf, and that means networking mostly doesn't work, since most DNS queries are sent to the two IPv6 addresses which are now "Network unreachable".
When switching to a IPv4 only network (or an IPv6 network which doesn't advertise IPv6 addresses for it's DNS via RDNSS), the IPv6 addresses of the DNS should be removed from /etc/resolv.conf
lsb_release -rd
Description: Ubuntu 14.04.4 LTS
Release: 14.04
apt-cache policy rdnssd
rdnssd:
Installed: 1.0.1-1ubuntu1
Candidate: 1.0.1-1ubuntu1
Version table:
*** 1.0.1-1ubuntu1 0
500 http://
100 /var/lib/
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: rdnssd 1.0.1-1ubuntu1
ProcVersionSign
Uname: Linux 3.19.0-58-generic x86_64
NonfreeKernelMo
ApportVersion: 2.14.1-0ubuntu3.19
Architecture: amd64
CurrentDesktop: Unity
Date: Mon May 9 09:16:48 2016
InstallationDate: Installed on 2015-11-28 (162 days ago)
InstallationMedia: Ubuntu 14.04.3 LTS "Trusty Tahr" - Beta amd64 (20150805)
SourcePackage: ndisc6
UpgradeStatus: No upgrade log present (probably fresh install)
rdnssd simply tracks the kernel notion's of what are the RDNSS at a time. The kernel did not send expiration for the entries when you left the network, hence the entries are considered still valid.
What you want is an integrated IPv4/IPv6 connection manager, like e.. network-manager. This is way out of scope of rdnssd.