IPv6 support (work in progress)#70
Conversation
|
cool! notifying @yomimono as she had been interested in this too :) |
|
It is ... alive! |
|
Yay!! On 6 Oct 2014, at 14:32, Nicolas Ojeda Bar notifications@github.com wrote:
|
|
cool. though it's now simply a Small Matter of Programming until the On 6 October 2014 20:01, Anil Madhavapeddy notifications@github.com wrote:
Richard Mortier |
|
releasing 2.0.0 now, so can merge this to the master branch as wip quite soon... |
|
Great! There is still some more work to do before this patch is ready for general consumption. At some point I will also submit a PR for an IPV6 signature for V2.mli. Also related is integrating this to the existing (IPv4) codebase (making a common base signature for IPV4 and IPV6 and making UDP & TCP functors of that). This will require changes both to mirage-tcpip and mirage-types. But I am focused on getting IPv6 working well before concentrating on this. |
Icmpv6 and Ipv6 will be implemented in the same module, and Ndv6 will be implemented in a different module, mirroring the existing Ipv4/Arpv4 arrangement.
This required shuffling code around quite a bit and in particular removing the module `Ndpv6' and `Routing' from the picture, leaving a single, monolithic module `Ipv6'. The reason is that IPv6, ICMPv6, and NDPv6 are actually all protocols lying on the same layer and there are a lot of cyclic dependencies between them. Later on it will be necessary to figure out a way to decouple the different modules but for now it is simpler to put everything in the same namespace.
|
I would suggest to merge this now (together with mirage/mirage#319). I reverted the changes to STACKV4 so that we can merge this with a minimum of disruption (in particular, no changes are needed for
In mirage/mirage#319 I added some basic support for configuring IPv6 for those who want to experiment with it, but reverted any change to STACKV4. I would feel better if we merged this first, and then turned the attention to how to integrate/replace the STACKV4 signature. I have been working on that, but any change is going to be fairly disruptive and more discussion is needed anyway, as opposed to the current change set which should be pretty uncontroversial. I also have a patch ready to update PS: it would also be great if I could rearrange the directory structure of |
|
fwiw, i'm never opposed to rearrangement to increase systematicness (if On 30 November 2014 at 00:18, Nicolas Ojeda Bar notifications@github.com
Richard Mortier |
Conflicts: CHANGES myocamlbuild.ml setup.ml
…merge Conflicts: _oasis _tags dhcp/dhcp_clientv4.ml lib/META lib/arpv4.ml lib/ethif.ml opam tcp/wire.ml
More complete docstrings will be added later.
|
Am seeing bad udp checksums (previously we didnt set them at all). Causes DHCP to drop. Investigating... |
|
Yes, we must set the UDP checksum because it is mandatory for IPv6. Strange, didn't see this in my testing. Will investigate on my side, it is probably an errant packet offset calculation. Will report back here. |
|
I think that should fix the bug - but cannot test right now. Could you test to see if bug is gone? |
|
I can confirm now that checksum calculation for UDP seems to be working. I tried a DHCP example and checksum was being calculated correctly. Either way, please let me know if it also works for you. |
|
I have lunch and the bug is fixed. This is great burp! :-) |
There was a problem hiding this comment.
This introduces a 4.02.0 dependency I think, due to a module alias? Needs to work on 4.01.0 as well.
There was a problem hiding this comment.
No, I do not think so. If I understand correctly the 4.02.0 module alias stuff only refines the typing of expressions such as module M = ....
There was a problem hiding this comment.
You are right, this does not compile in 4.01.0. Submitted a fix in #91.
There was a problem hiding this comment.
Thanks!
On 13 Dec 2014, at 14:16, Nicolas Ojeda Bar notifications@github.com wrote:
In lib/ndpv6.ml:
- https://tools.ietf.org/html/rfc2462
+
+- Neighbor Discovery for IP Version 6 (IPv6)- https://tools.ietf.org/html/rfc2461
+
+- Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification- http://tools.ietf.org/html/rfc2463
+
+- IPv6 Node Requirements- http://tools.ietf.org/html/rfc6434
+
+- Multicast Listener Discovery Version 2 (MLDv2) for IPv6- http://tools.ietf.org/html/rfc3810
+*)
+
+module Ipaddr = Ipaddr.V6
You are right, this does not compile in 4.01.0. Submitted a fix in Ipv6: Fix compilation on 4.01.0 #91.—
Reply to this email directly or view it on GitHub.
Started working on adding IPv6 support (see #43). Right now there is very little code, but I wanted to put it here so that there is a central place for discussion for those interested.
Right now the code only handles incoming
tcpandudppayloads when there are noipv6extensions present. I am looking into implementingicmp6echo handling next.