diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mroute.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index 8a455694d682..beaf3aae8aaf 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
@@ -193,6 +193,9 @@ struct vif_device | |||
193 | struct mfc_cache | 193 | struct 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 | ||
221 | static inline | ||
222 | struct net *mfc_net(const struct mfc_cache *mfc) | ||
223 | { | ||
224 | return read_pnet(&mfc->mfc_net); | ||
225 | } | ||
226 | |||
227 | static inline | ||
228 | void 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 | ||