Skip to content

Commit

Permalink
arping: Fix 1s delay on exit for unsolicited arpings
Browse files Browse the repository at this point in the history
Commit 67e070d introduced 1s poll() delay for unsolicited arpings,
when using -U or -A, e.g.:

    # arping -A -c1 -I eth0 [IP address of eth0 interface]
    # arping -U -c1 -I eth0 [IP address of eth0 interface]

Restore correct condition.

Fixes: 67e070d ("arping: use signalfd() and timerfd() rather than signals")
Fixes: iputils#536
Closes: iputils#541
Reported-by: <Curtis Taylor cjebpub@gmail.com>
Suggested-by: <Curtis Taylor cjebpub@gmail.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
  • Loading branch information
pevik committed May 23, 2024
1 parent 24f123c commit 4db1de6
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 @@ -776,7 +776,7 @@ static int event_loop(struct run_state *ctl)
pfds[POLLFD_SOCKET].events = POLLIN | POLLERR | POLLHUP;
send_pack(ctl);

while (!exit_loop) {
while (!(exit_loop || ctl->unsolicited)) {
int ret;
size_t i;

Expand Down

0 comments on commit 4db1de6

Please sign in to comment.