fix: condition loop
This commit is contained in:
@ -223,9 +223,9 @@ int main(int ac, char **av)
|
|||||||
}
|
}
|
||||||
gettimeofday(&stop, NULL);
|
gettimeofday(&stop, NULL);
|
||||||
}
|
}
|
||||||
while (!(ret == 1 && buffer[0] == '\0') || (len == packet_size && packet_check(buffer, packet_size) == 0 && packet_compare(packet, buffer, packet_size) == 0));
|
while ((ret > 1) && (len != packet_size && packet_check(buffer, packet_size) && packet_compare(packet, buffer, packet_size)));
|
||||||
|
|
||||||
if (*buffer != 0)
|
if (ret > 1)
|
||||||
{
|
{
|
||||||
stats.packets_received++;
|
stats.packets_received++;
|
||||||
print_recv(&settings, (struct icmphdr *)buffer, &start, &stop);
|
print_recv(&settings, (struct icmphdr *)buffer, &start, &stop);
|
||||||
|
|||||||
Reference in New Issue
Block a user