Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Sep 2011 00:32:30 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r225683 - head/usr.sbin/rtadvd
Message-ID:  <201109200032.p8K0WUqk002856@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hrs
Date: Tue Sep 20 00:32:30 2011
New Revision: 225683
URL: http://svn.freebsd.org/changeset/base/225683

Log:
  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)

Modified:
  head/usr.sbin/rtadvd/rtadvd.c

Modified: head/usr.sbin/rtadvd/rtadvd.c
==============================================================================
--- head/usr.sbin/rtadvd/rtadvd.c	Tue Sep 20 00:29:17 2011	(r225682)
+++ head/usr.sbin/rtadvd/rtadvd.c	Tue Sep 20 00:32:30 2011	(r225683)
@@ -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;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109200032.p8K0WUqk002856>