backport: add backport for get_net_ns_by_fd()
PATCH v3 1/1 backport: add backport for get_net_ns_by_fd()
In mac80211-next a call to get_net_ns_by_fd() has been added in cfg80211 which resides in networking core. This function has been backported such that it will always fail, ie. as it would when CONFIG_NET_NS is not defined. The call was added by:
commit 4b681c82d2f9bef121c912ffcaac89a004af3f2c
Author: Vadim Kochan <[email protected]>
Date: Mon Jan 12 16:34:05 2015 +0200
nl80211: Allow set network namespace by fd
---
This patch replaces the V2 commit which has
Message-ID: <[email protected]>
Changes:
V2
- solve backport using LINUX_BACKPORT macro (Johannes Berg)
V3
- make backport conditional for kernel before 3.20 (Hauke Mehrtens)
--- backport/backport-include/net/net_namespace.h | 11 +++++++++++ 1 file changed, 11 insertions(+)
backport/backport-include/net/net_namespace.h +11 -0
@@ -24,4 +24,15 @@ net_ieee802154_lowpan(struct net *net)#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) */ #endif /* CPTCFG_IEEE802154_6LOWPAN */ +#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,20 ,0 ) +/* +* In older kernels we simply fail this function. +*/ +#define get_net_ns_by_fd LINUX_BACKPORT(get_net_ns_by_fd) +static inline struct net *get_net_ns_by_fd (int fd) +{ +return ERR_PTR (-EINVAL ); +} +#endif +#endif /* _COMPAT_NET_NET_NAMESPACE_H */
Signature · 1 line
1.9.1
Quoted 16 lines · Arend van Spriel
In mac80211-next a call to
get_net_ns_by_fd()has been added in cfg80211 which resides in networking core. This function has been backported such that it will always fail, ie. as it would whenCONFIG_NET_NSis not defined. The call was added by:commit
4b681c82d2f9bef121c912ffcaac89a004af3f2c
Author: Vadim Kochan <[email protected]>
Date: Mon Jan 12 16:34:05 2015 +0200nl80211: Allow set network namespace by fd
Signed-off-by Arend van Spriel <[email protected]>---
This patch replaces the V2 commit which has
Message-ID: <[email protected]>
Quoted 9 lines
Changes:
V2
- solve backport usingLINUX_BACKPORTmacro (Johannes Berg)
V3
- make backport conditional for kernel before 3.20 (Hauke Mehrtens)--- backport/backport-include/net/net_namespace.h | 11 +++++++++++ 1 file changed, 11 insertions(+)
Thank you for the patch it was applied to backports.
Hauke