Commit b0b03a7d authored by Sun Shouxin's avatar Sun Shouxin
Browse files

net:bonding:support balance-alb interface with vlan to bridge

mainline inclusion
from mainline-v6.0
commit d5410ac7
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5UYT6
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/net/bonding/bond_alb.c?h=v6.0&id=d5410ac7b0baeca91cf73ff5241d35998ecc8c9e



-------------------------------------------------------------------

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: default avatarHu Yadi <huyd12@chinatelecom.cn>
Signed-off-by: default avatarSun Shouxin <sunshouxin@chinatelecom.cn>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSun Shouxin <sunshouxin@chinatelecom.cn>
parent 4302727a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment