linux/drivers/net
Weiping Pan 7d26bb103c bonding: emit event when bonding changes MAC
When a bonding device is configured with fail_over_mac=active,
we expect to see the MAC address of the new active slave as the source MAC
address after failover. But we see that the source MAC address is the MAC
address of previous active slave.

Emit NETDEV_CHANGEADDR event when bonding changes its MAC address, in order
to let arp_netdev_event flush neighbour cache and route cache.

How to reproduce this bug ?

                       -----------hostB----------------
hostA ----- switch ---|-- eth0--bond0(192.168.100.2/24)|
(192.168.100.1/24  \--|-- eth1-/                       |
                       --------------------------------

1 on hostB,
modprobe bonding mode=1 miimon=500 fail_over_mac=active downdelay=1000
num_grat_arp=1
ifconfig bond0 192.168.100.2/24 up
ifenslave bond0 eth0
ifenslave bond0 eth1

then eth0 is the active slave, and MAC of bond0 is MAC of eth0.

2 on hostA, ping 192.168.100.2

3 on hostB,
tcpdump -i bond0 -p icmp -XXX
you will see bond0 uses MAC of eth0 as source MAC in icmp reply.

4 on hostB,
ifconfig eth0 down
tcpdump -i bond0 -p icmp -XXX (just keep it running in step 3)
you will see first bond0 uses MAC of eth1 as source MAC in icmp
reply, then it will use MAC of eth0 as source MAC.

Signed-off-by: Weiping Pan <wpan@redhat.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-29 18:11:57 -04:00
..
appletalk
arcnet
bonding bonding: emit event when bonding changes MAC 2012-03-29 18:11:57 -04:00
caif Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-09 14:34:20 -08:00
can can: peak_usb: PCAN-USB specific part: fix little endian usage 2012-03-07 15:51:01 +01:00
cris
dsa drivers/net: dsa/mv88e6xxx.c files need linux/module.h 2012-01-24 15:44:50 -05:00
ethernet Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net 2012-03-28 03:01:48 -04:00
fddi
hamradio hamradio: fix incompatible pointer in module parameter 2012-02-01 14:40:01 -05:00
hippi drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages 2012-01-31 16:20:21 -05:00
hyperv net/hyperv: Fix the code handling tx busy 2012-03-19 17:27:06 -04:00
irda net/irda: add clk_prepare/clk_unprepare to pxaficp_ir 2012-03-16 23:11:14 -07:00
phy Generialize powerpc's irq_host as irq_domain 2012-03-21 10:27:19 -07:00
plip drivers/net: Remove alloc_etherdev error messages 2012-01-31 16:20:48 -05:00
ppp ppp: Replace uses of <linux/if_ppp.h> with <linux/ppp-ioctl.h> 2012-03-04 20:41:38 -05:00
slip drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages 2012-01-31 16:20:21 -05:00
team net: use eth_hw_addr_random() and reset addr_assign_type 2012-02-15 15:34:17 -05:00
tokenring Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-02-10 23:32:28 -05:00
usb cdc-phonet: fix skb truesize underestimation 2012-03-27 22:50:55 -04:00
vmxnet3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-05 21:16:26 -05:00
wan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-03-20 21:04:47 -07:00
wimax wimax: i2400m-usb - use a private struct ethtool_ops 2012-03-27 22:30:09 -04:00
wireless Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2012-03-27 22:15:01 -04:00
xen-netback drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages 2012-01-31 16:20:21 -05:00
dummy.c net: use eth_hw_addr_random() and reset addr_assign_type 2012-02-15 15:34:17 -05:00
eql.c eql: dont rely on HZ=100 2012-03-27 22:45:26 -04:00
ifb.c net: replace random_ether_addr() with eth_hw_addr_random() 2012-02-15 15:34:16 -05:00
Kconfig
LICENSE.SRC
loopback.c
macvlan.c net: use eth_hw_addr_random() and reset addr_assign_type 2012-02-15 15:34:17 -05:00
macvtap.c security: trim security.h 2012-02-14 10:45:42 +11:00
Makefile
mdio.c ethtool, mdio, mii: Specify MDIO information fields in struct ethtool_cmd 2012-03-01 16:41:26 -05:00
mii.c ethtool, mdio, mii: Specify MDIO information fields in struct ethtool_cmd 2012-03-01 16:41:26 -05:00
netconsole.c drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages 2012-01-31 16:20:21 -05:00
rionet.c drivers/net: Remove alloc_etherdev error messages 2012-01-31 16:20:48 -05:00
sb1000.c
Space.c CS89x0 : add platform driver support 2012-02-01 16:49:50 +01:00
sungem_phy.c
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-18 23:29:41 -04:00
veth.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-02-19 16:03:15 -05:00
virtio_net.c virtio_net: do not rate limit counter increments 2012-03-28 04:40:45 -04:00
xen-netfront.c One tiny feature that accidentally got lost in the initial git pull: 2012-03-24 12:20:25 -07:00