6lowpan: add helper to get 6lowpan namespace
This will simplify the new reassembly backport with no code changes being required. CC: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Cc: linux-zigbee-devel@lists.sourceforge.net Cc: David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
8465a5fcd1
commit
599018a710
@@ -373,6 +373,21 @@ static inline void rt_genid_bump_ipv6(struct net *net)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_IEEE802154_6LOWPAN)
|
||||
static inline struct netns_ieee802154_lowpan *
|
||||
net_ieee802154_lowpan(struct net *net)
|
||||
{
|
||||
return &net->ieee802154_lowpan;
|
||||
}
|
||||
#else
|
||||
static inline struct netns_ieee802154_lowpan *
|
||||
net_ieee802154_lowpan(struct net *net)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* For callers who don't really care about whether it's IPv4 or IPv6 */
|
||||
static inline void rt_genid_bump_all(struct net *net)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user