Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Dec 2015 20:29:55 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r292566 - stable/10/sys/netinet6
Message-ID:  <201512212029.tBLKTtxZ094006@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kp
Date: Mon Dec 21 20:29:55 2015
New Revision: 292566
URL: https://svnweb.freebsd.org/changeset/base/292566

Log:
  MFC r292219:
  
  inet6: Do not assume every interface has ip6 enabled.
  
  Certain interfaces (e.g. pfsync0) do not have ip6 addresses (in other words,
  ifp->if_afdata[AF_INET6] is NULL). Ensure we don't panic when the MTU is
  updated.
  
  pfsync interfaces will never have ip6 support, because it's explicitly disabled
  in in6_domifattach().
  
  PR:         205194

Modified:
  stable/10/sys/netinet6/nd6.c

Modified: stable/10/sys/netinet6/nd6.c
==============================================================================
--- stable/10/sys/netinet6/nd6.c	Mon Dec 21 20:17:24 2015	(r292565)
+++ stable/10/sys/netinet6/nd6.c	Mon Dec 21 20:29:55 2015	(r292566)
@@ -227,6 +227,8 @@ nd6_ifdetach(struct nd_ifinfo *nd)
 void
 nd6_setmtu(struct ifnet *ifp)
 {
+	if (ifp->if_afdata[AF_INET6] == NULL)
+		return;
 
 	nd6_setmtu0(ifp, ND_IFINFO(ifp));
 }



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