Index | Thread | Search

From:
Alexander Bluhm <bluhm@openbsd.org>
Subject:
Re: send RTM_CHGADDRATTR for vltime / pltime changes
To:
tech <tech@openbsd.org>
Date:
Tue, 21 May 2024 13:39:52 +0200

Download raw body.

Thread
On Mon, May 20, 2024 at 02:13:42PM +0200, Florian Obser wrote:
> For an upcoming diff rad(8) needs to known when the vltime / pltime of a
> configured IPv6 address changes.
> 
> OK?

OK bluhm@

> diff --git in6.c in6.c
> index e1a7a62092a..7b1eddbdd25 100644
> --- in6.c
> +++ in6.c
> @@ -743,8 +743,12 @@ in6_update_ifa(struct ifnet *ifp, struct in6_aliasreq *ifra,
>  	/*
>  	 * We are done if we have simply modified an existing address.
>  	 */
> -	if (!hostIsNew)
> +	if (!hostIsNew) {
> +		/* DAD sends RTM_CHGADDRATTR when done. */
> +		if (!(ia6->ia6_flags & IN6_IFF_TENTATIVE))
> +			rtm_addr(RTM_CHGADDRATTR, &ia6->ia_ifa);
>  		return (error);
> +	}
>  
>  	/*
>  	 * Beyond this point, we should call in6_purgeaddr upon an error,
> 
> -- 
> In my defence, I have been left unsupervised.