rust-libp2p
rust-libp2p copied to clipboard
feat(quic): Add support for ip6zone in quic transport
Description
Add support for ip6zone in the quic transport
The quic transport now correctly sets the scope_id of socket addresses converted from multiaddrs containing both the ip6 and ip6zone protocols. On Unix systems, if the zone string is not an integer, it is converted into an interface index using the if_nametoindex function. Otherwise, it is parsed directly as an interface index. This interface index will then be used as the scope_id for the socket address. When converting a socket address back to a multiaddr, the scope_id will be included in the ip6zone protocol, if it is not 0.
Related https://github.com/libp2p/rust-libp2p/issues/5608
Notes & open questions
Change checklist
- [x] I have performed a self-review of my own code
- [ ] I have made corresponding changes to the documentation
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] A changelog entry has been made in the appropriate crates