Skip to content

Commit

Permalink
bridge: provide a mtu() method for fake_dst_ops
Browse files Browse the repository at this point in the history
Commit 618f9bc (net: Move mtu handling down to the protocol
depended handlers) forgot the bridge netfilter case, adding a NULL
dereference in ip_fragment().

Reported-by: Chris Boot <[email protected]>
CC: Steffen Klassert <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Acked-by: Steffen Klassert <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Eric Dumazet authored and davem330 committed Dec 23, 2011
1 parent b3b1b70 commit a13861a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/bridge/br_netfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

/*
Expand Down

0 comments on commit a13861a

Please sign in to comment.