aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorfan.du <fan.du@windriver.com>2013-07-29 20:33:53 -0400
committerDavid S. Miller <davem@davemloft.net>2013-07-31 17:56:36 -0400
commitca4c3fc24e293719fe7410c4e63da9b6bc633b83 (patch)
tree0461841f3d10b11a26ebe1a0adc99c7b00a489a2 /security
parentba361cb3d4c977e2b94b5d97905f66b4d48964de (diff)
net: split rt_genid for ipv4 and ipv6
Current net name space has only one genid for both IPv4 and IPv6, it has below drawbacks: - Add/delete an IPv4 address will invalidate all IPv6 routing table entries. - Insert/remove XFRM policy will also invalidate both IPv4/IPv6 routing table entries even when the policy is only applied for one address family. Thus, this patch attempt to split one genid for two to cater for IPv4 and IPv6 separately in a fine granularity. Signed-off-by: Fan Du <fan.du@windriver.com> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/include/xfrm.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/security/selinux/include/xfrm.h b/security/selinux/include/xfrm.h
index 65f67cb0aefb..6713f04e30ba 100644
--- a/security/selinux/include/xfrm.h
+++ b/security/selinux/include/xfrm.h
@@ -50,8 +50,13 @@ int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ckall);
50 50
51static inline void selinux_xfrm_notify_policyload(void) 51static inline void selinux_xfrm_notify_policyload(void)
52{ 52{
53 struct net *net;
54
53 atomic_inc(&flow_cache_genid); 55 atomic_inc(&flow_cache_genid);
54 rt_genid_bump(&init_net); 56 rtnl_lock();
57 for_each_net(net)
58 rt_genid_bump_all(net);
59 rtnl_unlock();
55} 60}
56#else 61#else
57static inline int selinux_xfrm_enabled(void) 62static inline int selinux_xfrm_enabled(void)