Index | Thread | Search

From:
Florian Obser <florian@openbsd.org>
Subject:
send RTM_CHGADDRATTR for vltime / pltime changes
To:
tech <tech@openbsd.org>
Date:
Mon, 20 May 2024 14:13:42 +0200

Download raw body.

Thread
For an upcoming diff rad(8) needs to known when the vltime / pltime of a
configured IPv6 address changes.

OK?

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.