Re: [PATCHv4 net 1/2] bonding: fix incorrect MAC address setting to receive NS messages

From: Simon Horman
Date: Tue Mar 11 2025 - 05:34:52 EST


On Thu, Mar 06, 2025 at 02:39:22AM +0000, Hangbin Liu wrote:
> When validation on the backup slave is enabled, we need to validate the
> Neighbor Solicitation (NS) messages received on the backup slave. To
> receive these messages, the correct destination MAC address must be added
> to the slave. However, the target in bonding is a unicast address, which
> we cannot use directly. Instead, we should first convert it to a
> Solicited-Node Multicast Address and then derive the corresponding MAC
> address.
>
> Fix the incorrect MAC address setting on both slave_set_ns_maddr() and
> slave_set_ns_maddrs(). Since the two function names are similar. Add
> some description for the functions. Also only use one mac_addr variable
> in slave_set_ns_maddr() to save some code and logic.
>
> Fixes: 8eb36164d1a6 ("bonding: add ns target multicast address to slave device")
> Acked-by: Jay Vosburgh <jv@xxxxxxxxxxxxx>
> Reviewed-by: Nikolay Aleksandrov <razor@xxxxxxxxxxxxx>
> Signed-off-by: Hangbin Liu <liuhangbin@xxxxxxxxx>
> ---
> drivers/net/bonding/bond_options.c | 55 +++++++++++++++++++++++++-----
> 1 file changed, 47 insertions(+), 8 deletions(-)

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>