From 9f697d6c1de2979cc5e0f3689d10086ceac8a672 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 12 Dec 2023 17:01:07 +0000 Subject: Fix clock programs that recv46; fix s6-tcpserver-access exitcodes Signed-off-by: Laurent Bercot --- src/clock/s6-taiclockd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/clock/s6-taiclockd.c') diff --git a/src/clock/s6-taiclockd.c b/src/clock/s6-taiclockd.c index 9a000cc..9dabc5f 100644 --- a/src/clock/s6-taiclockd.c +++ b/src/clock/s6-taiclockd.c @@ -19,6 +19,7 @@ int main (int argc, char const *const *argv) ip46 ip = IP46_ZERO ; uint16_t port = 4014 ; subgetopt l = SUBGETOPT_ZERO ; + int is6 ; PROG = "s6-taiclockd" ; for (;;) { @@ -38,10 +39,11 @@ int main (int argc, char const *const *argv) if (socket_bind46_reuse(s, &ip, port) < 0) strerr_diefu1sys(111, "socket_bind_reuse") ; + is6 = ip46_is6(&ip) ; for (;;) { char packet[256] ; - ssize_t r = socket_recv46(s, packet, 256, &ip, &port) ; + ssize_t r = socket_recv46(s, packet, 256, &ip, &port, is6) ; if ((r >= 20) && !memcmp(packet, "ctai", 4)) { tain now ; -- cgit v1.3.1