@@ -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
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@gmail.com> --- drivers/net/bonding/bond_options.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)