Bug 589830

Summary: IPv6 link local connection gets an incomplete routing table if link-local address already assigned
Product: [Fedora] Fedora Reporter: Scott Schmit <i.grok>
Component: NetworkManagerAssignee: Dan Williams <dcbw>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dcbw
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 587836 Environment:
Last Closed: 2010-05-26 19:47:08 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:

Description Scott Schmit 2010-05-07 02:56:11 UTC
Description of problem:
When bringing up an interface that already has an IPv6 link local address assigned, the routing table doesn't get configured correctly when connecting with IPv6 link-local only.

Version-Release number of selected component (if applicable):
NetworkManager-0.8.0-12.1.git20100504.fc12.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Connect to a connection that causes the IPv6 link-local address to be set
2. Disconnect
3. Connect to an IPv6 link-local only connection
6. ping6 -I <iface> ff02::1
  
Actual results:
connect: Network is unreachable

Expected results:
ping6 should work

Additional info:
This works if I remove all the IPv6 addresses from the interface while it's down before bringing the interface back up.

It also works if the IPv6 method is automatic; automatic, address only; or manual (on a network with RA + RDNSS, but not DHCPv6).

Sample script:

Start with nothing:

# ip addr show dev wlan0
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
# ip -6 route
<empty>
# route -A inet6
Kernel IPv6 routing table
Destination                                 Next Hop                                Flags Metric Ref    Use Iface
localhost6.localdomain6/128                 *                                       U     0      6        1 lo

Connect via connection with IPv6 set to link local (I kept IPv4 disabled for simplicity):
# ip addr show dev wlan0
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet6 fe80::xxxx:xxxx:xxxx:xxxx/64 scope link 
       valid_lft forever preferred_lft forever
# ip -6 route
fe80::/64 dev wlan0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 4294967295
# route -A inet6 -n
Kernel IPv6 routing table
Destination                                 Next Hop                                Flags Metric Ref    Use Iface
fe80::/64                                   ::                                      U     256    0        0 wlan0   
::1/128                                     ::                                      U     0      6        1 lo      
fe80::xxxx:xxxx:xxxx:xxxx/128                ::                                      U     0      0        1 lo      
ff02::1/128                                 ff02::1                                 UC    0      8        0 wlan0   
ff00::/8                                    ::                                      U     256    0        0 wlan0   
<I hate that they don't match>

disconnect
# ip addr show dev wlan0
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet6 fe80::xxxx:xxxx:xxxx:xxxx/64 scope link 
       valid_lft forever preferred_lft forever
# ip -6 route
<empty>
# route -A inet6 -n
Kernel IPv6 routing table
Destination                                 Next Hop                                Flags Metric Ref    Use Iface
::1/128                                     ::                                      U     0      6        1 lo      
fe80::xxxx:xxxx:xxxx:xxxx/128                ::                                      U     0      0        1 lo    

Then connect via the same connection
# ip addr show dev wlan0
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet6 fe80::xxxx:xxxx:xxxx:xxxx/64 scope link 
       valid_lft forever preferred_lft forever
$ ip -6 route
fe80::/64 dev wlan0  proto kernel  metric 256  mtu 1280 advmss 1220 hoplimit 4294967295
$ ping6 ff02::1%wlan0
connect: Network is unreachable
$ route -nA inet6
Kernel IPv6 routing table
Destination                                 Next Hop                                Flags Metric Ref    Use Iface
fe80::/64                                   ::                                      U     256    0        0 wlan0   
::1/128                                     ::                                      U     0      8        1 lo      
fe80::xxxx:xxxx:xxxx:xxxx/128                ::                                      U     0      0        1 lo

Comment 1 Dan Williams 2010-05-26 19:47:08 UTC
I can't trigger this anymore with latest NM testing update (20100510 or later).  It appears to have been fixed by bug 587836 since the check there ensures that multi-cast link-local addresses are not removed when NM takes the itnerface down, and ff02::1 is an MC Link-Local address.

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

If it's not fixed in that update, please re-open and we can debug further.  Thanks!