summaryrefslogtreecommitdiffstats
path: root/usr.sbin/relayd
diff options
context:
space:
mode:
authorbenno <benno@openbsd.org>2017-12-18 21:45:57 +0000
committerbenno <benno@openbsd.org>2017-12-18 21:45:57 +0000
commit9ba713fe1af17f7f3a93882479c9f4ae3d72b9bc (patch)
tree2bcf57ed357cbe31f8b3fb08594b601aa19355cf /usr.sbin/relayd
parentDisplay $MODE (install/upgrade) in the prompt before we know the hostname. (diff)
downloadwireguard-openbsd-9ba713fe1af17f7f3a93882479c9f4ae3d72b9bc.tar.xz
wireguard-openbsd-9ba713fe1af17f7f3a93882479c9f4ae3d72b9bc.zip
always initialize the hce_launch_checks event timer.
Fixes a crash when poll is run without any checks. Found and fixed by Hiltjo Posthuma (hiltjo -AT- codemadness -DOT- org). ok claudio@
Diffstat (limited to 'usr.sbin/relayd')
-rw-r--r--usr.sbin/relayd/hce.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/relayd/hce.c b/usr.sbin/relayd/hce.c
index 5c5ee6f3013..e4b50292d69 100644
--- a/usr.sbin/relayd/hce.c
+++ b/usr.sbin/relayd/hce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hce.c,v 1.77 2017/05/28 10:39:15 benno Exp $ */
+/* $OpenBSD: hce.c,v 1.78 2017/12/18 21:45:57 benno Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -80,8 +80,7 @@ hce_setup_events(void)
struct timeval tv;
struct table *table;
- if (!(TAILQ_EMPTY(env->sc_tables) ||
- event_initialized(&env->sc_ev))) {
+ if (!event_initialized(&env->sc_ev)) {
evtimer_set(&env->sc_ev, hce_launch_checks, env);
bzero(&tv, sizeof(tv));
evtimer_add(&env->sc_ev, &tv);