diff options
author | Jiri Benc <jbenc@redhat.com> | 2017-11-02 17:04:38 -0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-05 21:49:17 +0900 |
commit | 79e1ad148c844f5c8b9d76b36b26e3886dca95ae (patch) | |
tree | 5f627e30c0f3972db04c2e012474dc5486d8955b /sound/soc/samsung/smdk_wm8994pcm.c | |
parent | 9354d452034273a50a4fd703bea31e5d6b1fc20b (diff) |
rtnetlink: use netnsid to query interface
Currently, when an application gets netnsid from the kernel (for example as
the result of RTM_GETLINK call on one end of the veth pair), it's not much
useful. There's no reliable way to get to the netns fd from the netnsid, nor
does any kernel API accept netnsid.
Extend the RTM_GETLINK call to also accept netnsid. It will operate on the
netns with the given netnsid in such case. Of course, the calling process
needs to have enough capabilities in the target name space; for now, require
CAP_NET_ADMIN. This can be relaxed in the future.
To signal to the calling process that the kernel understood the new
IFLA_IF_NETNSID attribute in the query, it will include it in the response.
This is needed to detect older kernels, as they will just ignore
IFLA_IF_NETNSID and query in the current name space.
This patch implemetns IFLA_IF_NETNSID only for get and dump. For set
operations, this can be extended later.
Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'sound/soc/samsung/smdk_wm8994pcm.c')
0 files changed, 0 insertions, 0 deletions