-
Notifications
You must be signed in to change notification settings - Fork 57
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
multi_ping retry not working correctly #23
Comments
Now the multi_ping retry functionality works correctly. The issue was that an ICMP retry packet was sent with a new ID, but the receive function was still checking packets using old IDs. Now the remainings_id is reinitialized with the new ids during each sends. This way the receive function always used the latest ids for packet matching. The source address of the packet has also been added to the packet matching to make the request/reply match more robust.
Now the number of retry are added to the result dictionary.
2. Try to fix for issue romana#23. Detail: Change self._remaining_ids to list. Clear the self._remaining_ids list when retry accoured. Append new unique ID to self._remaining_ids every times run.
Fwiw, I just hit this bug and fixed it before finding this thread. I eliminated _remaining_ids and replaced it with _remaining_addrs, which resulted in notably simpler code overall (net reduction in lines of code, and I think the logic is more clear this way). It fixes the bug mentioned above, in a way that continues to listen for replies to any of the pings sent by a host and registers the first one received. The changes are very simple and clear, so easy to visually vet. I can provide the changes if anyone is interested, but if you need to me submit them formally you'll have to hold my hand through the process. |
When a request times out, a retry is correctly sent with a new ID but the receive function always looks for the old ID. This result by sending as many retry as specified in the multi_ping function and returning a failed ping as soon as at least one packet loss occurred, even if the first retry was successful.
The text was updated successfully, but these errors were encountered: