All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v4] bonding: fix ad_actor_system option setting to default
@ 2021-12-21 11:13 Fernando Fernandez Mancera
  2021-12-22  1:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Fernando Fernandez Mancera @ 2021-12-21 11:13 UTC (permalink / raw)
  To: netdev
  Cc: j.vosburgh, corbet, linux-doc, vfalico, kuba, davem, andy,
	Fernando Fernandez Mancera, Jay Vosburgh

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 all-zeroes MAC as actors'
system address it was failing with EINVAL.

An all-zeroes ethernet address is valid, only multicast addresses are not
valid values.

Fixes: 171a42c38c6e ("bonding: add netlink support for sys prio, actor sys mac, and port key")
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>
---
v2: added documentation changes and modified commit message
v3: fixed format warning on commit message
v4: added fixes tag and ACK from Jay Vosburgh
---
 Documentation/networking/bonding.rst | 11 ++++++-----
 drivers/net/bonding/bond_options.c   |  2 +-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/Documentation/networking/bonding.rst b/Documentation/networking/bonding.rst
index 31cfd7d674a6..c0a789b00806 100644
--- a/Documentation/networking/bonding.rst
+++ b/Documentation/networking/bonding.rst
@@ -196,11 +196,12 @@ ad_actor_sys_prio
 ad_actor_system
 
 	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.
+	protocol packet exchanges (LACPDUs). The value cannot be a multicast
+	address. If the all-zeroes MAC is specified, bonding will internally
+	use the MAC of the bond itself. 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.
 
 	This parameter has effect only in 802.3ad mode and is available through
 	SysFs interface.
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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net v4] bonding: fix ad_actor_system option setting to default
  2021-12-21 11:13 [PATCH net v4] bonding: fix ad_actor_system option setting to default Fernando Fernandez Mancera
@ 2021-12-22  1:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-22  1:00 UTC (permalink / raw)
  To: Fernando Fernandez Mancera
  Cc: netdev, j.vosburgh, corbet, linux-doc, vfalico, kuba, davem,
	andy, jay.vosburgh

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 21 Dec 2021 12:13:45 +0100 you 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 all-zeroes MAC as actors'
> system address it was failing with EINVAL.
> 
> An all-zeroes ethernet address is valid, only multicast addresses are not
> valid values.
> 
> [...]

Here is the summary with links:
  - [net,v4] bonding: fix ad_actor_system option setting to default
    https://git.kernel.org/netdev/net/c/1c15b05baea7

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-22  1:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-21 11:13 [PATCH net v4] bonding: fix ad_actor_system option setting to default Fernando Fernandez Mancera
2021-12-22  1:00 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.