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

Commit a13861a2 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

bridge: provide a mtu() method for fake_dst_ops



Commit 618f9bc7 (net: Move mtu handling down to the protocol
depended handlers) forgot the bridge netfilter case, adding a NULL
dereference in ip_fragment().

Reported-by: default avatarChris Boot <bootc@bootc.net>
CC: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Acked-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b3b1b70e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -114,12 +114,18 @@ static struct neighbour *fake_neigh_lookup(const struct dst_entry *dst, const vo
	return NULL;
}

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

static struct dst_ops fake_dst_ops = {
	.family =		AF_INET,
	.protocol =		cpu_to_be16(ETH_P_IP),
	.update_pmtu =		fake_update_pmtu,
	.cow_metrics =		fake_cow_metrics,
	.neigh_lookup =		fake_neigh_lookup,
	.mtu =			fake_mtu,
};

/*