mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
b59c270104
commit
eb9c7ebe69
5 changed files with 70 additions and 3 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue