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] [day] [month] [year] [list]
Message-ID: <Z6NS_7rbUVLy_yJn@fedora>
Date: Wed, 5 Feb 2025 12:01:03 +0000
From: Hangbin Liu <liuhangbin@...il.com>
To: netdev@...r.kernel.org
Cc: Jay Vosburgh <jv@...sburgh.net>, Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Nikolay Aleksandrov <razor@...ckwall.org>,
	Simon Horman <horms@...nel.org>, Jianbo Liu <jianbol@...dia.com>,
	Boris Pismenny <borisp@...dia.com>,
	Tariq Toukan <tariqt@...dia.com>, Shuah Khan <shuah@...nel.org>,
	linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net 1/2] bonding: fix incorrect MAC address setting to
 receive NA messages


Oh, I just found the subject is incorrect. We want to receive the NS
message, not NA message on backup slaves.

Thanks
Hangbin
On Wed, Feb 05, 2025 at 08:03:35AM +0000, Hangbin Liu wrote:
> In order to receive the neighbor solicitation messages on the backup slave,
> we should add the NS target's corresponding MAC address. But the target in
> bonding is a unicast addresses. We can't use it directly. Instead, we should
> convert it to a Solicited-Node Multicast Address first and then convert
> the multicast address to the right MAC address.
> 
> Fixes: 8eb36164d1a6 ("bonding: add ns target multicast address to slave device")
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
> ---
>  drivers/net/bonding/bond_options.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
> index 327b6ecdc77e..63cf209dcdc9 100644
> --- a/drivers/net/bonding/bond_options.c
> +++ b/drivers/net/bonding/bond_options.c
> @@ -1246,6 +1246,7 @@ static void slave_set_ns_maddrs(struct bonding *bond, struct slave *slave, bool
>  {
>  	struct in6_addr *targets = bond->params.ns_targets;
>  	char slot_maddr[MAX_ADDR_LEN];
> +	struct in6_addr mcaddr;
>  	int i;
>  
>  	if (!slave_can_set_ns_maddr(bond, slave))
> @@ -1255,7 +1256,8 @@ static void slave_set_ns_maddrs(struct bonding *bond, struct slave *slave, bool
>  		if (ipv6_addr_any(&targets[i]))
>  			break;
>  
> -		if (!ndisc_mc_map(&targets[i], slot_maddr, slave->dev, 0)) {
> +		addrconf_addr_solict_mult(&targets[i], &mcaddr);
> +		if (!ndisc_mc_map(&mcaddr, slot_maddr, slave->dev, 0)) {
>  			if (add)
>  				dev_mc_add(slave->dev, slot_maddr);
>  			else
> -- 
> 2.39.5 (Apple Git-154)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ