summaryrefslogtreecommitdiff
path: root/sys/net/bridgestp.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2002-12-10 13:22:56 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2002-12-10 13:22:56 +0000
commit37d2e7eb91b6a12860533298c1068d5ecbae2270 (patch)
tree17298df147b8da2faa65931f3d71c98051bca8c3 /sys/net/bridgestp.c
parente86290274f6277858d1f077b750d4794bae6b48a (diff)
check IFF_RUNNING early in bstp_transmit_tcn; from netbsd; ok jason@
Diffstat (limited to 'sys/net/bridgestp.c')
-rw-r--r--sys/net/bridgestp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c
index 8706f59621d..2b826b2cd75 100644
--- a/sys/net/bridgestp.c
+++ b/sys/net/bridgestp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bridgestp.c,v 1.13 2002/12/09 18:56:14 deraadt Exp $ */
+/* $OpenBSD: bridgestp.c,v 1.14 2002/12/10 13:22:55 markus Exp $ */
/*
* Copyright (c) 2000 Jason L. Wright (jason@thought.net)
@@ -401,6 +401,9 @@ bstp_transmit_tcn(sc)
struct mbuf *m;
int s, error;
+ if ((ifp->if_flags & IFF_RUNNING) == 0)
+ return;
+
MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL)
return;
@@ -421,14 +424,11 @@ bstp_transmit_tcn(sc)
bcopy(&bpdu, m->m_data + sizeof(*eh), sizeof(bpdu));
s = splimp();
- if ((ifp->if_flags & IFF_RUNNING) == 0)
- goto out;
IFQ_ENQUEUE(&ifp->if_snd, m, NULL, error);
if (error == 0 && (ifp->if_flags & IFF_OACTIVE) == 0)
(*ifp->if_start)(ifp);
m = NULL;
-out:
splx(s);
if (m != NULL)
m_freem(m);