diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-12-21 15:00:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-22 22:34:56 -0500 |
commit | a13861a28b90541aa207532d237e7a940f1b1c7b (patch) | |
tree | 5e7b03bdd6774897662dfc4e7a4bff09324fd306 /net | |
parent | b3b1b70e62a603f473619dbebc3b3d23f535e6f8 (diff) |
bridge: provide a mtu() method for fake_dst_ops
Commit 618f9bc74a039da76 (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 <bootc@bootc.net>
CC: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/br_netfilter.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index d6ec3720c77e..08757dc670a4 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c | |||
@@ -114,12 +114,18 @@ static struct neighbour *fake_neigh_lookup(const struct dst_entry *dst, const vo | |||
114 | return NULL; | 114 | return NULL; |
115 | } | 115 | } |
116 | 116 | ||
117 | static unsigned int fake_mtu(const struct dst_entry *dst) | ||
118 | { | ||
119 | return dst->dev->mtu; | ||
120 | } | ||
121 | |||
117 | static struct dst_ops fake_dst_ops = { | 122 | static struct dst_ops fake_dst_ops = { |
118 | .family = AF_INET, | 123 | .family = AF_INET, |
119 | .protocol = cpu_to_be16(ETH_P_IP), | 124 | .protocol = cpu_to_be16(ETH_P_IP), |
120 | .update_pmtu = fake_update_pmtu, | 125 | .update_pmtu = fake_update_pmtu, |
121 | .cow_metrics = fake_cow_metrics, | 126 | .cow_metrics = fake_cow_metrics, |
122 | .neigh_lookup = fake_neigh_lookup, | 127 | .neigh_lookup = fake_neigh_lookup, |
128 | .mtu = fake_mtu, | ||
123 | }; | 129 | }; |
124 | 130 | ||
125 | /* | 131 | /* |