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
x/net/icmp: wrong size for if-index in InterfaceIdent object #28530
Comments
RFC7223 Sec 3 [1] defines 32 bits for if-index. RFC8335 Sec 2.1 [2] defines "If the Interface Identification Object identifies the probed interface by index, the length is equal to 8 and the payload contains the if-index [RFC7223]." The length includes 4 bytes header. => 4 bytes if-index Issue has been reported with golang/go#28530. [1]: https://tools.ietf.org/html/rfc7223 [2]: https://tools.ietf.org/html/rfc8335
IIRC, the conclusion is as described in RFC 8335:
The protocol provides enough space for containing any representation of interface-index, practically from 32-bit to 64-bit integer for both classical and modern network control and management stuff. |
Oh, sorry, you are correct. I've been misunderstood the format w/ mixing another discussion. Thanks for sending the fix. |
RFC 7223, Section 3 defines 32 bits for if-index. RFC 8335, Section 2.1 defines "If the Interface Identification Object identifies the probed interface by index, the length is equal to 8 and the payload contains the if-index [RFC7223]." The object should be comprised of a 4-byte object header and a 4-byte interface index. Fixes golang/go#28530
Change https://golang.org/cl/146637 mentions this issue: |
What version of Go are you using (
go version
)?go1.11.1
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?darwin/amd64
What did you do?
Build a ICMP ExtendedEchoRequest message with typeInterfaceByIndex.
What did you expect to see?
if-index field being 4 bytes long (as defined in RFC7223 Sec 3 and RFC8335 Sec 2.1)
What did you see instead?
if-index field with 8 bytes
Will open a PR to fix this issue.
The text was updated successfully, but these errors were encountered: