summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorFernando Fernandez Mancera <ffmancera@riseup.net>2021-12-21 12:13:45 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-29 12:14:48 +0100
commit53cf468483ae87aa1d9b46a2df3cd88cb08459fb (patch)
tree2485896df13e3d3f029d0799e2f298d3c31e9bf3 /drivers/net
parentd4504fead12e19d34bcc5dd8823505ec3ea11466 (diff)
downloadlinux-53cf468483ae87aa1d9b46a2df3cd88cb08459fb.tar.gz
linux-53cf468483ae87aa1d9b46a2df3cd88cb08459fb.tar.bz2
linux-53cf468483ae87aa1d9b46a2df3cd88cb08459fb.zip
bonding: fix ad_actor_system option setting to default
[ Upstream commit 1c15b05baea71a5ff98235783e3e4ad227760876 ] 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> Link: https://lore.kernel.org/r/20211221111345.2462-1-ffmancera@riseup.net Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bonding/bond_options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
index 258cb3999b0e..5c6a96236309 100644
--- a/drivers/net/bonding/bond_options.c
+++ b/drivers/net/bonding/bond_options.c
@@ -1408,7 +1408,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_info(bond->dev, "Setting ad_actor_system to %pM\n", mac);