]> git.baikalelectronics.ru Git - kernel.git/commit
netns xfrm: deal with dst entries in netns
authorAlexey Dobriyan <adobriyan@gmail.com>
Mon, 25 Jan 2010 06:47:53 +0000 (22:47 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Jan 2010 06:47:53 +0000 (22:47 -0800)
commita33a8e930a82d2416c21503c0ac9b1ce21a038d2
tree1a3c9e7b6c0c9158ddb73faa05b07697c3493cf1
parentdda26c3434e0f1c033f0d788bfd77e26d7af1b97
netns xfrm: deal with dst entries in netns

GC is non-existent in netns, so after you hit GC threshold, no new
dst entries will be created until someone triggers cleanup in init_net.

Make xfrm4_dst_ops and xfrm6_dst_ops per-netns.
This is not done in a generic way, because it woule waste
(AF_MAX - 2) * sizeof(struct dst_ops) bytes per-netns.

Reorder GC threshold initialization so it'd be done before registering
XFRM policies.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/netns/xfrm.h
net/ipv4/xfrm4_policy.c
net/ipv6/xfrm6_policy.c
net/xfrm/xfrm_policy.c