From dec8bc946df23a6f4d996bc1d478a1f4cbdc164b Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Tue, 25 Jun 2024 21:00:04 +0000 Subject: executor: check whether the address is stdin before validation a port Otherwise, it fails with "SYZFAIL: failed to parse manager port". --- executor/conn.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'executor') diff --git a/executor/conn.h b/executor/conn.h index 19026748d..9371ddaee 100644 --- a/executor/conn.h +++ b/executor/conn.h @@ -93,10 +93,10 @@ private: static int Connect(const char* addr, const char* ports) { int port = atoi(ports); - if (port == 0) - failmsg("failed to parse manager port", "port=%s", ports); if (!strcmp(addr, "stdin")) return STDIN_FILENO; + if (port == 0) + failmsg("failed to parse manager port", "port=%s", ports); sockaddr_in saddr4 = {}; saddr4.sin_family = AF_INET; saddr4.sin_port = htons(port); -- cgit mrf-deployment