From: Florian Obser Subject: Re: unwind: enable forced resolvers To: tech@openbsd.org Date: Wed, 25 Feb 2026 18:25:46 +0100 On 2026-02-25 09:01 -06, joshua stein wrote: > I got no reply on this, anyone else know unwind internals? sorry, I didn't have time yet. > > From: joshua stein > Subject: unwind: enable forced resolvers > To: florian@openbsd.org > Date: Mon, 16 Feb 2026 13:06:49 -0600 (1 week, 1 day, 22 hours ago) > > I wrote a little proxy[0] to respond to queries for `local.` from > unwind and pass them to avahi-resolve. It depends on an unwind > configuration like this: > > preference { autoconf } > forwarder { 127.0.0.1 port 5300 } > force forwarder { local } > > But it seems that unwind doesn't enable forwarders unless they're in > the preference block, even if they're in a force block. Is there > harm in enabling them? I think this will work, I've just read all the relevant code. OK florian Someone else was asking me about a similar use case a few years back, and I didn't come up with this solution... Btw. I think force should (additionally) accept a forwarder spec, i.e this should work: preference { autoconf } force 127.0.0.1 port 5300 { local } Not sure of the exact syntax and how to convince the parser, but you get the idea... btw2. do we need something that speaks mdns in base? > > 0. https://github.com/jcs/avahi-proxy > > > diff --git sbin/unwind/parse.y sbin/unwind/parse.y > index 7ea6117e9bc..9a639367f64 100644 > --- sbin/unwind/parse.y > +++ sbin/unwind/parse.y > @@ -332,10 +332,11 @@ force : FORCE acceptbogus prefopt '{' force_list optnl '}' { > n->acceptbogus = $2; > n->type = $3; > conf->force_resolvers[$3] = 1; > + conf->enabled_resolvers[$3] = 1; > RB_REMOVE(force_tree, &$5, n); > if (RB_INSERT(force_tree, &conf->force, > n)) { > - yyerror("%s already in an force " > + yyerror("%s already in a force " > "list", n->domain); > error = 1; > } > > ---------- > -- In my defence, I have been left unsupervised.