diff options
author | Arend van Spriel <arend@broadcom.com> | 2015-01-31 00:13:52 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2015-04-03 16:04:25 +0200 |
commit | 93556bd921c1664bd692bec176c8f5360e85c414 (patch) | |
tree | eecc7a36f1bedb7a8c3a1260af0bc06e43b6a796 | |
parent | dd4a670a90f21e83fa771f258ec8a48ef394abaf (diff) |
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 <vadim4j@gmail.com>
Date: Mon Jan 12 16:34:05 2015 +0200
nl80211: Allow set network namespace by fd
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r-- | backport/backport-include/net/net_namespace.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/backport/backport-include/net/net_namespace.h b/backport/backport-include/net/net_namespace.h index e83b103c..0ba73599 100644 --- a/backport/backport-include/net/net_namespace.h +++ b/backport/backport-include/net/net_namespace.h @@ -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 */ |