Re: [PATCH net] bonding: fix ad_actor_system option setting to default
flat view
From: Jay Vosburgh <hidden>
Date: 2021-12-17 22:22:47
Fernando Fernandez Mancera [off-list ref] wrote:
When 802.3ad bond mode is configured the ad_actor_system option is set to "00:00:00:00:00:00". But when trying to set the default value manually it was failing with EINVAL. A zero ethernet address is valid, only multicast addresses are not valid values.
Your intent here by setting ad_actor_system to all zeroes is to
induce bonding to actually set ad_actor_system to the MAC of the bond
itself?
If so, please also update Documentation/networking/bonding.rst,
as the current text says
In an AD system, this specifies the mac-address for the actor in
protocol packet exchanges (LACPDUs). The value cannot be NULL or
multicast. It is preferred to have the local-admin bit set for this
mac but driver does not enforce it. If the value is not given then
system defaults to using the masters' mac address as actors' system
address.
I'd suggest something like "The value cannot be a multicast
address. If the all-zeroes MAC is specified, bonding will internally
use the MAC of the bond itself."
-J
quoted hunk ↗ jump to hunk
Signed-off-by: Fernando Fernandez Mancera <redacted> --- drivers/net/bonding/bond_options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c index a8fde3bc458f..b93337b5a721 100644 --- a/drivers/net/bonding/bond_options.c +++ b/drivers/net/bonding/bond_options.c@@ -1526,7 +1526,7 @@ static int bond_option_ad_actor_system_set(struct bonding *bond,mac = (u8 *)&newval->value; } - if (!is_valid_ether_addr(mac)) + if (is_multicast_ether_addr(mac)) goto err; netdev_dbg(bond->dev, "Setting ad_actor_system to %pM\n", mac); -- 2.30.2
--- -Jay Vosburgh, jay.vosburgh@canonical.com