diff options
author | ume <ume@FreeBSD.org> | 2001-06-18 11:37:06 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2001-06-18 11:37:06 +0000 |
commit | 45b878b72d9ebd68ca268cb6178624fde8e887c4 (patch) | |
tree | 4697b4fb7a437ace7759e48ed808dcec3099cda3 /sys/netinet6 | |
parent | 59c2ccba3bab442c02ddb2ebaabe287ee6b6db53 (diff) | |
download | FreeBSD-src-45b878b72d9ebd68ca268cb6178624fde8e887c4.zip FreeBSD-src-45b878b72d9ebd68ca268cb6178624fde8e887c4.tar.gz |
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 <jinmei@isl.rdc.toshiba.co.jp>
Obtained from: KAME
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/nd6_rtr.c | 11 |
1 files changed, 11 insertions, 0 deletions
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); } |