Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b600b26 authored by Steffen Klassert's avatar Steffen Klassert Committed by David S. Miller
Browse files

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: default avatarSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent df07a94c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -157,7 +157,7 @@ static struct dst_ops ip6_dst_ops_template = {

static unsigned int ip6_blackhole_default_mtu(const struct dst_entry *dst)
{
	return 0;
	return dst->dev->mtu;
}

static void ip6_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu)