You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
having two separate timeouts for IPv4 and IPv6 is not a good idea. In the worst case, the IPv4 socket will block until the timeout is due and only then the _sock6.recv() is called. This leads to incorrect RTT values for IPv6 packets.
The worst case can be easily observed if only IPv6 nodes are pinged. As no IPv4 responses arrive, the sock.recv() blocks until the timeout is due. Here is an example:
Observing the scenario in tcpdump reveals that this is not true and the response was already there in a couple of microseconds.
As I am only expecting IPv6 hosts in my current usecase, I wrote this small patch that disables the IPv4 loop, when only IPv6 destinations are pinged. However this is not a suitable approach for upstream. I suggest using poll() here.
Kind regards,
lemoer
The text was updated successfully, but these errors were encountered:
lemoer
added a commit
to lemoer/keepitup
that referenced
this issue
Nov 10, 2020
Hi there,
having two separate timeouts for IPv4 and IPv6 is not a good idea. In the worst case, the IPv4 socket will block until the timeout is due and only then the
_sock6.recv()
is called. This leads to incorrect RTT values for IPv6 packets.The worst case can be easily observed if only IPv6 nodes are pinged. As no IPv4 responses arrive, the
sock.recv()
blocks until the timeout is due. Here is an example:As you can see, multiping said, that the response was after ~33 seconds.
Observing the scenario in tcpdump reveals that this is not true and the response was already there in a couple of microseconds.
As I am only expecting IPv6 hosts in my current usecase, I wrote this small patch that disables the IPv4 loop, when only IPv6 destinations are pinged. However this is not a suitable approach for upstream. I suggest using
poll()
here.Kind regards,
lemoer
The text was updated successfully, but these errors were encountered: