diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2024-05-21 15:12:26 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2024-05-21 15:12:26 +0000 |
commit | 3ba2036b93ae249293148ea07423d2dcf2352d02 (patch) | |
tree | 499989705b95b6ac95cc35a3c0650df5ea2de25e | |
parent | 6cafdc8a8097095627049ee054276ba7d14bf697 (diff) |
Inform user land when vltime / pltime changes.
Do not send a RTM_CHGADDRATTR route message when the address is
tentative because we will send one when DAD finishes.
To be used by rad(8) shortly.
OK bluhm
-rw-r--r-- | sys/netinet6/in6.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index e1a7a62092a..d5e8e2c25a7 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.c,v 1.265 2024/04/21 17:32:10 florian Exp $ */ +/* $OpenBSD: in6.c,v 1.266 2024/05/21 15:12:25 florian Exp $ */ /* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */ /* @@ -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, |