Skip to content

Commit

Permalink
arping: fix sent vs received packages return value
Browse files Browse the repository at this point in the history
My earlier signalfd() and timerfd() work really messed up sent vs received
package counter comparison, and related command return value.  Basically
everything always mismatched, and that was expected with corner case of one
package only that did match and caused none-zero return.  Oh my, that is
pretty much as wrong the code could have been.

Reported-by: MarcusRoeckrath
Addresses: iputils#190
Broken-since: 67e070d
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
  • Loading branch information
kerolasa committed Jul 5, 2019
1 parent 368c345 commit 84ca65c
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 @@ -792,7 +792,7 @@ static int event_loop(struct run_state *ctl)
close(tfd);
freeifaddrs(ctl->ifa0);
rc |= finish(ctl);
rc |= !(ctl->brd_sent != ctl->received);
rc |= (ctl->sent != ctl->received);
return rc;
}

Expand Down

0 comments on commit 84ca65c

Please sign in to comment.