diff options
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r-- | include/net/net_namespace.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index ae1cd6c9ba52..fd87963a0ea5 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -102,6 +102,7 @@ struct net { | |||
102 | #endif | 102 | #endif |
103 | struct netns_ipvs *ipvs; | 103 | struct netns_ipvs *ipvs; |
104 | struct sock *diag_nlsk; | 104 | struct sock *diag_nlsk; |
105 | atomic_t rt_genid; | ||
105 | }; | 106 | }; |
106 | 107 | ||
107 | 108 | ||
@@ -300,5 +301,14 @@ static inline void unregister_net_sysctl_table(struct ctl_table_header *header) | |||
300 | } | 301 | } |
301 | #endif | 302 | #endif |
302 | 303 | ||
304 | static inline int rt_genid(struct net *net) | ||
305 | { | ||
306 | return atomic_read(&net->rt_genid); | ||
307 | } | ||
308 | |||
309 | static inline void rt_genid_bump(struct net *net) | ||
310 | { | ||
311 | atomic_inc(&net->rt_genid); | ||
312 | } | ||
303 | 313 | ||
304 | #endif /* __NET_NET_NAMESPACE_H */ | 314 | #endif /* __NET_NET_NAMESPACE_H */ |