[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b17f8a76-6df2-24b7-4867-4d4814426e35@gmail.com>
Date: Thu, 22 Nov 2018 09:40:17 -0700
From: David Ahern <dsahern@...il.com>
To: Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH net-next v2 5/5] netns: enable to dump full nsid
translation table
On 11/22/18 8:50 AM, Nicolas Dichtel wrote:
> diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
> index dd25fb22ad45..25030e0317a2 100644
> --- a/net/core/net_namespace.c
> +++ b/net/core/net_namespace.c
> @@ -745,6 +745,8 @@ struct net_fill_args {
> int flags;
> int cmd;
> int nsid;
> + bool add_ref;
> + int ref_nsid;
> };
>
> static int rtnl_net_fill(struct sk_buff *skb, struct net_fill_args *args)
> @@ -763,6 +765,10 @@ static int rtnl_net_fill(struct sk_buff *skb, struct net_fill_args *args)
> if (nla_put_s32(skb, NETNSA_NSID, args->nsid))
> goto nla_put_failure;
>
> + if (args->add_ref &&
> + nla_put_s32(skb, NETNSA_CURRENT_NSID, args->ref_nsid))
> + goto nla_put_failure;
> +
you need to add NETNSA_CURRENT_NSID to rtnl_net_get_size.
Powered by blists - more mailing lists