aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mroute.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mroute.h')
-rw-r--r--include/linux/mroute.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/mroute.h b/include/linux/mroute.h
index 8a455694d682..0d45b4e8d367 100644
--- a/include/linux/mroute.h
+++ b/include/linux/mroute.h
@@ -193,6 +193,9 @@ struct vif_device
193struct mfc_cache 193struct mfc_cache
194{ 194{
195 struct mfc_cache *next; /* Next entry on cache line */ 195 struct mfc_cache *next; /* Next entry on cache line */
196#ifdef CONFIG_NET_NS
197 struct net *mfc_net;
198#endif
196 __be32 mfc_mcastgrp; /* Group the entry belongs to */ 199 __be32 mfc_mcastgrp; /* Group the entry belongs to */
197 __be32 mfc_origin; /* Source of packet */ 200 __be32 mfc_origin; /* Source of packet */
198 vifi_t mfc_parent; /* Source interface */ 201 vifi_t mfc_parent; /* Source interface */
@@ -215,6 +218,18 @@ struct mfc_cache
215 } mfc_un; 218 } mfc_un;
216}; 219};
217 220
221static inline
222struct net *mfc_net(const struct mfc_cache *mfc)
223{
224 return read_pnet(&mfc->mfc_net);
225}
226
227static inline
228void mfc_net_set(struct mfc_cache *mfc, struct net *net)
229{
230 write_pnet(&mfc->mfc_net, hold_net(net));
231}
232
218#define MFC_STATIC 1 233#define MFC_STATIC 1
219#define MFC_NOTIFY 2 234#define MFC_NOTIFY 2
220 235
@@ -241,7 +256,8 @@ struct mfc_cache
241 256
242#ifdef __KERNEL__ 257#ifdef __KERNEL__
243struct rtmsg; 258struct rtmsg;
244extern int ipmr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait); 259extern int ipmr_get_route(struct net *net, struct sk_buff *skb,
260 struct rtmsg *rtm, int nowait);
245#endif 261#endif
246 262
247#endif 263#endif