-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling lots of ICMP echo replies improvement #14
Comments
Sounds very interesting, i'll test this on some /8 networks today |
No, it looks like this change make possible situation when "ping is done" but many information left in channel... So we need also check if something left and process after "done" |
We should have refactor, redesign I will try it but please give me a little more time. |
+1 would love to see this fixed. I experience the same behavior when pinging 2 hosts. |
+1 I experience the same behavior when pinging 254 hosts. |
Same here, not receiving all replies, playing with 1k hosts |
Hello! I was playing with go-fastping yesterday and came across a situation that not all ICMP replies reached my application code.
I sent ICMP requests to several thousands of IP addresses. But I got only about 300 successful replies.
tcpdump
showed that all ICMP ECHO REPLY packets were delivered to my machine (tcpdump -e icmp[icmptype] == 0 -B 40096 -n
).After some investigation I think I found a possible problem, this is a code in
recvICMP
:recv
is a channel with buffer size 1 and it seems that application spends a lot of time sending into it. Making it buffered:helped to get all ICMP replies.
So I think that read buffer in underlying ip connection is not big enough to handle lots of incoming data. And when application is busy and can't read packets - some of them just dropped.
What are your thoughts about this?
The text was updated successfully, but these errors were encountered: