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.

Reply via email to