From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from alyss.skarnet.org (alyss.skarnet.org [95.142.172.232]) by inbox.vuxu.org (Postfix) with SMTP id 35749256CF for ; Tue, 30 Jul 2024 09:11:47 +0200 (CEST) Received: (qmail 65522 invoked by uid 89); 30 Jul 2024 07:12:12 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 65515 invoked from network); 30 Jul 2024 07:12:12 -0000 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; d=gorgnet.net; s=b1; x=1722928303; q=dns/txt; h=Received: Received:From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding; bh=O4S6hGt9LypuHXe2Wzfm/2vwoDyB6jzeJ ADVsDRT3UA=; b=CaLslvYEIXjbt3PM285TZlVgZo5R++BvIjCc2I54qerRETyQ4 z6UkMu3XQKB0gkBCB7ij0xon0I+c+WyFjcCBQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gorgnet.net; s=a1; x=1722928303; q=dns/txt; h=Received: Received:From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding; bh=O4S6hGt9LypuHXe2Wzfm/2vwoDyB6jzeJ ADVsDRT3UA=; b=dA7BkTrnEiWQtO4+sUwn/xN0QYk59x73o0L/RYSvLSem7Q7CO 0njUxYeOFx87thp8r1zbzQQ4EISs4bz+/kQvJwfBVF5jLkyG58F9e/tRsfvVwlxI PjLq+kN5VWq1tPah2tzd7NVCeW81R86ODhhGaF7h9MgieO2eU8hh5nHQiCwLzKaL i6qF5lwWL6EYHc7MXPsox0gAovsP7TJsoFATAqW7eDP8vMY5lZ/u9/RQPvNZEHxR pCeTvb/auuAhyA87jvhaTGI7f0fG73wPIH6+Mmm8zngKK2u35ZVrN9zGzb6ifuj+ viJsa1V7ARkT4zGVDRrz/aUOebn4Jo5nbV7BA== From: "George Matsumura via supervision" Reply-To: George Matsumura To: supervision@list.skarnet.org Cc: George Matsumura Subject: [PATCH] Resolve PROTOREMOTEHOST or PROTOLOCALHOST when only one is specified Date: Tue, 30 Jul 2024 01:11:13 -0600 Message-ID: <20240730071112.30487-2-gorg@gorgnet.net> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Previously, specification of PROTOLOCALHOST on the command line with the -l option would lead to PROTOREMOTEHOST not being resolved. This did not seem to be the intended behaviour, especially as the call to s6dns_resolven_parse_g works with any combination of the state of previous hostname definitions. This change alters the conditional to conduct the necessary resolutions in all cases. I apologize if I misinterpreted or was mistaken about anything. --- src/conn-tools/s6-tcpserver-access.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conn-tools/s6-tcpserver-access.c b/src/conn-tools/s6-tcpserver-access.c index 0bb1764..d528bd0 100644 --- a/src/conn-tools/s6-tcpserver-access.c +++ b/src/conn-tools/s6-tcpserver-access.c @@ -318,7 +318,7 @@ int main (int argc, char const *const *argv) blob[1].options = S6DNS_O_RECURSIVE ; data[1].rtype = S6DNS_T_PTR ; } - if (!localname && !remotelen && !s6dns_resolven_parse_g(blob + !!localname, !localname + !remotelen, &infinite)) + if (!localname || !remotelen && !s6dns_resolven_parse_g(blob + !!localname, !localname + !remotelen, &infinite)) { if (verbosity >= 3) strerr_warnwu2x("resolve IP addresses: ", s6dns_constants_error_str(errno)) ; if (flagfatal) -- 2.45.2