summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2019-05-13 18:20:13 +0000
committermpi <mpi@openbsd.org>2019-05-13 18:20:13 +0000
commit4eefde2c60286b509d90e1563f8a1b91a6c2d9cb (patch)
treef896460a1ad69ca3f5e8799335d0f428a1df0e62
parentDeal with the case where bridge_getbif() can return NULL. (diff)
downloadwireguard-openbsd-4eefde2c60286b509d90e1563f8a1b91a6c2d9cb.tar.xz
wireguard-openbsd-4eefde2c60286b509d90e1563f8a1b91a6c2d9cb.zip
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) {