lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1318.1692658668@famine>
Date: Mon, 21 Aug 2023 15:57:48 -0700
From: Jay Vosburgh <jay.vosburgh@...onical.com>
To: Hangbin Liu <liuhangbin@...il.com>
cc: netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>,
    Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
    Eric Dumazet <edumazet@...gle.com>, Liang Li <liali@...hat.com>,
    Jiri Pirko <jiri@...dia.com>,
    Nikolay Aleksandrov <razor@...ckwall.org>,
    Andrew Schorr <ajschorr@...mni.princeton.edu>
Subject: Re: [PATCH net-next] bonding: update port speed when getting bond speed

Hangbin Liu <liuhangbin@...il.com> wrote:

>Andrew reported a bonding issue that if we put an active-back bond on top
>of a 802.3ad bond interface. When the 802.3ad bond's speed/duplex changed
>dynamically. The upper bonding interface's speed/duplex can't be changed at
>the same time, which will show incorrect speed.
>
>Fix it by updating the port speed when calling ethtool.
>
>Reported-by: Andrew Schorr <ajschorr@...mni.princeton.edu>
>Closes: https://lore.kernel.org/netdev/ZEt3hvyREPVdbesO@Laptop-X1/
>Signed-off-by: Hangbin Liu <liuhangbin@...il.com>

Acked-by: Jay Vosburgh <jay.vosburgh@...onical.com>


>---
> drivers/net/bonding/bond_main.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index 447b06ea4fc9..07c2e46d27a8 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -5706,6 +5706,7 @@ static int bond_ethtool_get_link_ksettings(struct net_device *bond_dev,
> 	 */
> 	bond_for_each_slave(bond, slave, iter) {
> 		if (bond_slave_can_tx(slave)) {
>+			bond_update_speed_duplex(slave);
> 			if (slave->speed != SPEED_UNKNOWN) {
> 				if (BOND_MODE(bond) == BOND_MODE_BROADCAST)
> 					speed = bond_mode_bcast_speed(slave,
>-- 
>2.41.0
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ