diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2019-02-14 18:19:14 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2019-02-14 18:19:14 +0000 |
commit | 6fb206e1e9f8f2e247e313f7f53378ae120d1504 (patch) | |
tree | 5c8e75e9e1b393c1c670655e3b2c1caccbf5666b /sys/net/bridgectl.c | |
parent | f1b77f7173fcac1dc64eac58234281d5b9abcdcb (diff) |
Use timeout_barrier() when bringing the bridge(4) down and only execute
the timeout handler if the interface is running.
ok claudio@
Diffstat (limited to 'sys/net/bridgectl.c')
-rw-r--r-- | sys/net/bridgectl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/bridgectl.c b/sys/net/bridgectl.c index ffc47f950fb..4f27669fd92 100644 --- a/sys/net/bridgectl.c +++ b/sys/net/bridgectl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bridgectl.c,v 1.13 2018/12/12 14:19:15 mpi Exp $ */ +/* $OpenBSD: bridgectl.c,v 1.14 2019/02/14 18:19:13 mpi Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -321,11 +321,15 @@ void bridge_rtage(void *vsc) { struct bridge_softc *sc = vsc; + struct ifnet *ifp = &sc->sc_if; struct bridge_rtnode *n, *p; int i; KERNEL_ASSERT_LOCKED(); + if (!ISSET(ifp->if_flags, IFF_RUNNING)) + return; + for (i = 0; i < BRIDGE_RTABLE_SIZE; i++) { n = LIST_FIRST(&sc->sc_rts[i]); while (n != NULL) { |