]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
mnl: restore nft monitor to working state
authorFlorian Westphal <fw@strlen.de>
Wed, 25 Feb 2026 11:05:40 +0000 (12:05 +0100)
committerFlorian Westphal <fw@strlen.de>
Wed, 25 Feb 2026 11:07:35 +0000 (12:07 +0100)
monitor tests are currently broken:
./run-tests.sh: line 60:  6490 Aborted                    $nft -nn monitor $monitor_args > $monitor_output
*** bit out of range 0 - FD_SETSIZE on fd_set ***: terminated

Fixes: 868040f89223 ("configure: Implement --enable-profiling option")
Signed-off-by: Florian Westphal <fw@strlen.de>
src/mnl.c

index 3f3ef82a25cb5bb3debee514037d70f6ae38f02a..eb6cb12c6ae210560e3173c4adcb931e059f2058 100644 (file)
--- a/src/mnl.c
+++ b/src/mnl.c
@@ -2410,7 +2410,7 @@ int mnl_nft_event_listener(struct mnl_socket *nf_sock, unsigned int debug_mask,
                if (ret < 0)
                        return -1;
 
-               if (FD_ISSET(sigfd, &readfds))
+               if (sigfd >= 0 && FD_ISSET(sigfd, &readfds))
                        check_signalfd(sigfd);
 
                if (FD_ISSET(fd, &readfds)) {