Speedup of the listening function
Reduced the number of frames to consider before giving up
This commit is contained in:
parent
10ac6265cd
commit
5c873a958b
1 changed files with 1 additions and 1 deletions
2
arp.c
2
arp.c
|
@ -189,7 +189,7 @@ int listen_arp_frame(int sockfd, struct ether_arp *result)
|
||||||
|
|
||||||
int count = 0;
|
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 */
|
/* skip to the next frame if it's not an ARP REPLY */
|
||||||
if (ntohs (result->arp_op) != ARPOP_REPLY) {
|
if (ntohs (result->arp_op) != ARPOP_REPLY) {
|
||||||
++count;
|
++count;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue