From 5c873a958b45f4f4e135d672b6570594386a1cab Mon Sep 17 00:00:00 2001 From: Dimitri Lozeve Date: Fri, 27 May 2016 15:14:23 +0200 Subject: [PATCH] Speedup of the listening function Reduced the number of frames to consider before giving up --- arp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arp.c b/arp.c index 217d5d2..5c2278a 100644 --- a/arp.c +++ b/arp.c @@ -189,7 +189,7 @@ int listen_arp_frame(int sockfd, struct ether_arp *result) int count = 0; - while (recv(sockfd, buffer, sizeof(buffer), 0) && count < 100) { + while (recv(sockfd, buffer, sizeof(buffer), 0) && count < 10) { /* skip to the next frame if it's not an ARP REPLY */ if (ntohs (result->arp_op) != ARPOP_REPLY) { ++count;