diff options
author | Paul Moore <pmoore@redhat.com> | 2013-05-29 03:36:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-31 20:30:07 -0400 |
commit | e4c1721642bbd42d8142f4811cde0588c28db51d (patch) | |
tree | 8f7750f6065dcb5d2bd727174fb9f4e3cd8fccf3 /include | |
parent | 1e2bd517c108816220f262d7954b697af03b5f9c (diff) |
xfrm: force a garbage collection after deleting a policy
In some cases after deleting a policy from the SPD the policy would
remain in the dst/flow/route cache for an extended period of time
which caused problems for SELinux as its dynamic network access
controls key off of the number of XFRM policy and state entries.
This patch corrects this problem by forcing a XFRM garbage collection
whenever a policy is sucessfully removed.
Reported-by: Ondrej Moris <omoris@redhat.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/xfrm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index ae16531d0d35..94ce082b29dc 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -1160,6 +1160,8 @@ static inline void xfrm_sk_free_policy(struct sock *sk) | |||
1160 | } | 1160 | } |
1161 | } | 1161 | } |
1162 | 1162 | ||
1163 | extern void xfrm_garbage_collect(struct net *net); | ||
1164 | |||
1163 | #else | 1165 | #else |
1164 | 1166 | ||
1165 | static inline void xfrm_sk_free_policy(struct sock *sk) {} | 1167 | static inline void xfrm_sk_free_policy(struct sock *sk) {} |
@@ -1194,6 +1196,9 @@ static inline int xfrm6_policy_check_reverse(struct sock *sk, int dir, | |||
1194 | { | 1196 | { |
1195 | return 1; | 1197 | return 1; |
1196 | } | 1198 | } |
1199 | static inline void xfrm_garbage_collect(struct net *net) | ||
1200 | { | ||
1201 | } | ||
1197 | #endif | 1202 | #endif |
1198 | 1203 | ||
1199 | static __inline__ | 1204 | static __inline__ |