Skip to content

Commit fd16eb9

Browse files
liuhangbindavem330
authored andcommitted
bonding: add all node mcast address when slave up
When a link is enslave to bond, it need to set the interface down first. This makes the slave remove mac multicast address 33:33:00:00:00:01(The IPv6 multicast address ff02::1 is kept even when the interface down). When bond set the slave up, ipv6_mc_up() was not called due to commit c2edacf ("bonding / ipv6: no addrconf for slaves separately from master"). This is not an issue before we adding the lladdr target feature for bonding, as the mac multicast address will be added back when bond interface up and join group ff02::1. But after adding lladdr target feature for bonding. When user set a lladdr target, the unsolicited NA message with all-nodes multicast dest will be dropped as the slave interface never add 33:33:00:00:00:01 back. Fix this by calling ipv6_mc_up() to add 33:33:00:00:00:01 back when the slave interface up. Reported-by: LiLiang <liali@redhat.com> Fixes: 5e1eeef ("bonding: NS target should accept link local address") Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b7f1413 commit fd16eb9

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

net/ipv6/addrconf.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3557,11 +3557,15 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
35573557
fallthrough;
35583558
case NETDEV_UP:
35593559
case NETDEV_CHANGE:
3560-
if (dev->flags & IFF_SLAVE)
3560+
if (idev && idev->cnf.disable_ipv6)
35613561
break;
35623562

3563-
if (idev && idev->cnf.disable_ipv6)
3563+
if (dev->flags & IFF_SLAVE) {
3564+
if (event == NETDEV_UP && !IS_ERR_OR_NULL(idev) &&
3565+
dev->flags & IFF_UP && dev->flags & IFF_MULTICAST)
3566+
ipv6_mc_up(idev);
35643567
break;
3568+
}
35653569

35663570
if (event == NETDEV_UP) {
35673571
/* restore routes for permanent addresses */

0 commit comments

Comments
 (0)