aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-grsec/0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-05-27 11:33:43 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-06-03 14:00:27 +0000
commit87760fec3a0aa1087b85e5c96b0e6fc16c4b87e7 (patch)
tree398e2a7484c7b008b39b4e480e76bff41d21100c /main/linux-grsec/0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch
parent4d918a907f0cde4ac412b82ba2f9fef910490ef2 (diff)
downloadaports-87760fec3a0aa1087b85e5c96b0e6fc16c4b87e7.tar.gz
aports-87760fec3a0aa1087b85e5c96b0e6fc16c4b87e7.tar.bz2
aports-87760fec3a0aa1087b85e5c96b0e6fc16c4b87e7.tar.xz
main/linux-grsec: upgrade to 3.9.4 and use reworked arp and frag patches
fixes #1782 (cherry picked from commit a43c9a4092402400bd3f008d2841a468773ddad0)
Diffstat (limited to 'main/linux-grsec/0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch')
-rw-r--r--main/linux-grsec/0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/main/linux-grsec/0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch b/main/linux-grsec/0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch
new file mode 100644
index 0000000000..9b2ad89132
--- /dev/null
+++ b/main/linux-grsec/0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch
@@ -0,0 +1,37 @@
+From 90f586dba1465a73295d752abe2451e924ba1888 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Mon, 27 May 2013 08:33:10 +0300
+Subject: [PATCH 4/6] ipv4: rate limit updating of next hop exceptions with
+ same pmtu
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The tunnel devices call update_pmtu for each packet sent, this causes
+contention on the fnhe_lock. Ignore the pmtu update if pmtu is not
+actually changed, and there is still plenty of time before the entry
+expires.
+
+Signed-off-by: Timo Teräs <timo.teras@iki.fi>
+---
+ net/ipv4/route.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/net/ipv4/route.c b/net/ipv4/route.c
+index 8dedfeb..85b9c07 100644
+--- a/net/ipv4/route.c
++++ b/net/ipv4/route.c
+@@ -947,6 +947,10 @@ static void __ip_rt_update_pmtu(struct rtable *rt, struct flowi4 *fl4, u32 mtu)
+ if (mtu < ip_rt_min_pmtu)
+ mtu = ip_rt_min_pmtu;
+
++ if (rt->rt_pmtu == mtu &&
++ time_before(jiffies, dst->expires - ip_rt_mtu_expires / 2))
++ return;
++
+ rcu_read_lock();
+ if (fib_lookup(dev_net(dst->dev), fl4, &res) == 0) {
+ struct fib_nh *nh = &FIB_RES_NH(res);
+--
+1.8.2.3
+