Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 661393

Summary: [IPv6] a specific route is ignored if the default gateway is reachable
Product: Red Hat Enterprise Linux 5 Reporter: Flavio Leitner <fleitner>
Component: kernelAssignee: Thomas Graf <tgraf>
Status: CLOSED ERRATA QA Contact: Hangbin Liu <haliu>
Severity: high Docs Contact:
Priority: high    
Version: 5.5CC: cww, haliu, jwest, rkhan
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-13 22:03:26 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 Flavio Leitner 2010-12-08 17:57:15 UTC
Description of problem:

The issue is reproducible only if I trying to reach the non-default gateway after sending some packets though default gateway.

For example:

Boot the machine (with default and non-default route set).

ping the machine though non-default gw   -> works

Boot the machine.

ping the default gw or any traffic though default gw
then ping the machine though non-default gw -> does not work.

========================

Current status

=========================

 *Routing Table* at the startup.

[root@dhcp209-198 ~]# !route
route -A inet6
Kernel IPv6 routing table
Destination                                 Next Hop                                Flags Metric Ref    Use Iface
2001:db8:abc:def::/64                       2001:db8:fedc:abcd::25                  UG    1      0        0 eth0    
2001:db8:fedc:abcd::/64                     *                                       U     256    1        0 eth0    
2001:db8:fedc:cdef::/64                     *                                       U     256    1        0 eth1    
fe80::/64                                   *                                       U     256    0        0 eth0    
fe80::/64                                   *                                       U     256    0        0 eth1    
*/0                                         2001:db8:fedc:cdef::100                 UG    1      0        0 eth1    
localhost6.localdomain6/128                 *                                       U     0      2        1 lo      
2001:db8:fedc:abcd::1/128                   *                                       U     0      0        1 lo      
2001:db8:fedc:cdef::1/128                   *                                       U     0      0        1 lo      
fe80::21a:4aff:fe41:d0e0/128                *                                       U     0      0        1 lo      
fe80::21a:4aff:fe41:d0e1/128                *                                       U     0      0        1 lo      
ff00::/8                                    *                                       U     256    0        0 eth0    
ff00::/8                                    *                                       U     256    0        0 eth1    

* ip -6 neigh output.

[root@dhcp209-198 ~]# ip -6 neigh

* ping default gw

[root@dhcp209-198 ~]# ping6 2001:db8:fedc:cdef::100
PING 2001:db8:fedc:cdef::100(2001:db8:fedc:cdef::100) 56 data bytes
64 bytes from 2001:db8:fedc:cdef::100: icmp_seq=0 ttl=64 time=4.81 ms
64 bytes from 2001:db8:fedc:cdef::100: icmp_seq=1 ttl=64 time=0.317 ms

--- 2001:db8:fedc:cdef::100 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.317/2.565/4.813/2.248 ms, pipe 2

[root@dhcp209-198 ~]# ip -6 neigh
2001:db8:fedc:cdef::100 dev eth1 lladdr 00:13:72:f8:c1:20 REACHABLE

* ping remote machine (though non-def gw)

[root@dhcp209-198 ~]# ping6  2001:db8:abc:def::60
PING 2001:db8:abc:def::60(2001:db8:abc:def::60) 56 data bytes
From 2001:db8:fedc:cdef::100 icmp_seq=0 Destination unreachable: No route
From 2001:db8:fedc:cdef::100 icmp_seq=1 Destination unreachable: No route

--- 2001:db8:abc:def::60 ping statistics ---
2 packets transmitted, 0 received, +2 errors, 100% packet loss, time 1001ms

[root@dhcp209-198 ~]# ip -6 neigh
2001:db8:fedc:cdef::100 dev eth1 lladdr 00:13:72:f8:c1:20 REACHABLE
fe80::213:72ff:fef8:c120 dev eth1 lladdr 00:13:72:f8:c1:20 REACHABLE

* ping non-def gw

[root@dhcp209-198 ~]# ping6  2001:db8:fedc:abcd::25
PING 2001:db8:fedc:abcd::25(2001:db8:fedc:abcd::25) 56 data bytes
64 bytes from 2001:db8:fedc:abcd::25: icmp_seq=0 ttl=64 time=3.06 ms
64 bytes from 2001:db8:fedc:abcd::25: icmp_seq=1 ttl=64 time=3.63 ms
--- 2001:db8:fedc:abcd::25 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 3.064/3.351/3.639/0.293 ms, pipe 2

[root@dhcp209-198 ~]# ip -6 neigh
2001:db8:fedc:cdef::100 dev eth1 lladdr 00:13:72:f8:c1:20 STALE
fe80::213:72ff:fef8:c120 dev eth1 lladdr 00:13:72:f8:c1:20 STALE
2001:db8:fedc:abcd::25 dev eth0 lladdr 00:1a:4a:41:d0:08 router REACHABLE

* ping remote box 

[root@dhcp209-198 ~]# ping6  2001:db8:abc:def::60
PING 2001:db8:abc:def::60(2001:db8:abc:def::60) 56 data bytes
64 bytes from 2001:db8:abc:def::60: icmp_seq=0 ttl=63 time=3.48 ms
64 bytes from 2001:db8:abc:def::60: icmp_seq=1 ttl=63 time=1.67 ms

--- 2001:db8:abc:def::60 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 1.674/2.578/3.482/0.904 ms, pipe 2

[root@dhcp209-198 ~]# ip -6 neigh
2001:db8:fedc:cdef::100 dev eth1 lladdr 00:13:72:f8:c1:20 STALE
fe80::213:72ff:fef8:c120 dev eth1 lladdr 00:13:72:f8:c1:20 STALE
fe80::21a:4aff:fe41:d008 dev eth0 lladdr 00:1a:4a:41:d0:08 router REACHABLE
2001:db8:fedc:abcd::25 dev eth0 lladdr 00:1a:4a:41:d0:08 router REACHABLE


Version-Release number of selected component (if applicable):
tested -194.el5 and -164.9.1 and they had failed.

How reproducible:
Always
  
Actual results:
The host is unreachable

Expected results:
The specific route be selected and used.

Additional info:
The upstream patch below fixes the scoring problem where only routers in "FAILED" state should be considered unreachable.

---<> cut here <>----
From: YOSHIFUJI Hideaki <yoshfuji>
Date: Mon, 6 Nov 2006 17:45:44 +0000 (-0800)
Subject: [IPV6] ROUTE: Try to use router which is not known unreachable.
X-Git-Tag: v2.6.19~56^2~16
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=ea73ee23c43d6eb75f88c4fc9e1230b44673c0d2

[IPV6] ROUTE: Try to use router which is not known unreachable.

Only routers in "FAILED" state should be considered unreachable.
Otherwise, we do not try to use speicific routes unless all least specific
routers are considered unreachable.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji>
---

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index c953466..5132821 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -330,6 +330,8 @@ static int inline rt6_check_neigh(struct rt6_info *rt)
 		read_lock_bh(&neigh->lock);
 		if (neigh->nud_state & NUD_VALID)
 			m = 2;
+		else if (!(neigh->nud_state & NUD_FAILED))
+			m = 1;
 		read_unlock_bh(&neigh->lock);
 	}
 	return m;

---<> cut here <>----

Link to the upstream git tree: 
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ea73ee23c43d6eb75f88c4fc9e1230b44673c0d2

This is the brew build URL (internal) of the testing kernel with the backported patch:
https://brewweb.devel.redhat.com/taskinfo?taskID=2939324

CVS TAG:
kernel-2_6_18-164_9_1_el5_gss00368071_1

Testing feedback:
I have successfully tested both -194.el5 and -164.9.1 versions in my testing setup.

Customer reports the testing kernel built on brew works out in all his tests.

Comment 1 RHEL Program Management 2010-12-09 14:20:12 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Jarod Wilson 2010-12-14 14:28:52 UTC
in kernel-2.6.18-237.el5
You can download this test kernel (or newer) from http://people.redhat.com/jwilson/el5

Detailed testing feedback is always welcomed.

Comment 12 errata-xmlrpc 2011-01-13 22:03:26 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0017.html