[kernel/f19] Resolves: rhbz 1040128

Neil Horman nhorman at fedoraproject.org
Tue Jan 14 15:28:54 UTC 2014


commit 492543916b8ae69f829444884d282d04c3e011fc
Author: Neil Horman <nhorman at tuxdriver.com>
Date:   Tue Jan 14 10:28:55 2014 -0500

    Resolves: rhbz 1040128

 ipv6-route-cache-expiration.patch |   35 +++++++++++++++++++++++++++++++++++
 kernel.spec                       |    9 +++++++++
 2 files changed, 44 insertions(+), 0 deletions(-)
---
diff --git a/ipv6-route-cache-expiration.patch b/ipv6-route-cache-expiration.patch
new file mode 100644
index 0000000..edae928
--- /dev/null
+++ b/ipv6-route-cache-expiration.patch
@@ -0,0 +1,35 @@
+commit 24f5b855e17df7e355eacd6c4a12cc4d6a6c9ff0
+Author: Li RongQing <roy.qing.li at gmail.com>
+Date:   Thu Dec 19 12:40:26 2013 +0800
+
+    ipv6: always set the new created dst's from in ip6_rt_copy
+    
+    ip6_rt_copy only sets dst.from if ort has flag RTF_ADDRCONF and RTF_DEFAULT.
+    but the prefix routes which did get installed by hand locally can have an
+    expiration, and no any flag combination which can ensure a potential from
+    does never expire, so we should always set the new created dst's from.
+    
+    This also fixes the new created dst is always expired since the ort, which
+    is created by RA, maybe has RTF_EXPIRES and RTF_ADDRCONF, but no RTF_DEFAULT.
+    
+    Suggested-by: Hannes Frederic Sowa <hannes at stressinduktion.org>
+    CC: Gao feng <gaofeng at cn.fujitsu.com>
+    Signed-off-by: Li RongQing <roy.qing.li at gmail.com>
+    Acked-by: Hannes Frederic Sowa <hannes at stressinduktion.org>
+    Signed-off-by: David S. Miller <davem at davemloft.net>
+
+diff --git a/net/ipv6/route.c b/net/ipv6/route.c
+index a0a48ac..4b4944c 100644
+--- a/net/ipv6/route.c
++++ b/net/ipv6/route.c
+@@ -1905,9 +1905,7 @@ static struct rt6_info *ip6_rt_copy(struct rt6_info *ort,
+ 		else
+ 			rt->rt6i_gateway = *dest;
+ 		rt->rt6i_flags = ort->rt6i_flags;
+-		if ((ort->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) ==
+-		    (RTF_DEFAULT | RTF_ADDRCONF))
+-			rt6_set_from(rt, ort);
++		rt6_set_from(rt, ort);
+ 		rt->rt6i_metric = 0;
+ 
+ #ifdef CONFIG_IPV6_SUBTREES
diff --git a/kernel.spec b/kernel.spec
index c523846..84e81bc 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -760,6 +760,9 @@ Patch25181: tg3-Add-support-for-new-577xx-device-ids.patch
 #rhbz 953211
 Patch25182: Input-ALPS-add-support-for-Dolphin-devices.patch
 
+#rhbz 1040128
+Patch25183: ipv6-route-cache-expiration.patch
+
 # END OF PATCH DEFINITIONS
 
 %endif
@@ -1459,6 +1462,9 @@ ApplyPatch tg3-Add-support-for-new-577xx-device-ids.patch
 #rhbz 953211
 ApplyPatch Input-ALPS-add-support-for-Dolphin-devices.patch
 
+#rhbz 1040128
+ApplyPatch ipv6-route-cache-expiration.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2271,6 +2277,9 @@ fi
 # and build.
 
 %changelog
+* Tue Jan 14 2014 Neil Horman <nhorman at redhat.com>
+- Backport ipv6 route cache expiration fix (rhbz 1040128)
+
 * Fri Jan 10 2014 Justin M. Forbes <jforbes at fedoraproject.org - 3.12.7-200
 - Linux v3.12.7
 


More information about the scm-commits mailing list