Module Name:    src
Committed By:   knakahara
Date:           Tue Jun 21 03:54:04 UTC 2016

Modified Files:
        src/sys/net: if_ethersubr.c

Log Message:
fix ATF net/carp failure


To generate a diff of this commit:
cvs rdiff -u -r1.224 -r1.225 src/sys/net/if_ethersubr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.224 src/sys/net/if_ethersubr.c:1.225
--- src/sys/net/if_ethersubr.c:1.224	Mon Jun 20 07:01:45 2016
+++ src/sys/net/if_ethersubr.c	Tue Jun 21 03:54:04 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ethersubr.c,v 1.224 2016/06/20 07:01:45 knakahara Exp $	*/
+/*	$NetBSD: if_ethersubr.c,v 1.225 2016/06/21 03:54:04 knakahara Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.224 2016/06/20 07:01:45 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.225 2016/06/21 03:54:04 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -204,7 +204,12 @@ ether_output(struct ifnet * const ifp0, 
 	struct at_ifaddr *aa;
 #endif /* NETATALK */
 
-	KASSERT(ifp->if_extflags & IFEF_OUTPUT_MPSAFE);
+	/*
+	 * some paths such as carp_output() call ethr_output() with "ifp"
+	 * argument as other than ether ifnet.
+	 */
+	KASSERT(ifp->if_output != ether_output
+	    || ifp->if_extflags & IFEF_OUTPUT_MPSAFE);
 
 #ifdef MBUFTRACE
 	m_claimm(m, ifp->if_mowner);

Reply via email to