Author: Xin Long <lucien.xin(a)gmail.com>
Date: 2015-08-31 (Mon, 31 Aug 2015)
teamd: loadbalance mode lacks a .hwaddr_changed in teamd_event_watch_ops
commit 01c1e7888cd9 ("teamd: do not change ctx->hwaddr pointer")
make the first iface's mac is not same with the team:
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 26:29:fa:60:f0:ea txqueuelen 1000 (Ethernet) <---
eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 00:a4:f3:8c:47:d6 txqueuelen 1000 (Ethernet)
team0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 00:a4:f3:8c:47:d6 txqueuelen 0 (Ethernet) <---
when we add the first iface to team0, three watch events will be triggerred
team0's mac will be updated with eth1's mac in teamd_hwaddr_check_change(),
besides, ctx->hwaddr will not be update by this mac any more, it still keep
the original team mac.
.port_added() of loadbalance will update eth1's mac with ctx->hwaddr. that's
why eth1's mac is different from team0's.
but for lacp and activebackup, they both has .hwaddr_changed(). when another
watch event comes:
the eth1's mac will be update with team0's mac, now they have the same macs.
for broadcast, roundrobin, and random, they don't have neither .port_added()
nor .hwaddr_changed(), so the macs of team0 and eth1 are consistent.
we can fix it by adding a .hwaddr_changed for loadbalance mode.
Fixes: 01c1e7888cd9 ("teamd: do not change ctx->hwaddr pointer")
Signed-off-by: Xin Long <lucien.xin(a)gmail.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>