aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-grsec/route-remove-redirect-genid.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-03-12 12:38:13 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-03-12 15:33:54 +0000
commitce55fee0bbc4ab5a81b930d244d716a3c4273983 (patch)
tree6e563f0f3e2d6ea7ce8d5348108092d3f08dae32 /main/linux-grsec/route-remove-redirect-genid.patch
parent4fc2408b8f327b1313c349b63f9eec60d8cfe13d (diff)
downloadaports-ce55fee0bbc4ab5a81b930d244d716a3c4273983.tar.bz2
aports-ce55fee0bbc4ab5a81b930d244d716a3c4273983.tar.xz
main/linux-grsec: upgrade to 3.2.9 update mtu fix patch
The mtu regression seems to have been fixed upstream. We backport.
Diffstat (limited to 'main/linux-grsec/route-remove-redirect-genid.patch')
-rw-r--r--main/linux-grsec/route-remove-redirect-genid.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/main/linux-grsec/route-remove-redirect-genid.patch b/main/linux-grsec/route-remove-redirect-genid.patch
new file mode 100644
index 0000000000..7c1d28b468
--- /dev/null
+++ b/main/linux-grsec/route-remove-redirect-genid.patch
@@ -0,0 +1,81 @@
+One hunk was remove from this patch.
+
+
+From: Steffen Klassert <steffen.klassert@secunet.com>
+Date: Tue, 6 Mar 2012 21:21:10 +0000 (+0000)
+Subject: route: Remove redirect_genid
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fdavem%2Fnet.git;a=commitdiff_plain;h=ac3f48de09d8f4b73397047e413fadff7f65cfa7
+
+route: Remove redirect_genid
+
+As we invalidate the inetpeer tree along with the routing cache now,
+we don't need a genid to reset the redirect handling when the routing
+cache is flushed.
+
+Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+
+diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
+index ff04a33..b94765e 100644
+--- a/include/net/inetpeer.h
++++ b/include/net/inetpeer.h
+@@ -35,7 +35,6 @@ struct inet_peer {
+
+ u32 metrics[RTAX_MAX];
+ u32 rate_tokens; /* rate limiting for ICMP */
+- int redirect_genid;
+ unsigned long rate_last;
+ unsigned long pmtu_expires;
+ u32 pmtu_orig;
+diff --git a/net/ipv4/route.c b/net/ipv4/route.c
+index 23ce0c1..0197747 100644
+--- a/net/ipv4/route.c
++++ b/net/ipv4/route.c
+@@ -132,7 +132,6 @@ static int ip_rt_mtu_expires __read_mostly = 10 * 60 * HZ;
+ static int ip_rt_min_pmtu __read_mostly = 512 + 20 + 20;
+ static int ip_rt_min_advmss __read_mostly = 256;
+ static int rt_chain_length_max __read_mostly = 20;
+-static int redirect_genid;
+
+ static struct delayed_work expires_work;
+ static unsigned long expires_ljiffies;
+@@ -937,7 +936,6 @@ static void rt_cache_invalidate(struct net *net)
+
+ get_random_bytes(&shuffle, sizeof(shuffle));
+ atomic_add_unchecked(shuffle + 1U, &net->ipv4.rt_genid);
+- redirect_genid++;
+ inetpeer_invalidate_tree(AF_INET);
+ }
+
+@@ -1486,10 +1484,8 @@ void ip_rt_redirect(__be32 old_gw, __be32 daddr, __be32 new_gw,
+
+ peer = rt->peer;
+ if (peer) {
+- if (peer->redirect_learned.a4 != new_gw ||
+- peer->redirect_genid != redirect_genid) {
++ if (peer->redirect_learned.a4 != new_gw) {
+ peer->redirect_learned.a4 = new_gw;
+- peer->redirect_genid = redirect_genid;
+ atomic_inc(&__rt_peer_genid);
+ }
+ check_peer_redir(&rt->dst, peer);
+@@ -1794,8 +1790,6 @@ static void ipv4_validate_peer(struct rtable *rt)
+ if (peer) {
+ check_peer_pmtu(&rt->dst, peer);
+
+- if (peer->redirect_genid != redirect_genid)
+- peer->redirect_learned.a4 = 0;
+ if (peer->redirect_learned.a4 &&
+ peer->redirect_learned.a4 != rt->rt_gateway)
+ check_peer_redir(&rt->dst, peer);
+@@ -1959,8 +1953,7 @@ static void rt_init_metrics(struct rtable *rt, const struct flowi4 *fl4,
+ dst_init_metrics(&rt->dst, peer->metrics, false);
+
+ check_peer_pmtu(&rt->dst, peer);
+- if (peer->redirect_genid != redirect_genid)
+- peer->redirect_learned.a4 = 0;
++
+ if (peer->redirect_learned.a4 &&
+ peer->redirect_learned.a4 != rt->rt_gateway) {
+ rt->rt_gateway = peer->redirect_learned.a4;