From eb788fed2c25e2cc9e10eeb69cd6a369e87233e3 Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 26 Jan 2021 12:46:46 +0000 Subject: [PATCH] Some config changes require a restart of all resolvers even DEAD ones; handle them like UNKNOWN. Found the hard way by kn. --- sbin/unwind/resolver.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sbin/unwind/resolver.c b/sbin/unwind/resolver.c index af18795e75a..c1e399b859a 100644 --- a/sbin/unwind/resolver.c +++ b/sbin/unwind/resolver.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resolver.c,v 1.135 2021/01/25 16:56:59 florian Exp $ */ +/* $OpenBSD: resolver.c,v 1.136 2021/01/26 12:46:46 florian Exp $ */ /* * Copyright (c) 2018 Florian Obser @@ -1120,6 +1120,7 @@ new_resolver(enum uw_resolver_type type, enum uw_resolver_state state) return; switch (state) { + case DEAD: case UNKNOWN: check_resolver(resolvers[type]); break; @@ -1129,9 +1130,6 @@ new_resolver(enum uw_resolver_type type, enum uw_resolver_state state) case RESOLVING: resolvers[type]->state = state; break; - default: - fatalx("%s: invalid resolver state: %s", __func__, - uw_resolver_state_str[state]); } } -- 2.20.1