Skip to content

Commit

Permalink
arping: Fix exit code on more replies than sent
Browse files Browse the repository at this point in the history
Fixes: iputils#538
Reported-by: shuangye
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
  • Loading branch information
pevik committed May 29, 2024
1 parent 4db1de6 commit 78dce2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arping.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

1 comment on commit 78dce2d

@shuangye
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the scenario described in the issue. With this commit, still only the last arping instance can succeed.

Please sign in to comment.