summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2010-07-22 10:19:37 +0000
committerkettenis <kettenis@openbsd.org>2010-07-22 10:19:37 +0000
commitd90ceb78c33297fe73d645d2035aeda78b18078b (patch)
tree1ae223f3703c4c9a558f80e00e4520a0ad2bc4b1
parentremove some groff \s escapes, which we do not support; (diff)
downloadwireguard-openbsd-d90ceb78c33297fe73d645d2035aeda78b18078b.tar.xz
wireguard-openbsd-d90ceb78c33297fe73d645d2035aeda78b18078b.zip
When suspending, only call athn_stop() when IFF_RUNNING is set.
ok damien@
-rw-r--r--sys/dev/ic/athn.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c
index 37408408522..003801629b6 100644
--- a/sys/dev/ic/athn.c
+++ b/sys/dev/ic/athn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: athn.c,v 1.56 2010/07/21 14:01:58 kettenis Exp $ */
+/* $OpenBSD: athn.c,v 1.57 2010/07/22 10:19:37 kettenis Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -2707,7 +2707,8 @@ athn_suspend(struct athn_softc *sc)
{
struct ifnet *ifp = &sc->sc_ic.ic_if;
- athn_stop(ifp, 1);
+ if (ifp->if_flags & IFF_RUNNING)
+ athn_stop(ifp, 1);
}
void