]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
bonding: set carrier off for devices created through netlink
authorBeniamino Galvani <bgalvani@redhat.com>
Wed, 13 Jul 2016 16:25:08 +0000 (18:25 +0200)
committerKamal Mostafa <kamal@canonical.com>
Thu, 18 Aug 2016 17:23:56 +0000 (10:23 -0700)
commitf0fed50402ebcfe71181aa3ede6b8a5e95bf8a28
treebaef877d11474fb27837346a9f0753e53d7bae63
parent3a8add5251da4ba8725987a4a5e37ea3d92cc5d6
bonding: set carrier off for devices created through netlink

BugLink: http://bugs.launchpad.net/bugs/1614560
[ Upstream commit 005db31d5f5f7c31cfdc43505d77eb3ca5cf8ec6 ]

Commit e826eafa65c6 ("bonding: Call netif_carrier_off after
register_netdevice") moved netif_carrier_off() from bond_init() to
bond_create(), but the latter is called only for initial default
devices and ones created through sysfs:

 $ modprobe bonding
 $ echo +bond1 > /sys/class/net/bonding_masters
 $ ip link add bond2 type bond
 $ grep "MII Status" /proc/net/bonding/*
 /proc/net/bonding/bond0:MII Status: down
 /proc/net/bonding/bond1:MII Status: down
 /proc/net/bonding/bond2:MII Status: up

Ensure that carrier is initially off also for devices created through
netlink.

Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
drivers/net/bonding/bond_netlink.c