summaryrefslogtreecommitdiffstats
path: root/include/linux/mroute6.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mroute6.h')
-rw-r--r--include/linux/mroute6.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h
index 2cd9901ee5c7..15d85fe12bbd 100644
--- a/include/linux/mroute6.h
+++ b/include/linux/mroute6.h
@@ -188,6 +188,9 @@ struct mif_device
struct mfc6_cache
{
struct mfc6_cache *next; /* Next entry on cache line */
+#ifdef CONFIG_NET_NS
+ struct net *mfc6_net;
+#endif
struct in6_addr mf6c_mcastgrp; /* Group the entry belongs to */
struct in6_addr mf6c_origin; /* Source of packet */
mifi_t mf6c_parent; /* Source interface */
@@ -210,6 +213,18 @@ struct mfc6_cache
} mfc_un;
};
+static inline
+struct net *mfc6_net(const struct mfc6_cache *mfc)
+{
+ return read_pnet(&mfc->mfc6_net);
+}
+
+static inline
+void mfc6_net_set(struct mfc6_cache *mfc, struct net *net)
+{
+ write_pnet(&mfc->mfc6_net, hold_net(net));
+}
+
#define MFC_STATIC 1
#define MFC_NOTIFY 2