diff options
author | Michael Knudsen <mk@cvs.openbsd.org> | 2008-05-21 21:12:08 +0000 |
---|---|---|
committer | Michael Knudsen <mk@cvs.openbsd.org> | 2008-05-21 21:12:08 +0000 |
commit | f1959257354011cc86dfbb7bd8a76dffefed0431 (patch) | |
tree | 74fefc374a858cd0988352171c285f242899cb5f /sys/net | |
parent | c226c53ab9969e2bd8349fe4931a06fa432be035 (diff) |
Only cancel (timeout_del()) the timeout if we're not going to delay it
(timeout_add()) anyway.
ok brad claudio
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_bridge.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 732f5433e23..2b82b221dd4 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.c,v 1.168 2008/05/07 13:45:35 dlg Exp $ */ +/* $OpenBSD: if_bridge.c,v 1.169 2008/05/21 21:12:07 mk Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -600,9 +600,10 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; } sc->sc_brttimeout = bparam->ifbrp_ctime; - timeout_del(&sc->sc_brtimeout); if (bparam->ifbrp_ctime != 0) timeout_add(&sc->sc_brtimeout, sc->sc_brttimeout * hz); + else + timeout_del(&sc->sc_brtimeout); break; case SIOCBRDGGTO: bparam->ifbrp_ctime = sc->sc_brttimeout; |