Re: [PATCHv3 net 1/2] bonding: add ns target multicast address to slave device
From: Hangbin Liu
Date: Mon Nov 11 2024 - 05:06:05 EST
On Wed, Nov 06, 2024 at 12:25:10PM +0200, Nikolay Aleksandrov wrote:
> > diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
> > index 95d59a18c022..60368cef2704 100644
> > --- a/drivers/net/bonding/bond_options.c
> > +++ b/drivers/net/bonding/bond_options.c
> > @@ -15,6 +15,7 @@
> > #include <linux/sched/signal.h>
> >
> > #include <net/bonding.h>
> > +#include <net/ndisc.h>
> >
> > static int bond_option_active_slave_set(struct bonding *bond,
> > const struct bond_opt_value *newval);
> > @@ -1234,6 +1235,64 @@ static int bond_option_arp_ip_targets_set(struct bonding *bond,
> > }
> >
> > #if IS_ENABLED(CONFIG_IPV6)
> > +static bool slave_can_set_ns_maddr(struct bonding *bond, struct slave *slave)
>
> const bond/slave
>
> > +{
> > + return BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP &&
> > + !bond_is_active_slave(slave) &&
> > + slave->dev->flags & IFF_MULTICAST;
> > +}
Hi, FYI, in new patch I only set bond to const as slave will be called
by bond_is_active_slave().
Thanks
Hangbin