JNA ping code returns timeouts for all link-local IPv6 addresses
Description
The RequestTracker-based JnaPinger class relies on the fact that it can match up ping responses with the original request in the RequestTracker queue. The matching is done based on a tuple that contains IP address.
However, the IP address that the JNA code constructs in the response packet does not contain the IPv6 scope identifier when it is pinging link-local addresses. This means that the key comparison in the RequestTracker queue fails and all link-local pings appear to time out.
To test, use the JNA ping code to send some packets to a link-local (fe80:*) address and observe the packets using tcpdump. You should see proper echo and echo-reply packets but the JNA code will report timeouts for all packets.
Acceptance / Success Criteria
None
Lucidchart Diagrams
Activity
Sandy Skipper June 3, 2020 at 2:45 PM
Dustin says it is fixed.
Matt Brozowski August 30, 2011 at 8:51 PM
I think we have added code to prevent adding link-local ipv6 addresses during discovery the same way we don't add 127.0.0.x address.
Is this really critical?
Jeffrey Ollie May 12, 2011 at 2:46 PM
Is it even useful to ping link-local IPv6 addresses?
The RequestTracker-based JnaPinger class relies on the fact that it can match up ping responses with the original request in the RequestTracker queue. The matching is done based on a tuple that contains IP address.
However, the IP address that the JNA code constructs in the response packet does not contain the IPv6 scope identifier when it is pinging link-local addresses. This means that the key comparison in the RequestTracker queue fails and all link-local pings appear to time out.
To test, use the JNA ping code to send some packets to a link-local (fe80:*) address and observe the packets using tcpdump. You should see proper echo and echo-reply packets but the JNA code will report timeouts for all packets.