aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/rtadvd/rtadvd.c
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2011-09-20 00:32:30 +0000
committerHiroki Sato <hrs@FreeBSD.org>2011-09-20 00:32:30 +0000
commit8cdd0a80910323b99dda8859d33d682e4c2c3a64 (patch)
tree21905897b2a0285ea79a12b3c86f744c7b011cec /usr.sbin/rtadvd/rtadvd.c
parent6090ab8bd6a6d39818ef0de959e94648e88d369f (diff)
downloadsrc-8cdd0a80910323b99dda8859d33d682e4c2c3a64.tar.gz
src-8cdd0a80910323b99dda8859d33d682e4c2c3a64.zip
Remove RA timer on an interface with !IFF_UP actively after starting to send
clean-up RA messages for shutting down. The RA timers could prevent the rtadvd daemon from shutting down because ra_output() just ignored !IFF_UP interfaces and TRANSITIVE->UNCONFIGURED state transition never happened due to it. Spotted by: kib Approved by: re (bz)
Notes
Notes: svn path=/head/; revision=225683
Diffstat (limited to 'usr.sbin/rtadvd/rtadvd.c')
-rw-r--r--usr.sbin/rtadvd/rtadvd.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c
index 43e0e71ccfdb..092ffb67b43b 100644
--- a/usr.sbin/rtadvd/rtadvd.c
+++ b/usr.sbin/rtadvd/rtadvd.c
@@ -381,6 +381,21 @@ rtadvd_shutdown(void)
"waiting expiration of the all RA timers.");
TAILQ_FOREACH(ifi, &ifilist, ifi_next) {
+ /*
+ * Ignore !IFF_UP interfaces in waiting for shutdown.
+ */
+ if (!(ifi->ifi_flags & IFF_UP) &&
+ ifi->ifi_ra_timer != NULL) {
+ ifi->ifi_state = IFI_STATE_UNCONFIGURED;
+ rtadvd_remove_timer(ifi->ifi_ra_timer);
+ ifi->ifi_ra_timer = NULL;
+ syslog(LOG_DEBUG, "<%s> %s(idx=%d) is down. "
+ "Timer removed and marked as UNCONFIGURED.",
+ __func__, ifi->ifi_ifname,
+ ifi->ifi_ifindex);
+ }
+ }
+ TAILQ_FOREACH(ifi, &ifilist, ifi_next) {
if (ifi->ifi_ra_timer != NULL)
break;
}