linux-stable/drivers/net
Nicolas Dichtel ed2a80ab7b rtnl/bond: don't send rtnl msg for unregistered iface
Before the patch, the command 'ip link add bond2 type bond mode 802.3ad'
causes the kernel to send a rtnl message for the bond2 interface, with an
ifindex 0.

'ip monitor' shows:
0: bond2: <BROADCAST,MULTICAST,MASTER> mtu 1500 state DOWN group default
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
9: bond2@NONE: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default
    link/ether ea:3e:1f:53:92:7b brd ff:ff:ff:ff:ff:ff
[snip]

The patch fixes the spotted bug by checking in bond driver if the interface
is registered before calling the notifier chain.
It also adds a check in rtmsg_ifinfo() to prevent this kind of bug in the
future.

Fixes: d4261e5650 ("bonding: create netlink event when bonding option is changed")
CC: Jiri Pirko <jiri@resnulli.us>
Reported-by: Julien Meunier <julien.meunier@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-17 22:43:07 -04:00
..
appletalk
arcnet
bonding rtnl/bond: don't send rtnl msg for unregistered iface 2015-05-17 22:43:07 -04:00
caif
can net: can: xilinx_can: fix extended frame handling 2015-05-01 10:11:46 +02:00
cris
dsa net: dsa: mv88e6xxx: unregister mv88e6352 driver 2015-05-04 00:04:43 -04:00
ethernet rocker: fix a neigh entry leak issue 2015-05-15 21:20:16 -04:00
fddi
hamradio
hippi
hyperv hv_netvsc: remove unused variable in netvsc_send() 2015-05-05 17:31:09 -04:00
ieee802154 at86rf230: add slp_tr support to start tx 2015-04-30 18:48:11 +02:00
ipvlan
irda
phy net: phy: Make sure PHY_RESUMING state change is always processed 2015-05-16 17:15:40 -04:00
plip
ppp pppoe: drop pppoe device in pppoe_unbind_sock_work 2015-05-11 12:58:22 -04:00
slip
team
usb usbnet: avoid integer overflow in start_xmit 2015-05-09 16:46:18 -04:00
vmxnet3
wan
wimax
wireless ath9k: fix per-packet tx power configuration 2015-05-03 23:54:38 +03:00
xen-netback xen: features and fixes for 4.1-rc0 2015-04-16 14:01:03 -05:00
dummy.c
eql.c
ifb.c act_mirred: Fix bogus header when redirecting from VLAN 2015-04-17 13:29:28 -04:00
Kconfig
LICENSE.SRC
loopback.c
macvlan.c macvlan: Propagate promiscuity setting to lower devices. 2015-05-04 00:14:13 -04:00
macvtap.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-04-17 16:31:08 -04:00
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c
veth.c
virtio_net.c
vxlan.c vxlan: remove the unnecessary codes 2015-04-22 18:45:49 -04:00
xen-netfront.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-04-17 16:31:08 -04:00