diff options
author | 2019-04-02 07:47:22 +0000 | |
---|---|---|
committer | 2019-04-02 07:47:22 +0000 | |
commit | fd873f7f37e33a5b0b4c6fc4744dabc823e4475d (patch) | |
tree | 6ff14d54414f58a607cfdc056c27a7879665ea07 | |
parent | Collapse case statements to a common fall through and use the passed (diff) | |
download | wireguard-openbsd-fd873f7f37e33a5b0b4c6fc4744dabc823e4475d.tar.xz wireguard-openbsd-fd873f7f37e33a5b0b4c6fc4744dabc823e4475d.zip |
Add a config option to specify the preference of name servers.
Unfortunately the nameserver types enums needed to be renamed
to not collide with yacc tokens.
-rw-r--r-- | sbin/unwind/parse.y | 77 | ||||
-rw-r--r-- | sbin/unwind/printconf.c | 11 | ||||
-rw-r--r-- | sbin/unwind/resolver.c | 127 | ||||
-rw-r--r-- | sbin/unwind/resolver.h | 17 | ||||
-rw-r--r-- | sbin/unwind/unwind.c | 16 | ||||
-rw-r--r-- | sbin/unwind/unwind.conf.5 | 25 | ||||
-rw-r--r-- | sbin/unwind/unwind.h | 19 | ||||
-rw-r--r-- | usr.sbin/unwindctl/unwindctl.c | 12 |
8 files changed, 208 insertions, 96 deletions
diff --git a/sbin/unwind/parse.y b/sbin/unwind/parse.y index 8d813589cd2..a968a6912a3 100644 --- a/sbin/unwind/parse.y +++ b/sbin/unwind/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.2 2019/04/01 03:31:55 florian Exp $ */ +/* $OpenBSD: parse.y,v 1.3 2019/04/02 07:47:22 florian Exp $ */ /* * Copyright (c) 2018 Florian Obser <florian@openbsd.org> @@ -80,6 +80,7 @@ struct sym { int symset(const char *, const char *, int); char *symget(const char *); +int check_pref_uniq(enum uw_resolver_type); static struct uw_conf *conf; static int errors; @@ -100,7 +101,7 @@ typedef struct { %token STRICT YES NO INCLUDE ERROR %token FORWARDER DOT PORT CAPTIVE PORTAL URL EXPECTED RESPONSE -%token STATUS AUTO AUTHENTICATION NAME +%token STATUS AUTO AUTHENTICATION NAME PREFERENCE RECURSOR DHCP %token <v.string> STRING %token <v.number> NUMBER @@ -114,6 +115,7 @@ grammar : /* empty */ | grammar '\n' | grammar conf_main '\n' | grammar varset '\n' + | grammar uw_pref '\n' | grammar uw_forwarder '\n' | grammar captive_portal '\n' | grammar error '\n' { file->errors++; } @@ -228,6 +230,59 @@ captive_portal_optsl : URL STRING { } ; +uw_pref : PREFERENCE { conf->res_pref_len = 0; } pref_block + ; + +pref_block : '{' optnl prefopts_l '}' + | prefoptsl + ; + +prefopts_l : prefopts_l prefoptsl optnl + | prefoptsl optnl + ; + +prefoptsl : DOT { + if (!check_pref_uniq(UW_RES_DOT)) + YYERROR; + if (conf->res_pref_len >= UW_RES_NONE) { + yyerror("preference list too long"); + YYERROR; + } + conf->res_pref[conf->res_pref_len++] = + UW_RES_DOT; + } + | FORWARDER { + if (!check_pref_uniq(UW_RES_FORWARDER)) + YYERROR; + if (conf->res_pref_len >= UW_RES_NONE) { + yyerror("preference list too long"); + YYERROR; + } + conf->res_pref[conf->res_pref_len++] = + UW_RES_FORWARDER; + } + | RECURSOR { + if (!check_pref_uniq(UW_RES_RECURSOR)) + YYERROR; + if (conf->res_pref_len >= UW_RES_NONE) { + yyerror("preference list too long"); + YYERROR; + } + conf->res_pref[conf->res_pref_len++] = + UW_RES_RECURSOR; + } + | DHCP { + if(!check_pref_uniq(UW_RES_DHCP)) + YYERROR; + if (conf->res_pref_len >= UW_RES_NONE) { + yyerror("preference list too long"); + YYERROR; + } + conf->res_pref[conf->res_pref_len++] = + UW_RES_DHCP; + } + ; + uw_forwarder : FORWARDER forwarder_block ; @@ -462,6 +517,7 @@ lookup(char *s) {"authentication", AUTHENTICATION}, {"auto", AUTO}, {"captive", CAPTIVE}, + {"dhcp", DHCP}, {"dot", DOT}, {"expected", EXPECTED}, {"forwarder", FORWARDER}, @@ -470,6 +526,8 @@ lookup(char *s) {"no", NO}, {"port", PORT}, {"portal", PORTAL}, + {"preference", PREFERENCE}, + {"recursor", RECURSOR}, {"response", RESPONSE}, {"status", STATUS}, {"strict", STRICT}, @@ -976,3 +1034,18 @@ host_ip(const char *s) return (ss); } + +int +check_pref_uniq(enum uw_resolver_type type) +{ + int i; + + for (i = 0; i < conf->res_pref_len; i++) + if (conf->res_pref[i] == type) { + yyerror("%s is already in the preference list", + uw_resolver_type_str[type]); + return (0); + } + + return (1); +} diff --git a/sbin/unwind/printconf.c b/sbin/unwind/printconf.c index 78dcdab2824..b368c89cfaf 100644 --- a/sbin/unwind/printconf.c +++ b/sbin/unwind/printconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printconf.c,v 1.7 2019/04/01 03:31:55 florian Exp $ */ +/* $OpenBSD: printconf.c,v 1.8 2019/04/02 07:47:22 florian Exp $ */ /* * Copyright (c) 2018 Florian Obser <florian@openbsd.org> @@ -66,11 +66,20 @@ void print_config(struct uw_conf *conf) { struct uw_forwarder *uw_forwarder; + int i; #if notyet printf("strict %s\n", yesno(conf->uw_options)); #endif + if (conf->res_pref_len > 0) { + printf("preference {"); + for (i = 0; i < conf->res_pref_len; i++) { + printf(" %s", uw_resolver_type_str[conf->res_pref[i]]); + } + printf(" }\n"); + } + if (!SIMPLEQ_EMPTY(&conf->uw_forwarder_list) || !SIMPLEQ_EMPTY(&conf->uw_dot_forwarder_list)) { printf("forwarder {\n"); diff --git a/sbin/unwind/resolver.c b/sbin/unwind/resolver.c index 53960336a73..3c877bd4cb7 100644 --- a/sbin/unwind/resolver.c +++ b/sbin/unwind/resolver.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resolver.c,v 1.34 2019/04/02 07:46:03 florian Exp $ */ +/* $OpenBSD: resolver.c,v 1.35 2019/04/02 07:47:22 florian Exp $ */ /* * Copyright (c) 2018 Florian Obser <florian@openbsd.org> @@ -138,7 +138,7 @@ struct imsgev *iev_frontend; struct imsgev *iev_captiveportal; struct imsgev *iev_main; struct uw_forwarder_head dhcp_forwarder_list; -struct uw_resolver *resolvers[RESOLVER_NONE + 1]; +struct uw_resolver *resolvers[UW_RES_NONE + 1]; struct timeval captive_portal_check_tv = {PORTAL_CHECK_SEC, 0}; struct event captive_portal_check_ev; @@ -795,21 +795,21 @@ parse_dhcp_forwarders(char *forwarders) void new_recursor(void) { - free_resolver(resolvers[RECURSOR]); - resolvers[RECURSOR] = NULL; + free_resolver(resolvers[UW_RES_RECURSOR]); + resolvers[UW_RES_RECURSOR] = NULL; if (TAILQ_EMPTY(&trust_anchors)) return; - resolvers[RECURSOR] = create_resolver(RECURSOR); - check_resolver(resolvers[RECURSOR]); + resolvers[UW_RES_RECURSOR] = create_resolver(UW_RES_RECURSOR); + check_resolver(resolvers[UW_RES_RECURSOR]); } void new_forwarders(void) { - free_resolver(resolvers[FORWARDER]); - resolvers[FORWARDER] = NULL; + free_resolver(resolvers[UW_RES_DHCP]); + resolvers[UW_RES_DHCP] = NULL; if (SIMPLEQ_EMPTY(&dhcp_forwarder_list)) return; @@ -818,16 +818,16 @@ new_forwarders(void) return; log_debug("%s: create_resolver", __func__); - resolvers[FORWARDER] = create_resolver(FORWARDER); + resolvers[UW_RES_DHCP] = create_resolver(UW_RES_DHCP); - check_resolver(resolvers[FORWARDER]); + check_resolver(resolvers[UW_RES_DHCP]); } void new_static_forwarders(void) { - free_resolver(resolvers[STATIC_FORWARDER]); - resolvers[STATIC_FORWARDER] = NULL; + free_resolver(resolvers[UW_RES_FORWARDER]); + resolvers[UW_RES_FORWARDER] = NULL; if (SIMPLEQ_EMPTY(&resolver_conf->uw_forwarder_list)) return; @@ -836,16 +836,16 @@ new_static_forwarders(void) return; log_debug("%s: create_resolver", __func__); - resolvers[STATIC_FORWARDER] = create_resolver(STATIC_FORWARDER); + resolvers[UW_RES_FORWARDER] = create_resolver(UW_RES_FORWARDER); - check_resolver(resolvers[STATIC_FORWARDER]); + check_resolver(resolvers[UW_RES_FORWARDER]); } void new_static_dot_forwarders(void) { - free_resolver(resolvers[STATIC_DOT_FORWARDER]); - resolvers[STATIC_DOT_FORWARDER] = NULL; + free_resolver(resolvers[UW_RES_DOT]); + resolvers[UW_RES_DOT] = NULL; if (SIMPLEQ_EMPTY(&resolver_conf->uw_dot_forwarder_list)) return; @@ -854,9 +854,9 @@ new_static_dot_forwarders(void) return; log_debug("%s: create_resolver", __func__); - resolvers[STATIC_DOT_FORWARDER] = create_resolver(STATIC_DOT_FORWARDER); + resolvers[UW_RES_DOT] = create_resolver(UW_RES_DOT); - check_resolver(resolvers[STATIC_DOT_FORWARDER]); + check_resolver(resolvers[UW_RES_DOT]); } struct uw_resolver * @@ -921,15 +921,15 @@ create_resolver(enum uw_resolver_type type) evtimer_set(&res->check_ev, resolver_check_timo, res); switch(res->type) { - case RECURSOR: + case UW_RES_RECURSOR: break; - case FORWARDER: + case UW_RES_DHCP: set_forwarders(res, &dhcp_forwarder_list); break; - case STATIC_FORWARDER: + case UW_RES_FORWARDER: set_forwarders(res, &resolver_conf->uw_forwarder_list); break; - case STATIC_DOT_FORWARDER: + case UW_RES_DOT: set_forwarders(res, &resolver_conf->uw_dot_forwarder_list); ub_ctx_set_option(res->ctx, "tls-cert-bundle:", tls_default_ca_cert_file()); @@ -1116,24 +1116,24 @@ schedule_recheck_all_resolvers(void) log_debug("%s", __func__); - if (resolvers[RECURSOR] != NULL) { + if (resolvers[UW_RES_RECURSOR] != NULL) { tv.tv_usec = arc4random() % 1000000; /* modulo bias is ok */ - evtimer_add(&resolvers[RECURSOR]->check_ev, &tv); + evtimer_add(&resolvers[UW_RES_RECURSOR]->check_ev, &tv); } - if (resolvers[STATIC_FORWARDER] != NULL) { + if (resolvers[UW_RES_FORWARDER] != NULL) { tv.tv_usec = arc4random() % 1000000; /* modulo bias is ok */ - evtimer_add(&resolvers[STATIC_FORWARDER]->check_ev, &tv); + evtimer_add(&resolvers[UW_RES_FORWARDER]->check_ev, &tv); } - if (resolvers[STATIC_DOT_FORWARDER] != NULL) { + if (resolvers[UW_RES_DOT] != NULL) { tv.tv_usec = arc4random() % 1000000; /* modulo bias is ok */ - evtimer_add(&resolvers[STATIC_DOT_FORWARDER]->check_ev, &tv); + evtimer_add(&resolvers[UW_RES_DOT]->check_ev, &tv); } - if (resolvers[FORWARDER] != NULL) { + if (resolvers[UW_RES_DHCP] != NULL) { tv.tv_usec = arc4random() % 1000000; /* modulo bias is ok */ - evtimer_add(&resolvers[FORWARDER]->check_ev, &tv); + evtimer_add(&resolvers[UW_RES_DHCP]->check_ev, &tv); } } @@ -1210,39 +1210,36 @@ struct uw_resolver* best_resolver(void) { struct uw_resolver *res = NULL; + int i; log_debug("%s: %s: %s, %s: %s, %s: %s, %s: %s, captive_portal: %s", __func__, - uw_resolver_type_str[RECURSOR], resolvers[RECURSOR] != NULL ? - uw_resolver_state_str[resolvers[RECURSOR]->state] : "NA", - uw_resolver_type_str[FORWARDER], resolvers[FORWARDER] != NULL ? - uw_resolver_state_str[resolvers[FORWARDER]->state] : "NA", - uw_resolver_type_str[STATIC_FORWARDER], - resolvers[STATIC_FORWARDER] != NULL ? - uw_resolver_state_str[resolvers[STATIC_FORWARDER]->state] : "NA", - uw_resolver_type_str[STATIC_DOT_FORWARDER], - resolvers[STATIC_DOT_FORWARDER] != NULL ? - uw_resolver_state_str[resolvers[STATIC_DOT_FORWARDER]->state] : + uw_resolver_type_str[UW_RES_RECURSOR], resolvers[UW_RES_RECURSOR] + != NULL ? uw_resolver_state_str[resolvers[UW_RES_RECURSOR]->state] + : "NA", + uw_resolver_type_str[UW_RES_DHCP], resolvers[UW_RES_DHCP] != NULL ? + uw_resolver_state_str[resolvers[UW_RES_DHCP]->state] : "NA", + uw_resolver_type_str[UW_RES_FORWARDER], + resolvers[UW_RES_FORWARDER] != NULL ? + uw_resolver_state_str[resolvers[UW_RES_FORWARDER]->state] : "NA", + uw_resolver_type_str[UW_RES_DOT], + resolvers[UW_RES_DOT] != NULL ? + uw_resolver_state_str[resolvers[UW_RES_DOT]->state] : "NA", captive_portal_state_str[captive_portal_state]); if (captive_portal_state == UNKNOWN || captive_portal_state == BEHIND) { - if (resolvers[FORWARDER] != NULL) { - res = resolvers[FORWARDER]; + if (resolvers[UW_RES_DHCP] != NULL) { + res = resolvers[UW_RES_DHCP]; goto out; } } - res = resolvers[RECURSOR]; - - if (resolver_cmp(res, resolvers[STATIC_DOT_FORWARDER]) < 0) - res = resolvers[STATIC_DOT_FORWARDER]; - - if (resolver_cmp(res, resolvers[STATIC_FORWARDER]) < 0) - res = resolvers[STATIC_FORWARDER]; - - if (resolver_cmp(res, resolvers[FORWARDER]) < 0) - res = resolvers[FORWARDER]; + res = resolvers[resolver_conf->res_pref[0]]; + for (i = 1; i < resolver_conf->res_pref_len; i++) + if (resolver_cmp(res, + resolvers[resolver_conf->res_pref[i]]) < 0) + res = resolvers[resolver_conf->res_pref[i]]; out: log_debug("%s: %s state: %s", __func__, uw_resolver_type_str[res->type], uw_resolver_state_str[res->state]); @@ -1283,26 +1280,24 @@ void show_status(enum uw_resolver_type type, pid_t pid) { struct uw_resolver *best; + int i; best = best_resolver(); switch(type) { - case RESOLVER_NONE: + case UW_RES_NONE: resolver_imsg_compose_frontend(IMSG_CTL_CAPTIVEPORTAL_INFO, pid, &captive_portal_state, sizeof(captive_portal_state)); - send_resolver_info(resolvers[RECURSOR], - resolvers[RECURSOR] == best, pid); - send_resolver_info(resolvers[FORWARDER], resolvers[FORWARDER] - == best, pid); - send_resolver_info(resolvers[STATIC_FORWARDER], - resolvers[STATIC_FORWARDER] == best, pid); - send_resolver_info(resolvers[STATIC_DOT_FORWARDER], - resolvers[STATIC_DOT_FORWARDER] == best, pid); + for (i = 0; i < resolver_conf->res_pref_len; i++) + send_resolver_info( + resolvers[resolver_conf->res_pref[i]], + resolvers[resolver_conf->res_pref[i]] == + best, pid); break; - case RECURSOR: - case FORWARDER: - case STATIC_FORWARDER: - case STATIC_DOT_FORWARDER: + case UW_RES_RECURSOR: + case UW_RES_DHCP: + case UW_RES_FORWARDER: + case UW_RES_DOT: send_resolver_info(resolvers[type], resolvers[type] == best, pid); send_detailed_resolver_info(resolvers[type], pid); @@ -1375,7 +1370,7 @@ check_captive_portal(int timer_reset) return; } - if (resolvers[FORWARDER] == NULL) { + if (resolvers[UW_RES_DHCP] == NULL) { log_debug("%s no DHCP nameservers known", __func__); return; } diff --git a/sbin/unwind/resolver.h b/sbin/unwind/resolver.h index a7da5130deb..53b384bfb41 100644 --- a/sbin/unwind/resolver.h +++ b/sbin/unwind/resolver.h @@ -1,4 +1,4 @@ -/* $OpenBSD: resolver.h,v 1.5 2019/04/02 07:45:11 florian Exp $ */ +/* $OpenBSD: resolver.h,v 1.6 2019/04/02 07:47:23 florian Exp $ */ /* * Copyright (c) 2018 Florian Obser <florian@openbsd.org> @@ -31,21 +31,6 @@ static const char * const uw_resolver_state_str[] = { "validating" }; -enum uw_resolver_type { - RECURSOR, - FORWARDER, - STATIC_FORWARDER, - STATIC_DOT_FORWARDER, - RESOLVER_NONE -}; - -static const char * const uw_resolver_type_str[] = { - "recursor", - "dhcp forwarder", - "static forwarder", - "DoT forwarder" -}; - static const int64_t histogram_limits[] = { -1, 10, diff --git a/sbin/unwind/unwind.c b/sbin/unwind/unwind.c index 65da1475953..54d5e90fea3 100644 --- a/sbin/unwind/unwind.c +++ b/sbin/unwind/unwind.c @@ -1,4 +1,4 @@ -/* $OpenBSD: unwind.c,v 1.22 2019/03/31 03:36:18 yasuoka Exp $ */ +/* $OpenBSD: unwind.c,v 1.23 2019/04/02 07:47:23 florian Exp $ */ /* * Copyright (c) 2018 Florian Obser <florian@openbsd.org> @@ -782,6 +782,9 @@ merge_config(struct uw_conf *conf, struct uw_conf *xconf) } conf->uw_options = xconf->uw_options; + conf->res_pref_len = xconf->res_pref_len; + memcpy(&conf->res_pref, &xconf->res_pref, + sizeof(conf->res_pref)); free(conf->captive_portal_host); conf->captive_portal_host = xconf->captive_portal_host; @@ -818,12 +821,21 @@ merge_config(struct uw_conf *conf, struct uw_conf *xconf) struct uw_conf * config_new_empty(void) { - struct uw_conf *xconf; + static enum uw_resolver_type default_res_pref[] = { + UW_RES_DOT, + UW_RES_FORWARDER, + UW_RES_RECURSOR, + UW_RES_DHCP}; + struct uw_conf *xconf; xconf = calloc(1, sizeof(*xconf)); if (xconf == NULL) fatal(NULL); + memcpy(&xconf->res_pref, &default_res_pref, + sizeof(default_res_pref)); + xconf->res_pref_len = 4; + SIMPLEQ_INIT(&xconf->uw_forwarder_list); SIMPLEQ_INIT(&xconf->uw_dot_forwarder_list); diff --git a/sbin/unwind/unwind.conf.5 b/sbin/unwind/unwind.conf.5 index b2b1f7d88a3..02bf7723d4f 100644 --- a/sbin/unwind/unwind.conf.5 +++ b/sbin/unwind/unwind.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: unwind.conf.5,v 1.8 2019/04/01 03:31:56 florian Exp $ +.\" $OpenBSD: unwind.conf.5,v 1.9 2019/04/02 07:47:23 florian Exp $ .\" .\" Copyright (c) 2018 Florian Obser <florian@openbsd.org> .\" Copyright (c) 2005 Esben Norby <norby@openbsd.org> @@ -18,7 +18,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: April 1 2019 $ +.Dd $Mdocdate: April 2 2019 $ .Dt UNWIND.CONF 5 .Os .Sh NAME @@ -71,6 +71,27 @@ is specified, use DNS over TLS when sending queries to the server at .Ar address . .Ar name validates the certificate of the DNS over TLS server. +.It Ic preference Brq Ar type ... +A list of DNS name server types to specify the preference in which +name servers are picked. +Validating name servers are always picked over non-validating name servers. +DNS name server types are: +.Bl -tag -width Ds +.It Ic dhcp +Name servers learned via dhcp. +.It Ic DoT +DNS over TLS name servers configured in +.Nm +.It Ic forwarder +Name servers configured in +.Nm +.It Ic recursor +.Nm unwind +itself recursively resolves names. +.El +.Pp +The default preference is +.Ic DoT forwarder recursor dhcp . .El .Pp .Nm unwind diff --git a/sbin/unwind/unwind.h b/sbin/unwind/unwind.h index 135aedcdf70..f5ac2c99353 100644 --- a/sbin/unwind/unwind.h +++ b/sbin/unwind/unwind.h @@ -1,4 +1,4 @@ -/* $OpenBSD: unwind.h,v 1.13 2019/03/30 12:52:03 florian Exp $ */ +/* $OpenBSD: unwind.h,v 1.14 2019/04/02 07:47:23 florian Exp $ */ /* * Copyright (c) 2018 Florian Obser <florian@openbsd.org> @@ -54,6 +54,21 @@ static const char * const log_procnames[] = { "captive portal", }; +enum uw_resolver_type { + UW_RES_RECURSOR, + UW_RES_DHCP, + UW_RES_FORWARDER, + UW_RES_DOT, + UW_RES_NONE +}; + +static const char * const uw_resolver_type_str[] = { + "recursor", + "dhcp", + "forwarder", + "DoT" +}; + struct imsgev { struct imsgbuf ibuf; void (*handler)(int, short, void *); @@ -117,6 +132,8 @@ struct uw_conf { struct uw_forwarder_head uw_forwarder_list; struct uw_forwarder_head uw_dot_forwarder_list; int uw_options; + enum uw_resolver_type res_pref[UW_RES_NONE]; + int res_pref_len; char *captive_portal_host; char *captive_portal_path; char *captive_portal_expected_response; diff --git a/usr.sbin/unwindctl/unwindctl.c b/usr.sbin/unwindctl/unwindctl.c index c2d22c57995..885c7bd08e3 100644 --- a/usr.sbin/unwindctl/unwindctl.c +++ b/usr.sbin/unwindctl/unwindctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: unwindctl.c,v 1.5 2019/02/17 14:49:52 florian Exp $ */ +/* $OpenBSD: unwindctl.c,v 1.6 2019/04/02 07:47:23 florian Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -148,27 +148,27 @@ main(int argc, char *argv[]) done = 1; break; case STATUS_RECURSOR: - type = RECURSOR; + type = UW_RES_RECURSOR; imsg_compose(ibuf, IMSG_CTL_STATUS, 0, 0, -1, &type, sizeof(type)); break; case STATUS_DHCP: - type = FORWARDER; + type = UW_RES_DHCP; imsg_compose(ibuf, IMSG_CTL_STATUS, 0, 0, -1, &type, sizeof(type)); break; case STATUS_STATIC: - type = STATIC_FORWARDER; + type = UW_RES_FORWARDER; imsg_compose(ibuf, IMSG_CTL_STATUS, 0, 0, -1, &type, sizeof(type)); break; case STATUS_DOT: - type = STATIC_DOT_FORWARDER; + type = UW_RES_DOT; imsg_compose(ibuf, IMSG_CTL_STATUS, 0, 0, -1, &type, sizeof(type)); break; case STATUS: - type = RESOLVER_NONE; + type = UW_RES_NONE; imsg_compose(ibuf, IMSG_CTL_STATUS, 0, 0, -1, &type, sizeof(type)); break; |