Module Name:    src
Committed By:   bouyer
Date:           Sat Apr  4 15:31:47 UTC 2009

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

Log Message:
Fixes from Masao Uebayashi


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/net/if_bridge.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_bridge.c
diff -u src/sys/net/if_bridge.c:1.65 src/sys/net/if_bridge.c:1.66
--- src/sys/net/if_bridge.c:1.65	Sat Apr  4 10:00:23 2009
+++ src/sys/net/if_bridge.c	Sat Apr  4 15:31:47 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bridge.c,v 1.65 2009/04/04 10:00:23 bouyer Exp $	*/
+/*	$NetBSD: if_bridge.c,v 1.66 2009/04/04 15:31:47 bouyer Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.65 2009/04/04 10:00:23 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.66 2009/04/04 15:31:47 bouyer Exp $");
 
 #include "opt_bridge_ipf.h"
 #include "opt_inet.h"
@@ -419,8 +419,6 @@
 	/* Tear down the routing table. */
 	bridge_rtable_fini(sc);
 
-
-
 	softint_disestablish(sc->sc_softintr);
 
 	free(sc, M_DEVBUF);
@@ -1327,10 +1325,13 @@
 	struct ether_header *eh;
 	int s;
 
-	if ((sc->sc_if.if_flags & IFF_RUNNING) == 0)
+	mutex_enter(softnet_lock);
+	if ((sc->sc_if.if_flags & IFF_RUNNING) == 0) {
+		mutex_exit(softnet_lock);
 		return;
+	}
 
-	s = splbio();
+	s = splnet();
 	while (1) {
 		IFQ_POLL(&sc->sc_if.if_snd, m);
 		if (m == NULL)
@@ -1451,6 +1452,7 @@
 		bridge_enqueue(sc, dst_if, m, 1);
 	}
 	splx(s);
+	mutex_exit(softnet_lock);
 }
 
 /*

Reply via email to