diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-11-25 17:57:44 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-25 17:57:44 -0800 |
commit | 7c2776ee21a60e0d370538bd08b9ed82979f6e3a (patch) | |
tree | c8b9757f6989216c00b5ca9e09ee074662fff586 /net/xfrm/xfrm_state.c | |
parent | fbda33b2b85941c1ae3a0d89522dec5c1b1bd98c (diff) | |
download | talos-op-linux-7c2776ee21a60e0d370538bd08b9ed82979f6e3a.tar.gz talos-op-linux-7c2776ee21a60e0d370538bd08b9ed82979f6e3a.zip |
netns xfrm: flush SA/SPDs on netns stop
SA/SPD doesn't pin netns (and it shouldn't), so get rid of them by hand.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_state.c')
-rw-r--r-- | net/xfrm/xfrm_state.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index d594b5af5f6b..662e47b0bcc3 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -2114,8 +2114,16 @@ out_bydst: void xfrm_state_fini(struct net *net) { + struct xfrm_audit audit_info; unsigned int sz; + flush_work(&net->xfrm.state_hash_work); + audit_info.loginuid = -1; + audit_info.sessionid = -1; + audit_info.secid = 0; + xfrm_state_flush(net, IPSEC_PROTO_ANY, &audit_info); + flush_work(&net->xfrm.state_gc_work); + WARN_ON(!list_empty(&net->xfrm.state_all)); sz = (net->xfrm.state_hmask + 1) * sizeof(struct hlist_head); |