summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Habets <thomas@habets.se>2012-03-12 22:02:00 +0000
committerThomas Habets <thomas@habets.se>2012-03-12 22:02:00 +0000
commitc4e02d75b5318de9c0370189e987278fac91891b (patch)
treedbd371b601348addb10d2575530c02615533be37
parent063c382e76577020015ddf54dd9062da18301c27 (diff)
downloadarping-c4e02d75b5318de9c0370189e987278fac91891b.tar.gz
Always process all waiting packets.
This corrects a timing issue on OpenBSD.
-rw-r--r--src/arping.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arping.c b/src/arping.c
index c7f0e53..4a9cca6 100644
--- a/src/arping.c
+++ b/src/arping.c
@@ -855,7 +855,7 @@ ping_recv(pcap_t *pcap, uint32_t packetwait, pcap_handler func)
if (trydispatch) {
int ret;
- if (1 != (ret = pcap_dispatch(pcap, 1,
+ if (1 != (ret = pcap_dispatch(pcap, 0,
func,
NULL))) {
/* rest, so we don't take 100% CPU... mostly
@@ -1331,7 +1331,7 @@ int main(int argc, char **argv)
"unanswered (%d extra)\n",
target,numsent,numrecvd,
(succ < 0.0) ? 0.0 : succ,
- (succ < 0.0) ? (numrecvd - numsent): 0);
+ (succ < 0.0) ? (numrecvd - numsent): 0);
}
if (finddup) {