svn commit: r245922 - head/sys/netinet6

Navdeep Parhar np at FreeBSD.org
Fri Jan 25 23:11:14 UTC 2013


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) {


More information about the svn-src-all mailing list