[NETFILTER]: Handle NAT in IPsec policy checks
Handle NAT of decapsulated IPsec packets by reconstructing the struct flowi of the original packet from the conntrack information for IPsec policy checks. 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
b59c270104
commit
eb9c7ebe69
@@ -22,6 +22,7 @@
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/netfilter.h>
|
||||
#include <linux/module.h>
|
||||
#include <net/xfrm.h>
|
||||
#include <net/ip.h>
|
||||
@@ -985,6 +986,7 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb,
|
||||
|
||||
if (xfrm_decode_session(skb, &fl, family) < 0)
|
||||
return 0;
|
||||
nf_nat_decode_session(skb, &fl, family);
|
||||
|
||||
sk_sid = security_sk_sid(sk, &fl, fl_dir);
|
||||
|
||||
|
Reference in New Issue
Block a user