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>
This commit is contained in:

committed by
David S. Miller

parent
fbda33b2b8
commit
7c2776ee21
@@ -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);
|
||||
|
Reference in New Issue
Block a user