Index | Thread | Search

From:
joshua stein <jcs@jcs.org>
Subject:
unwind: enable forced resolvers
To:
tech@openbsd.org
Date:
Wed, 25 Feb 2026 09:01:33 -0600

Download raw body.

Thread
I got no reply on this, anyone else know unwind internals?


----- Forwarded message from joshua stein <jcs@jcs.org> -----

From: joshua stein <jcs@jcs.org>
To: florian@openbsd.org
Date: Mon, 16 Feb 2026 13:06:49 -0600
Message-ID: <20260216130102.716c995c04@6cb0b60987e7ebd>
Subject: unwind: enable forced resolvers

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?

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;
 				}

----- End forwarded message -----