svn commit: r292566 - stable/10/sys/netinet6

Kristof Provost kp at FreeBSD.org
Mon Dec 21 20:29:57 UTC 2015


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));
 }


More information about the svn-src-stable mailing list