summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2012-11-15 15:50:20 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2012-11-15 15:50:20 +0000
commit30038c6e004f8c90dc195ab8be20fb1390240399 (patch)
tree2ca066288a86e3863404e0380b8570a9edfa85fb /sys/dev
parent9eb6ce555483c6266b944f1e1288ba4f350aee2b (diff)
Do not try to transmit packets if the interface is not running.
ok chris@ deraadt@ dtucker@ mikeb@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_vr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c
index a310d5d5a85..01550793096 100644
--- a/sys/dev/pci/if_vr.c
+++ b/sys/dev/pci/if_vr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vr.c,v 1.117 2012/10/20 16:12:22 chris Exp $ */
+/* $OpenBSD: if_vr.c,v 1.118 2012/11/15 15:50:19 jsing Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1276,7 +1276,10 @@ vr_start(struct ifnet *ifp)
sc = ifp->if_softc;
- if (ifp->if_flags & IFF_OACTIVE || sc->vr_link == 0)
+ if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
+ return;
+
+ if (sc->vr_link == 0)
return;
cur_tx = sc->vr_cdata.vr_tx_prod;