aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-grsec/0001-Revert-ipv4-Don-t-use-the-cached-pmtu-informations-f.patch
blob: 4b5f2ee94a9b9018d827a829385f4c9b557d8c6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 84799010fc72913eb398674f8da7df525bde8fcb Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Mon, 16 Jul 2012 08:14:31 +0200
Subject: [PATCH] Revert "ipv4: Don't use the cached pmtu informations for
 input routes"

This reverts commit 261663b0ee2ee8e3947f4c11c1a08be18cd2cea1.
---
 net/ipv4/route.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 167ea10..f21e282 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1917,15 +1917,15 @@ static unsigned int ipv4_default_advmss(const struct dst_entry *dst)
 
 static unsigned int ipv4_mtu(const struct dst_entry *dst)
 {
-	const struct rtable *rt = (const struct rtable *) dst;
 	unsigned int mtu = dst_metric_raw(dst, RTAX_MTU);
 
-	if (mtu && rt_is_output_route(rt))
+	if (mtu)
 		return mtu;
 
 	mtu = dst->dev->mtu;
 
 	if (unlikely(dst_metric_locked(dst, RTAX_MTU))) {
+		const struct rtable *rt = (const struct rtable *) dst;
 
 		if (rt->rt_gateway != rt->rt_dst && mtu > 576)
 			mtu = 576;
-- 
1.7.11.2