netns: move net->ipv4.rt_genid to net->rt_genid

This commit prepares the use of rt_genid by both IPv4 and IPv6.
Initialization is left in IPv4 part.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Nicolas Dichtel
2012-09-10 22:09:44 +00:00
committed by David S. Miller
parent 2885da7296
commit b42664f898
3 changed files with 12 additions and 8 deletions

View File

@@ -102,6 +102,7 @@ struct net {
#endif
struct netns_ipvs *ipvs;
struct sock *diag_nlsk;
atomic_t rt_genid;
};
@@ -300,5 +301,14 @@ static inline void unregister_net_sysctl_table(struct ctl_table_header *header)
}
#endif
static inline int rt_genid(struct net *net)
{
return atomic_read(&net->rt_genid);
}
static inline void rt_genid_bump(struct net *net)
{
atomic_inc(&net->rt_genid);
}
#endif /* __NET_NET_NAMESPACE_H */