From 30038c6e004f8c90dc195ab8be20fb1390240399 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Thu, 15 Nov 2012 15:50:20 +0000 Subject: Do not try to transmit packets if the interface is not running. ok chris@ deraadt@ dtucker@ mikeb@ --- sys/dev/pci/if_vr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/dev') 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; -- cgit v1.2.3