From: "George Matsumura via supervision" <supervision@list.skarnet.org>
To: supervision@list.skarnet.org
Cc: George Matsumura <gorg@gorgnet.net>
Subject: [PATCH] Resolve PROTOREMOTEHOST or PROTOLOCALHOST when only one is specified
Date: Tue, 30 Jul 2024 01:11:13 -0600 [thread overview]
Message-ID: <20240730071112.30487-2-gorg@gorgnet.net> (raw)
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
next reply other threads:[~2024-07-30 7:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 7:11 George Matsumura via supervision [this message]
2024-07-30 8:02 ` Laurent Bercot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240730071112.30487-2-gorg@gorgnet.net \
--to=supervision@list.skarnet.org \
--cc=gorg@gorgnet.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).