Le 21/11/2018 à 22:07, David Ahern a écrit :
> On 11/21/18 1:58 PM, Nicolas Dichtel wrote:
>> The target-nsid is not stored in net_cb (not needed). ref_net is set only if
>> tgt_net comes from TARGET_NSID. I can add a comment.
>
> ref_net is added by this patch and it is only used (unless I
On 11/21/18 1:58 PM, Nicolas Dichtel wrote:
> The target-nsid is not stored in net_cb (not needed). ref_net is set only if
> tgt_net comes from TARGET_NSID. I can add a comment.
ref_net is added by this patch and it is only used (unless I missed
something) to know if the put_net is needed. ie/,
Le 21/11/2018 à 19:05, David Ahern a écrit :
> On 11/21/18 4:01 AM, Nicolas Dichtel wrote:
>> static int rtnl_net_dumpid(struct sk_buff *skb, struct netlink_callback *cb)
>> {
>> -struct net *net = sock_net(skb->sk);
>> struct rtnl_net_dump_cb net_cb = {
>> -.net = net,
>> +
On 11/21/18 4:01 AM, Nicolas Dichtel wrote:
> static int rtnl_net_dumpid(struct sk_buff *skb, struct netlink_callback *cb)
> {
> - struct net *net = sock_net(skb->sk);
> struct rtnl_net_dump_cb net_cb = {
> - .net = net,
> + .tgt_net = sock_net(skb->sk),
>
Like it was done for link and address, add the ability to perform get/dump
in another netns by specifying a target nsid attribute.
Signed-off-by: Nicolas Dichtel
---
include/uapi/linux/net_namespace.h | 1 +
net/core/net_namespace.c | 97 --
2 files