Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Sep 2013 18:27:26 +0000 (UTC)
From:      Dag-Erling Smørgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org
Subject:   svn commit: r255398 - releng/9.2/usr.sbin/rtadvd
Message-ID:  <201309081827.r88IRQT6067577@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Sun Sep  8 18:27:26 2013
New Revision: 255398
URL: http://svnweb.freebsd.org/changeset/base/255398

Log:
  MFH (r254684, r254955): fix segfault on reload.
  MFH (r255156): silence an error message on non-IPv6 interfaces.
  
  Approved by:    re (glebius)

Modified:
  releng/9.2/usr.sbin/rtadvd/config.c
  releng/9.2/usr.sbin/rtadvd/if.c
Directory Properties:
  releng/9.2/usr.sbin/rtadvd/   (props changed)

Modified: releng/9.2/usr.sbin/rtadvd/config.c
==============================================================================
--- releng/9.2/usr.sbin/rtadvd/config.c	Sun Sep  8 18:19:40 2013	(r255397)
+++ releng/9.2/usr.sbin/rtadvd/config.c	Sun Sep  8 18:27:26 2013	(r255398)
@@ -296,10 +296,8 @@ rm_rainfo(struct rainfo *rai)
 	if (rai->rai_ra_data != NULL)
 		free(rai->rai_ra_data);
 
-	while ((pfx = TAILQ_FIRST(&rai->rai_prefix)) != NULL) {
-		TAILQ_REMOVE(&rai->rai_prefix, pfx, pfx_next);
-		free(pfx);
-	}
+	while ((pfx = TAILQ_FIRST(&rai->rai_prefix)) != NULL)
+		delete_prefix(pfx);
 	while ((sol = TAILQ_FIRST(&rai->rai_soliciter)) != NULL) {
 		TAILQ_REMOVE(&rai->rai_soliciter, sol, sol_next);
 		free(sol);
@@ -1123,9 +1121,9 @@ add_prefix(struct rainfo *rai, struct in
 	pfx->pfx_onlinkflg = ipr->ipr_raf_onlink;
 	pfx->pfx_autoconfflg = ipr->ipr_raf_auto;
 	pfx->pfx_origin = PREFIX_FROM_DYNAMIC;
+	pfx->pfx_rainfo = rai;
 
 	TAILQ_INSERT_TAIL(&rai->rai_prefix, pfx, pfx_next);
-	pfx->pfx_rainfo = rai;
 
 	syslog(LOG_DEBUG, "<%s> new prefix %s/%d was added on %s",
 	    __func__,

Modified: releng/9.2/usr.sbin/rtadvd/if.c
==============================================================================
--- releng/9.2/usr.sbin/rtadvd/if.c	Sun Sep  8 18:19:40 2013	(r255397)
+++ releng/9.2/usr.sbin/rtadvd/if.c	Sun Sep  8 18:27:26 2013	(r255398)
@@ -394,8 +394,8 @@ update_ifinfo_nd_flags(struct ifinfo *if
 	error = ioctl(s, SIOCGIFINFO_IN6, (caddr_t)&nd);
 	if (error) {
 		close(s);
-		syslog(LOG_ERR,
-		    "<%s> ioctl() failed.", __func__);
+		if (errno != EPFNOSUPPORT)
+			syslog(LOG_ERR, "<%s> ioctl() failed.", __func__);
 		return (1);
 	}
 	ifi->ifi_nd_flags = nd.ndi.flags;



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