-
Notifications
You must be signed in to change notification settings - Fork 23
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
Handle RFC 4007: IPv6 zone indices for link-local scoped addresses #76
Comments
cfcs
pushed a commit
to robur-coop/ocaml-pf
that referenced
this issue
Oct 2, 2018
avsm
added a commit
to avsm/opam-repository
that referenced
this issue
Dec 13, 2018
CHANGES: * Add `pp` functions for prettyprinting and deprecate `pp_hum` variants. The two functions are currently the same, so porting is just a matter of replacing existing uses of `pp_hum` with `pp` (mirage/ocaml-ipaddr#71 @verbosemode) * Fix deprecation warnings on newer OCaml standard libraries (mirage/ocaml-ipaddr#74 @cfcs). * Fix `base-unix` depopt to be a real dependency (mirage/ocaml-ipaddr#68 @rgrinberg). * Fix missing `sexplib` dependency (mirage/ocaml-ipaddr#66 mirage/ocaml-ipaddr#67 @bmillwood). * Port to Dune from jbuilder and update opam metadata to 2.0 format (mirage/ocaml-ipaddr#76 @avsm). * Remove unused variable and bindings warnings in the implementation and signatures (mirage/ocaml-ipaddr#76 @avsm) * Fix toplevel handling of the `ipaddr.top` package by linking to compiler-libs instead of compiler-libs.toplevel (mirage/ocaml-ipaddr#76 @avsm based on fix in mirage/ocaml-uri#130 by @yallop) * Update Travis to test latest distros by using their aliases (mirage/ocaml-ipaddr#76 @avsm) * Upgrade opam metadata to the 2.0 format (mirage/ocaml-ipaddr#76 @avsm)
(this was not fixed in |
It looks like the Unix module doesn't support this either: ocaml/ocaml#6479 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Source: https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses
I had a use for this in SSH forwarding, and wondered if the OCaml SSH stack would be able to support this at some point, so I tried:
Relevant RFC: RFC 4007 section 6
So we should support things like
fe80::1%0
.RFC 4007 continues:
In Linux and BSD it seems like the IP stacks (or socket libraries or whatever) accept strings to specify the network interface, like
%wifi0
, or at least provides a way to resolve the numeric ID from the string automatically. This seems more useful than the numerical ID to me, but that is not compatible with Windows (where you would have to look up the interface).FreeBSD also accepts stuff like
fe80::123:4567:8910:1112%lagg0.1181
(forif lagg0
vlan1181
).(Thanks a lot to @tykling for helping explain the use of
%
and for providing FreeBSD examples)I'm not sure what the best way to expose these zone ID hints would be, but for starters I think it would be nice to simply strip trailing
%..*
and parse the vanilla IPv6 address.Reading wikipedia, addresses this range should support zone indices:
Some test cases:
The text was updated successfully, but these errors were encountered: