diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2019-12-14 11:18:55 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2019-12-14 11:18:55 +0000 |
commit | 6e46379ae1f35aea4dfe424dc8b4cae78d52e3f7 (patch) | |
tree | 43457aef628a1ed9e2fa4b31a3266f0d0990fa65 /sbin/unwind/resolver.c | |
parent | d3117f30c53b6b15cf3246114180afc661ca4579 (diff) |
No use to create resolvers we know are going to be dead; ok florian@
Diffstat (limited to 'sbin/unwind/resolver.c')
-rw-r--r-- | sbin/unwind/resolver.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/unwind/resolver.c b/sbin/unwind/resolver.c index 59bab341970..7cd4770369e 100644 --- a/sbin/unwind/resolver.c +++ b/sbin/unwind/resolver.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resolver.c,v 1.110 2019/12/13 16:18:54 otto Exp $ */ +/* $OpenBSD: resolver.c,v 1.111 2019/12/14 11:18:54 otto Exp $ */ /* * Copyright (c) 2018 Florian Obser <florian@openbsd.org> @@ -1072,9 +1072,15 @@ new_resolver(enum uw_resolver_type type) return; break; case UW_RES_RECURSOR: + break; case UW_RES_FORWARDER: case UW_RES_ODOT_FORWARDER: + if (TAILQ_EMPTY(&resolver_conf->uw_forwarder_list)) + return; + break; case UW_RES_DOT: + if (TAILQ_EMPTY(&resolver_conf->uw_dot_forwarder_list)) + return; break; case UW_RES_NONE: fatalx("cannot create UW_RES_NONE resolver"); |