From 45b878b72d9ebd68ca268cb6178624fde8e887c4 Mon Sep 17 00:00:00 2001 From: ume Date: Mon, 18 Jun 2001 11:37:06 +0000 Subject: call pfxlist_onlink_check() at the end of in6_tmpifadd(), to make sure a temporary address generated from a detached public one also detached. Submitted by: JINMEI Tatuya Obtained from: KAME --- sys/netinet6/nd6_rtr.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sys/netinet6') diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index 715ccf0..120a25a 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -1734,6 +1734,7 @@ in6_ifadd(pr, ifid) int in6_tmpifadd(ia0, forcegen) const struct in6_ifaddr *ia0; /* corresponding public address */ + int forcegen; { struct ifnet *ifp = ia0->ia_ifa.ifa_ifp; struct in6_ifaddr *newia; @@ -1830,6 +1831,16 @@ in6_tmpifadd(ia0, forcegen) newia->ia6_ndpr = ia0->ia6_ndpr; newia->ia6_ndpr->ndpr_refcnt++; + /* + * A newly added address might affect the status of other addresses. + * XXX: when the temporary address is generated with a new public + * address, the onlink check is redundant. However, it would be safe + * to do the check explicitly everywhere a new address is generated, + * and, in fact, we surely need the check when we create a new + * temporary address due to deprecation of an old temporary address. + */ + pfxlist_onlink_check(); + return(0); } -- cgit v1.1