summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2024-07-30 07:48:12 +0000
committerLaurent Bercot <ska@appnovation.com>2024-07-30 07:48:12 +0000
commit580bd3ecbe773c61711486e9aa193420c2c52f47 (patch)
treebed0d58e1917fe805937c55f37bf6fabfa2d4b13
parent3f4b601c6503e26de21c2495053df638e1c2b0c6 (diff)
downloads6-networking-580bd3ecbe773c61711486e9aa193420c2c52f47.tar.xz
Fix partial local/remote host resolution in s6-tcpserver-access
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--AUTHORS1
-rw-r--r--src/conn-tools/s6-tcpserver-access.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/AUTHORS b/AUTHORS
index a6a46e6..d3df3cb 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -19,3 +19,4 @@ Thanks to:
Alex Grabowski <hurufu@gmail.com>
pjvm <pjvm742@disroot.org>
Jan Pobříslo <ccx@te2000.cz>
+ George Matsumura <gorg@gorgnet.net>
diff --git a/src/conn-tools/s6-tcpserver-access.c b/src/conn-tools/s6-tcpserver-access.c
index 0bb1764..40c706c 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)