]> git.baikalelectronics.ru Git - kernel.git/commit
rtnetlink: Handle IFLA_MASTER parameter when processing rtnl_newlink
authorTheuns Verwoerd <Theuns.Verwoerd@alliedtelesis.co.nz>
Mon, 30 Jan 2017 23:23:46 +0000 (12:23 +1300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Feb 2017 16:53:23 +0000 (11:53 -0500)
commitd171db14c3bb176db70aad39b5907a246de27b91
treee0969dbd871a4e024c1a7cad5ef09474b1d31ac4
parentc346c73e310eba161f18ace6fb293f14cc294e6b
rtnetlink: Handle IFLA_MASTER parameter when processing rtnl_newlink

Allow a master interface to be specified as one of the parameters when
creating a new interface via rtnl_newlink.  Previously this would
require invoking interface creation, waiting for it to complete, and
then separately binding that new interface to a master.

In particular, this is used when creating a macvlan child interface for
VRRP in a VRF configuration, allowing the interface creator to specify
directly what master interface should be inherited by the child,
without having to deal with asynchronous complications and potential
race conditions.

Signed-off-by: Theuns Verwoerd <theuns.verwoerd@alliedtelesis.co.nz>
Acked-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c