From 78dce2dbe33133170ab9be2da164b704f25dd2d9 Mon Sep 17 00:00:00 2001 From: Petr Vorel Date: Tue, 28 May 2024 10:58:59 +0200 Subject: [PATCH] arping: Fix exit code on more replies than sent Fixes: https://github.com/iputils/iputils/issues/538 Reported-by: shuangye Reviewed-by: Andrea Cervesato Signed-off-by: Petr Vorel --- arping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arping.c b/arping.c index c806999a..6831bb5b 100644 --- a/arping.c +++ b/arping.c @@ -852,7 +852,7 @@ static int event_loop(struct run_state *ctl) else if (ctl->timeout && !(ctl->count > 0)) rc |= !(ctl->received > 0); else - rc |= (ctl->sent != ctl->received); + rc |= (ctl->sent < ctl->received); return rc; }