summaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-02-21 22:37:35 +0100
committerDavid S. Miller <davem@sunset.davemloft.net>2006-02-24 01:10:51 +0100
commit42cf93cd464e0df3c85d298c647411bae6d99e6e (patch)
treef68f155f6eedbac8ac8c32c8c947d5a2f6cb2033 /net/bridge
parentsbp2: update 36byte inquiry workaround (fix compatibility regression) (diff)
downloadlinux-42cf93cd464e0df3c85d298c647411bae6d99e6e.tar.xz
linux-42cf93cd464e0df3c85d298c647411bae6d99e6e.zip
[NETFILTER]: Fix bridge netfilter related in xfrm_lookup
The bridge-netfilter code attaches a fake dst_entry with dst->ops == NULL to purely bridged packets. When these packets are SNATed and a policy lookup is done, xfrm_lookup crashes because it tries to dereference dst->ops. Change xfrm_lookup not to dereference dst->ops before checking for the DST_NOXFRM flag and set this flag in the fake dst_entry. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_netfilter.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 6bb0c7eb1ef0..e060aad8624d 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -90,6 +90,7 @@ static struct rtable __fake_rtable = {
.dev = &__fake_net_device,
.path = &__fake_rtable.u.dst,
.metrics = {[RTAX_MTU - 1] = 1500},
+ .flags = DST_NOXFRM,
}
},
.rt_flags = 0,