From owner-svn-src-user@FreeBSD.ORG Wed Aug 3 02:02:23 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E9C5106564A; Wed, 3 Aug 2011 02:02:23 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F1928FC15; Wed, 3 Aug 2011 02:02:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p7322NXH080609; Wed, 3 Aug 2011 02:02:23 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7322Nl1080607; Wed, 3 Aug 2011 02:02:23 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201108030202.p7322Nl1080607@svn.freebsd.org> From: Hiroki Sato Date: Wed, 3 Aug 2011 02:02:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224620 - user/hrs/ipv6/usr.sbin/rtadvd X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2011 02:02:23 -0000 Author: hrs Date: Wed Aug 3 02:02:23 2011 New Revision: 224620 URL: http://svn.freebsd.org/changeset/base/224620 Log: Ignore an interface that never sent RAs for graceful shut-down. Modified: user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c Modified: user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c ============================================================================== --- user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c Wed Aug 3 01:33:34 2011 (r224619) +++ user/hrs/ipv6/usr.sbin/rtadvd/rtadvd.c Wed Aug 3 02:02:23 2011 (r224620) @@ -405,6 +405,18 @@ rtadvd_shutdown(void) continue; if (ifi->ifi_ra_timer == NULL) continue; + if (ifi->ifi_ra_lastsent.tv_sec == 0 && + ifi->ifi_ra_lastsent.tv_usec == 0 && + ifi->ifi_ra_timer != NULL) { + /* + * When RA configured but never sent, + * ignore the IF immediately. + */ + rtadvd_remove_timer(ifi->ifi_ra_timer); + ifi->ifi_ra_timer = NULL; + ifi->ifi_state = IFI_STATE_UNCONFIGURED; + continue; + } ifi->ifi_state = IFI_STATE_TRANSITIVE;