]> git.baikalelectronics.ru Git - kernel.git/commit
net:bonding:support balance-alb interface with vlan to bridge
authorSun Shouxin <sunshouxin@chinatelecom.cn>
Tue, 9 Aug 2022 06:21:03 +0000 (23:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Aug 2022 12:47:00 +0000 (13:47 +0100)
commitc5e8ed492e36ecdfd407a26ec85ab3ff4353c38d
treeb85a9ed214a9d99e17771ffb2d6d70a9f4674e27
parentf6e5374ba2b4bfaadc58d150e24f6875346485ba
net:bonding:support balance-alb interface with vlan to bridge

In my test, balance-alb bonding with two slaves eth0 and eth1,
and then Bond0.150 is created with vlan id attached bond0.
After adding bond0.150 into one linux bridge, I noted that Bond0,
bond0.150 and  bridge were assigned to the same MAC as eth0.
Once bond0.150 receives a packet whose dest IP is bridge's
and dest MAC is eth1's, the linux bridge will not match
eth1's MAC entry in FDB, and not handle it as expected.
The patch fix the issue, and diagram as below:

eth1(mac:eth1_mac)--bond0(balance-alb,mac:eth0_mac)--eth0(mac:eth0_mac)
                      |
                   bond0.150(mac:eth0_mac)
                      |
                   bridge(ip:br_ip, mac:eth0_mac)--other port

Suggested-by: Hu Yadi <huyd12@chinatelecom.cn>
Signed-off-by: Sun Shouxin <sunshouxin@chinatelecom.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_alb.c