From 80cb5cf5a9b1b16a30c8ae4c47a87c8bfc91f20c Mon Sep 17 00:00:00 2001 From: Jon Maloy Date: Thu, 9 Jul 2026 17:56:51 -0400 Subject: passt: Initialise listening socket fds to -1 fd_tap_listen, fd_control_listen, and fd_repair_listen are file descriptors and should be initialised to -1 rather than the implicit 0, consistent with the other fd fields in passt_ctx. Signed-off-by: Jon Maloy Reviewed-by: David Gibson Signed-off-by: Stefano Brivio --- passt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/passt.c b/passt.c index 65a07d7..4e5b928 100644 --- a/passt.c +++ b/passt.c @@ -65,6 +65,9 @@ char pkt_buf[PKT_BUF_BYTES] __attribute__ ((aligned(PAGE_SIZE))); struct ctx passt_ctx = { .pidfile_fd = -1, .fd_tap = -1, + .fd_tap_listen = -1, + .fd_control_listen = -1, + .fd_repair_listen = -1, .pasta_netns_fd = -1, .device_state_fd = -1, }; -- cgit v1.2.3