Bug 530670

Summary: NM does not add IPv6 nameservers learned from SLAAC to resolv.conf
Product: [Fedora] Fedora Reporter: Tore Anderson <tore>
Component: NetworkManagerAssignee: Dan Williams <dcbw>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: amlau, dcbw, i.grok
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: NetworkManager-0.8.1-0.1.git20100510.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-04 23:50:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 195271    

Description Tore Anderson 2009-10-24 02:31:06 UTC
Description of problem:

Router advertisements might contain attributes containing information about what recursive DNS resolvers are to be used (see RFC 5006).  However, NM doesn't add these to /etc/resolv.conf so the

Version-Release number of selected component (if applicable):

Fedora 12 beta, NetworkManager 0.7.996-4.git20091002.fc12.i686

How reproducible:

100%

Steps to Reproduce:
1. Install F12 beta on a IPv6-enabled network where the router advertisements contains RDNSS attributes (radvd can do this).  Change the IPv6 method setting to automatic.
2. Reboot, or re-init the network connection.
  
Actual results:

The /etc/resolv.conf file contains only IPv4 nameserver(s) or no nameservers, depending on the IPv4 environment.

Expected results:

The IPv6 nameservers contained in the router advertisements are added to the resolv.conf file (along with IPv4 nameservers, if any).

Additional info:

Comment 1 Bug Zapper 2009-11-16 14:09:22 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Tore Anderson 2009-11-18 16:30:01 UTC
I've been testing a bit more.  Sometimes, but not always, is the RDNSS-announced nameservers added to the resolv.conf file.  I have not yet found out what exactly happens when it works and what happens when it don't...

Tore

Comment 3 Tore Anderson 2009-11-18 16:47:51 UTC
I think I've nailed it.  If the kernel is performing SLAAC at the same time as NM is activating an interface, and NM has the IPv6 mode set to "automatic", the IPv6 nameservers are added to /etc/resolv.conf.  If you then disconnect from the network and reconnect, the connection fails completely (because the SLAAC address is removed by NM as the connection is taken down, see bug #530669 - that bug seems very closely related to this one).  You can however work around this by forcing the kernel to re-do SLAAC ("ip link set dev wlan0 down; ip link set dev wlan0 up" while NM is disconnected does the trick for me).

However, if you first connected to the network using IPv6 mode "ignore", then disconnect, change to "automatic" and then reconnect, it will successfully reconnect but _NOT_ add the IPv6 nameservers to /etc/resolv.conf.  I assume this is because when NM is in "ignore" mode it will not remove the SLAAC-configured address when it's disconnecing, so when it reconnects with mode automatic, the already-configured address is enough to make the "automatic" mode not fail, but since SLAAC isn't performed at that point, NM does't pick up the nameservers.

It seems like the kernel will only perform SLAAC automatically when the interface looses its NO-CARRIER flag for the first time after having been set to UP.  So one workaround would be for NM to down/up the interface when it's disconnecting/reconnecting, or to somehow explicitly tell the kernel to perform SLAAC again when it's reconnecting.

Tore

Comment 4 Dan Williams 2010-02-09 01:49:14 UTC
Thanks for the analysis, I'll dig into this more and see what we can do to make this work better.

Comment 5 Fedora Update System 2010-04-27 07:55:43 UTC
NetworkManager-0.8.0-8.git20100426.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/NetworkManager-0.8.0-8.git20100426.fc13

Comment 6 Fedora Update System 2010-04-27 07:57:04 UTC
NetworkManager-0.8.0-8.git20100426.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/NetworkManager-0.8.0-8.git20100426.fc12

Comment 7 Fedora Update System 2010-04-28 01:15:22 UTC
NetworkManager-0.8.0-8.git20100426.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update NetworkManager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/NetworkManager-0.8.0-8.git20100426.fc13

Comment 8 Fedora Update System 2010-04-28 01:20:08 UTC
NetworkManager-0.8.0-8.git20100426.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update NetworkManager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/NetworkManager-0.8.0-8.git20100426.fc12

Comment 9 Fedora Update System 2010-04-30 23:49:28 UTC
NetworkManager-0.8.0-9.git20100429.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update NetworkManager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/NetworkManager-0.8.0-9.git20100429.fc13

Comment 10 Scott Schmit 2010-05-02 22:29:18 UTC
This appears to be 99.99% fixed by NetworkManager-0.8.0-10.git20100502.fc12.x86_64. During my testing, I only once saw NM not add my RDNSS configuration to /etc/resolv.conf. Every other time, it's worked.

Comment 12 Fedora Update System 2010-05-04 06:12:31 UTC
NetworkManager-0.8.0-11.git20100503.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update NetworkManager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/NetworkManager-0.8.0-11.git20100503.fc13

Comment 13 Fedora Update System 2010-05-04 06:14:24 UTC
NetworkManager-0.8.0-11.git20100503.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update NetworkManager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/NetworkManager-0.8.0-11.git20100503.fc12

Comment 14 Fedora Update System 2010-05-04 23:49:54 UTC
NetworkManager-0.8.0-11.git20100503.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2010-05-05 09:15:33 UTC
NetworkManager-0.8.0-12.git20100504.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/NetworkManager-0.8.0-12.git20100504.fc13

Comment 16 Fedora Update System 2010-05-05 09:18:18 UTC
NetworkManager-0.8.0-12.git20100504.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/NetworkManager-0.8.0-12.git20100504.fc12

Comment 17 Fedora Update System 2010-05-06 07:01:05 UTC
NetworkManager-0.8.0-12.git20100504.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2010-05-11 06:54:07 UTC
NetworkManager-0.8.1-0.1.git20100510.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/NetworkManager-0.8.1-0.1.git20100510.fc12

Comment 19 Fedora Update System 2010-06-10 19:05:41 UTC
NetworkManager-0.8.1-0.1.git20100510.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.