-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Open
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.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.
Description
Consider the following link local IPv6 sockaddr string:
[fe80::f03c:91ff:fedf:75ee%eth0]:8080
This address does not parse or round-trip: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=b36d93fe7d2a8699397c6dfafa2a3edf
The output formatting also elides the scopeid, which means that printed addresses are not valid addresses - particularly on multi-homed devices, where the un-scoped address will not function.
I believe that the correct change here is to both parse scopeid's and to include non-zero scopeids in Display. I'm happy to implement this if that is agreeable? It would need to take a dependency on if_nametoindex and if_indextoname (POSIX, net/if.h) in order to function on most Unix style platforms.
NotAFile, Mathieu-Lala, ltabis, picnoir, e-dant and 3 more
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.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.