-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
UdpSocket::set_ttl does not set IPv6 hoplimit field #47727
Copy link
Copy link
Open
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
It is not possible to set a hoplimit in an IPv6 packet sent over UDP.
UdpSocket::set_ttldoes not modify the hoplimit in the IPv6 packet and there seems to be no other way to do so.I tried this code:
I expected to see this happen:
Since
UdpSockethas no other function that would set the hoplimit in an IPv6 packet, I believeset_ttlshould be doing this. I expected to capture a UDP packet with an IPv6 hoplimit field of 10.Instead, this happened:
The output of the program is as expected:
I used
tcpdump -v -i lo udp port 50000to capture the packet:The hoplimit field of the packet is still set to the default value of 64.
Meta
rustc --version --verbose: