mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
netns xfrm: pass netns with KM notifications
SA and SPD flush are executed with NULL SA and SPD respectively, for these cases pass netns explicitly from userspace socket. Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
fc34acd36e
commit
7067802e26
3 changed files with 7 additions and 2 deletions
|
|
@ -1739,6 +1739,7 @@ static int pfkey_flush(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hd
|
|||
c.seq = hdr->sadb_msg_seq;
|
||||
c.pid = hdr->sadb_msg_pid;
|
||||
c.event = XFRM_MSG_FLUSHSA;
|
||||
c.net = &init_net;
|
||||
km_state_notify(NULL, &c);
|
||||
|
||||
return 0;
|
||||
|
|
@ -2693,6 +2694,7 @@ static int pfkey_spdflush(struct sock *sk, struct sk_buff *skb, struct sadb_msg
|
|||
c.event = XFRM_MSG_FLUSHPOLICY;
|
||||
c.pid = hdr->sadb_msg_pid;
|
||||
c.seq = hdr->sadb_msg_seq;
|
||||
c.net = &init_net;
|
||||
km_policy_notify(NULL, 0, &c);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue