supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* [PATCH] Resolve PROTOREMOTEHOST or PROTOLOCALHOST when only one is specified
@ 2024-07-30  7:11 George Matsumura via supervision
  2024-07-30  8:02 ` Laurent Bercot
  0 siblings, 1 reply; 2+ messages in thread
From: George Matsumura via supervision @ 2024-07-30  7:11 UTC (permalink / raw)
  To: supervision; +Cc: George Matsumura

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-30  8:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-30  7:11 [PATCH] Resolve PROTOREMOTEHOST or PROTOLOCALHOST when only one is specified George Matsumura via supervision
2024-07-30  8:02 ` Laurent Bercot

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).