svn commit: r301498 - head/sys/net

Bjoern A. Zeeb bz at FreeBSD.org
Mon Jun 6 10:13:50 UTC 2016


Author: bz
Date: Mon Jun  6 10:13:48 2016
New Revision: 301498
URL: https://svnweb.freebsd.org/changeset/base/301498

Log:
  Make the KASSERT message more helpful by also printing the ifp information
  which we are asserting.
  
  Obtained from:	projects/vnet
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/net/if_ethersubr.c

Modified: head/sys/net/if_ethersubr.c
==============================================================================
--- head/sys/net/if_ethersubr.c	Mon Jun  6 10:07:57 2016	(r301497)
+++ head/sys/net/if_ethersubr.c	Mon Jun  6 10:13:48 2016	(r301498)
@@ -753,7 +753,8 @@ ether_input(struct ifnet *ifp, struct mb
 		 * We will rely on rcvif being set properly in the deferred context,
 		 * so assert it is correct here.
 		 */
-		KASSERT(m->m_pkthdr.rcvif == ifp, ("%s: ifnet mismatch", __func__));
+		KASSERT(m->m_pkthdr.rcvif == ifp, ("%s: ifnet mismatch m %p "
+		    "rcvif %p ifp %p", __func__, m, m->m_pkthdr.rcvif, ifp));
 		CURVNET_SET_QUIET(ifp->if_vnet);
 		netisr_dispatch(NETISR_ETHER, m);
 		CURVNET_RESTORE();


More information about the svn-src-head mailing list