Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jan 2013 23:11:14 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r245922 - head/sys/netinet6
Message-ID:  <201301252311.r0PNBE9x057733@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Fri Jan 25 23:11:13 2013
New Revision: 245922
URL: http://svnweb.freebsd.org/changeset/base/245922

Log:
  Avoid NULL dereference in nd6_storelladdr when no mbuf is provided.  It
  is called this way from a couple of places in the OFED code.  (toecore
  calls it too but that's going to change shortly).
  
  Reviewed by:	bz@

Modified:
  head/sys/netinet6/nd6.c

Modified: head/sys/netinet6/nd6.c
==============================================================================
--- head/sys/netinet6/nd6.c	Fri Jan 25 22:50:52 2013	(r245921)
+++ head/sys/netinet6/nd6.c	Fri Jan 25 23:11:13 2013	(r245922)
@@ -2166,7 +2166,7 @@ nd6_storelladdr(struct ifnet *ifp, struc
 
 	*lle = NULL;
 	IF_AFDATA_UNLOCK_ASSERT(ifp);
-	if (m->m_flags & M_MCAST) {
+	if (m != NULL && m->m_flags & M_MCAST) {
 		int i;
 
 		switch (ifp->if_type) {



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