Patch "bonding: reset bond's flags when down link is P2P device" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    bonding: reset bond's flags when down link is P2P device

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     bonding-reset-bond-s-flags-when-down-link-is-p2p-dev.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f115fd4126da673eb2b5fa3627efbeb459b06a6d
Author: Hangbin Liu <liuhangbin@xxxxxxxxx>
Date:   Fri Jul 21 12:03:55 2023 +0800

    bonding: reset bond's flags when down link is P2P device
    
    [ Upstream commit da19a2b967cf1e2c426f50d28550d1915214a81d ]
    
    When adding a point to point downlink to the bond, we neglected to reset
    the bond's flags, which were still using flags like BROADCAST and
    MULTICAST. Consequently, this would initiate ARP/DAD for P2P downlink
    interfaces, such as when adding a GRE device to the bonding.
    
    To address this issue, let's reset the bond's flags for P2P interfaces.
    
    Before fix:
    7: gre0@NONE: <POINTOPOINT,NOARP,SLAVE,UP,LOWER_UP> mtu 1500 qdisc noqueue master bond0 state UNKNOWN group default qlen 1000
        link/gre6 2006:70:10::1 peer 2006:70:10::2 permaddr 167f:18:f188::
    8: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
        link/gre6 2006:70:10::1 brd 2006:70:10::2
        inet6 fe80::200:ff:fe00:0/64 scope link
           valid_lft forever preferred_lft forever
    
    After fix:
    7: gre0@NONE: <POINTOPOINT,NOARP,SLAVE,UP,LOWER_UP> mtu 1500 qdisc noqueue master bond2 state UNKNOWN group default qlen 1000
        link/gre6 2006:70:10::1 peer 2006:70:10::2 permaddr c29e:557a:e9d9::
    8: bond0: <POINTOPOINT,NOARP,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
        link/gre6 2006:70:10::1 peer 2006:70:10::2
        inet6 fe80::1/64 scope link
           valid_lft forever preferred_lft forever
    
    Reported-by: Liang Li <liali@xxxxxxxxxx>
    Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2221438
    Fixes: 872254dd6b1f ("net/bonding: Enable bonding to enslave non ARPHRD_ETHER")
    Signed-off-by: Hangbin Liu <liuhangbin@xxxxxxxxx>
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index cdb9efae6032d..dcaefb47d1f2d 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1153,6 +1153,11 @@ static void bond_setup_by_slave(struct net_device *bond_dev,
 
 	memcpy(bond_dev->broadcast, slave_dev->broadcast,
 		slave_dev->addr_len);
+
+	if (slave_dev->flags & IFF_POINTOPOINT) {
+		bond_dev->flags &= ~(IFF_BROADCAST | IFF_MULTICAST);
+		bond_dev->flags |= (IFF_POINTOPOINT | IFF_NOARP);
+	}
 }
 
 /* On bonding slaves other than the currently active slave, suppress



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux