diff options
author | Christian Brauner <christian@brauner.io> | 2018-09-04 21:53:47 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-06 07:27:11 +0200 |
commit | c383edc42403b0bca31cbaabafd44dd58afb202f (patch) | |
tree | e3f10f170946ec3834049ffce04402802a052ad9 /include/net/rtnetlink.h | |
parent | Merge branch 'net-lan78xx-Minor-improvements' (diff) | |
download | linux-c383edc42403b0bca31cbaabafd44dd58afb202f.tar.xz linux-c383edc42403b0bca31cbaabafd44dd58afb202f.zip |
rtnetlink: add rtnl_get_net_ns_capable()
get_target_net() will be used in follow-up patches in ipv{4,6} codepaths to
retrieve network namespaces based on network namespace identifiers. So
remove the static declaration and export in the rtnetlink header. Also,
rename it to rtnl_get_net_ns_capable() to make it obvious what this
function is doing.
Export rtnl_get_net_ns_capable() so it can be used when ipv6 is built as
a module.
Signed-off-by: Christian Brauner <christian@brauner.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/rtnetlink.h')
-rw-r--r-- | include/net/rtnetlink.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h index 0bbaa5488423..cf26e5aacac4 100644 --- a/include/net/rtnetlink.h +++ b/include/net/rtnetlink.h @@ -165,6 +165,7 @@ int rtnl_configure_link(struct net_device *dev, const struct ifinfomsg *ifm); int rtnl_nla_parse_ifla(struct nlattr **tb, const struct nlattr *head, int len, struct netlink_ext_ack *exterr); +struct net *rtnl_get_net_ns_capable(struct sock *sk, int netnsid); #define MODULE_ALIAS_RTNL_LINK(kind) MODULE_ALIAS("rtnl-link-" kind) |