lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 31 Jan 2017 15:49:22 -0500 (EST)
From:   David Miller <davem@...emloft.net>
To:     dsa@...ulusnetworks.com
Cc:     xiyou.wangcong@...il.com, theuns.verwoerd@...iedtelesis.co.nz,
        netdev@...r.kernel.org
Subject: Re: [PATCH] rtnetlink: Handle IFLA_MASTER parameter when
 processing rtnl_newlink

From: David Ahern <dsa@...ulusnetworks.com>
Date: Tue, 31 Jan 2017 13:25:32 -0700

> On 1/30/17 11:49 PM, Cong Wang wrote:
>> On Mon, Jan 30, 2017 at 3:23 PM, Theuns Verwoerd
>> <theuns.verwoerd@...iedtelesis.co.nz> wrote:
>>> @@ -2653,6 +2653,11 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh)
>>>                         if (err < 0)
>>>                                 goto out_unregister;
>>>                 }
>>> +               if (tb[IFLA_MASTER]) {
>>> +                       err = do_set_master(dev, nla_get_u32(tb[IFLA_MASTER]));
>>> +                       if (err)
>>> +                               goto out_unregister;
>>> +               }
>>>  out:
>>>                 if (link_net)
>>>                         put_net(link_net);
>> 
>> Not sure if it is too late to call do_set_master() after
>> dev_change_net_namespace().
>> 
> 
> The master device index is relative to a namespace. If both are given then the namespace change must be done first.

Right and this is exactly how do_setlink() handles this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ