summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2011-11-23 03:12:13 +0100
committerDavid S. Miller <davem@davemloft.net>2011-11-26 20:29:50 +0100
commit6b600b26c0215bf9ed04062ecfacf0bc20e2588c (patch)
treea3dbd36f83c8c3d813b1422e472af6a31ace40d2 /net/ipv4
parentnetns: fix proxy ARP entries listing on a netns (diff)
downloadlinux-6b600b26c0215bf9ed04062ecfacf0bc20e2588c.tar.xz
linux-6b600b26c0215bf9ed04062ecfacf0bc20e2588c.zip
route: Use the device mtu as the default for blackhole routes
As it is, we return null as the default mtu of blackhole routes. This may lead to a propagation of a bogus pmtu if the default_mtu method of a blackhole route is invoked. So return dst->dev->mtu as the default mtu instead. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 0c74da8a0473..5b17bf124a33 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2757,7 +2757,7 @@ static struct dst_entry *ipv4_blackhole_dst_check(struct dst_entry *dst, u32 coo
static unsigned int ipv4_blackhole_default_mtu(const struct dst_entry *dst)
{
- return 0;
+ return dst->dev->mtu;
}
static void ipv4_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu)