summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2019-05-13 18:20:14 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2019-05-13 18:20:14 +0000
commit9b65c2550d8f19eb24c6ddec4efd6a8c3c4c0d5d (patch)
tree7daefaae87ce60149e19b0abca04c57370151e4d
parent40472cab3b27dcfe8cf3d6e4aae91f62354355ca (diff)
Do not check for IFF_RUNNING inside bstp_initialization().
This allows to set such flag after completing the initialization of a bridge and still have bstp_tick() be scheduled from the begining. Fix a regression reported by and ok markus@
-rw-r--r--sys/net/bridgestp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c
index 295f9a4065e..4147211d24d 100644
--- a/sys/net/bridgestp.c
+++ b/sys/net/bridgestp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bridgestp.c,v 1.71 2019/05/03 18:39:08 mpi Exp $ */
+/* $OpenBSD: bridgestp.c,v 1.72 2019/05/13 18:20:13 mpi Exp $ */
/*
* Copyright (c) 2000 Jason L. Wright (jason@thought.net)
@@ -1887,8 +1887,7 @@ bstp_initialization(struct bstp_state *bs)
if (!timeout_initialized(&bs->bs_bstptimeout))
timeout_set(&bs->bs_bstptimeout, bstp_tick, bs);
- if (bs->bs_ifflags & IFF_RUNNING &&
- !timeout_pending(&bs->bs_bstptimeout))
+ if (!timeout_pending(&bs->bs_bstptimeout))
timeout_add_sec(&bs->bs_bstptimeout, 1);
LIST_FOREACH(bp, &bs->bs_bplist, bp_next) {