anyone?

On Wed, Apr 18, 2018 at 02:09:56PM +0200, Florian Obser wrote:
> Run duplicate address detection again if an existing address gets
> updated from userland that was marked duplicated or tentative.
> 
> Otherwise we would just lose the duplicated / tentative state and assume
> that the address is now unique and usable.
> 
> OK?
> 
> diff --git in6.c in6.c
> index 1c5ec065aa5..b347ec74621 100644
> --- in6.c
> +++ in6.c
> @@ -420,15 +420,15 @@ in6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp, 
> int privileged)
>                       break;
>               }
>  
> +             /* Perform DAD, if needed. */
> +             if (ia6->ia6_flags & IN6_IFF_TENTATIVE)
> +                     nd6_dad_start(&ia6->ia_ifa);
> +
>               if (!newifaddr) {
>                       dohooks(ifp->if_addrhooks, 0);
>                       break;
>               }
>  
> -             /* Perform DAD, if needed. */
> -             if (ia6->ia6_flags & IN6_IFF_TENTATIVE)
> -                     nd6_dad_start(&ia6->ia_ifa);
> -
>               plen = in6_mask2len(&ia6->ia_prefixmask.sin6_addr, NULL);
>               if ((ifp->if_flags & IFF_LOOPBACK) || plen == 128) {
>                       dohooks(ifp->if_addrhooks, 0);
> @@ -655,6 +655,9 @@ in6_update_ifa(struct ifnet *ifp, struct in6_aliasreq 
> *ifra,
>       if ((error = in6_ifinit(ifp, ia6, hostIsNew)) != 0)
>               goto unlink;
>  
> +     /* re-run DAD */
> +     if (ia6->ia6_flags & (IN6_IFF_TENTATIVE|IN6_IFF_DUPLICATED))
> +             ifra->ifra_flags |= IN6_IFF_TENTATIVE;
>       /*
>        * configure address flags.
>        */
> 
> 
> -- 
> I'm not entirely sure you are real.
> 

-- 
I'm not entirely sure you are real.

Reply via email to