aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/rtadvd/rtadvd.c
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2002-06-13 16:59:31 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2002-06-13 16:59:31 +0000
commit0a5f3ef41099551283ddc027c5186203389711f6 (patch)
tree7d4549a8306821ec107a61d4cbb9e7353e39fc92 /usr.sbin/rtadvd/rtadvd.c
parentf9dc2a8b93fd1b074ba196889335a6aaa45b851d (diff)
downloadsrc-0a5f3ef41099551283ddc027c5186203389711f6.tar.gz
src-0a5f3ef41099551283ddc027c5186203389711f6.zip
Changed the behavior when an interface-direct prefix being advertised
was removed from the kernel; Advertise the prefix with zero lifetimes rather than to remove the prefix from the prefix list to be advertised. This will help renumber a receiving host by deprecating the address derived from the old prefix. Obtained from: KAME MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=98172
Diffstat (limited to 'usr.sbin/rtadvd/rtadvd.c')
-rw-r--r--usr.sbin/rtadvd/rtadvd.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c
index 88a0a3dbeca6..9e8c81eaaf77 100644
--- a/usr.sbin/rtadvd/rtadvd.c
+++ b/usr.sbin/rtadvd/rtadvd.c
@@ -450,7 +450,13 @@ rtmsg_input()
}
prefix = find_prefix(rai, addr, plen);
if (prefix) {
- if (dflag > 1) {
+ if (prefix->timer) {
+ /*
+ * If the prefix has been invalidated,
+ * make it available again.
+ */
+ update_prefix(prefix);
+ } else if (dflag > 1) {
syslog(LOG_DEBUG,
"<%s> new prefix(%s/%d) "
"added on %s, "
@@ -497,7 +503,7 @@ rtmsg_input()
}
break;
}
- delete_prefix(rai, prefix);
+ invalidate_prefix(prefix);
break;
case RTM_NEWADDR:
case RTM_DELADDR:
@@ -1550,7 +1556,7 @@ struct rainfo *rainfo;
}
/* process RA timer */
-void
+struct rtadvd_timer *
ra_timeout(void *data)
{
struct rainfo *rai = (struct rainfo *)data;
@@ -1564,6 +1570,8 @@ ra_timeout(void *data)
__FUNCTION__, rai->ifname);
ra_output(rai);
+
+ return(rai->timer);
}
/* update RA timer */