[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>
This commit is contained in:
committed by
David S. Miller
parent
a80614d1ad
commit
42cf93cd46
@@ -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,
|
||||
|
Reference in New Issue
Block a user