From e19d47f5a1ecef97ddd6e40d83b354c459b8cce6 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Mon, 2 Dec 2024 08:43:06 +0100 Subject: [PATCH] DEV: sock: Add a debug counter to track strange flag on fd during connect() This counter was removed when the commit 56cd20cb53 ("BUG/MEDIUM: sock: Remove FD_POLL_HUP during connect() if FD_POLL_ERR is not set") was backported because the debug counters were not backported yet to the 3.0. Now de debug counters are available in 3.0, this counter can also be added. This commit is 3.0-specific. There is no upstream ID. --- src/sock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sock.c b/src/sock.c index ce0cb2f..7078fc0 100644 --- a/src/sock.c +++ b/src/sock.c @@ -904,6 +904,7 @@ int sock_conn_check(struct connection *conn) * - https://www.spinics.net/lists/netdev/msg876470.html */ if (unlikely((fdtab[fd].state & (FD_POLL_HUP|FD_POLL_ERR)) == FD_POLL_HUP)) { + COUNT_IF(1, "Removing FD_POLL_HUP if no FD_POLL_ERR to let connect() decide"); fdtab[fd].state &= ~FD_POLL_HUP; } -- 1.7.10.4