[PATCH 2/9] batctl: tcpdump: return EXIT_SUCCESS on normal termination

Sven Eckelmann <[email protected]> Sun, 05 Jul 2026 19:30:05 +0200
Newsgroups org.open-mesh.lists.batman
Message-ID <[email protected]>
The main capture loop of tcpdump ends when SIGINT/SIGTERM sets
is_aborted. In this case, the return value should reflect this clean
shutdown.

Signed-off-by: Sven Eckelmann <[email protected]>
---
 tcpdump.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tcpdump.c b/tcpdump.c
index a48f8ad..33b7226 100644
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -1618,6 +1618,8 @@ static int tcpdump(struct state *state __maybe_unused, int argc, char **argv)
 		}
 	}
 
+	ret = EXIT_SUCCESS;
+
 out:
 	list_for_each_entry_safe(dump_if, dump_if_tmp, &dump_if_list, list) {
 		if (dump_if->raw_sock >= 0)

-- 
2.47.3