summaryrefslogtreecommitdiffstats
path: root/include/net/net_namespace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r--include/net/net_namespace.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index d61e2b3..4faf661 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -110,6 +110,7 @@ struct net {
#endif
struct netns_ipvs *ipvs;
struct sock *diag_nlsk;
+ atomic_t rt_genid;
};
/*
@@ -315,5 +316,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 */
OpenPOWER on IntegriCloud