IPv6 stack support#431
Conversation
|
thanks @MagnusS
I fixed the code in 6d68284, which includes some more safety (i.e. avoiding Cstruct exceptions in get_yyy). |
|
Thanks for the fixes @hannesm ! Now that ipv6 generally seems to work I also enabled the iperf test to test TCP connections over IPv6. I've tested with ~100mb transfers over vnetif and it seems to work well, also with packet loss (at least as long as both ends are mirage unikernels...). The iperf test now also reports the results every second with On my machine it looks like the ipv4 test is a little bit faster with an avg rate of ~657 Mbit/s, while IPv6 is ~627 Mbit/s. This is measured over 10 x |
|
I'm fine with these changes, but would wait until ocaml/opam-repository#17090 hits opam-repository, and then remove the mirage-stack pin (and instead put a lower bound on |
use buffer only up to advertised length check version to be 6 --> enable the trailing bytes connect test for IPv6
This updates the iperf test to report speed in mbit/s once every second and when the test ends. The output can be seen when alcotest is executed in verbose mode. Also increases the length of the slow tests to around ~100MB per transfer. These are not run in CI by default.
This duplicates the iperf test for ipv6. As the V4 stack signatures contain a reference to the IP version (e.g. listen_tcpv4 etc) it was difficult to reuse the test without major changes. We should clean this up when we unify the signatures to avoid duplicated tests for IPv4/IPv6.
|
mirage-stack 2.1.0 is merged -- I rebased and updated |
CHANGES: * Assorted IPv6 improvements (mirage/mirage-tcpip#428 mirage/mirage-tcpip#431 mirage/mirage-tcpip#432 @MagnusS @hannesm) - set length in packets to be sent - preserve updated ctx from Ndv6.handle - fix ICMP checksum computation - implement Mirage_stack.V6 signature - add connect, mtu, iperf tests - fix DAD protocol implementation (and test it) - avoid out of bounds accesses of IPv6 packets (check length before accessing) * Fix 32 bit issues (@MagnusS) * Implement stack-direct and tcp disconnect: tear down existing connections (mirage/mirage-tcpip#429 @hannesm) * Treat broadcast address of network as broadcast as well (mirage/mirage-tcpip#430 @hannesm, reported in mirage/mirage-tcpip#427)
This adds support for configuring a V6 stack in tcpip_stack_direct and adds a TCPv6 connect test that succeeds.
It depends on unmerged changes in mirage-stack so shouldn't be merged yet (mirage-stack is pinned to my branch).I had to disable the test that adds trailing bytes to the ethernet frames, as this results in a lot of packets being dropped due to checksum errors in our stack (checksum in pcap is fine). This seems to indicate that the implementation calculates the checksum of the full buffer - not just the IP packet length, but I haven't investigated this further.(fixed)The stack will also queue packets without a source IP before the IPv6 address has been negotiated. These packets will be sent when the IP is available and confuse the other end. I've added a temporary fix to wait for the IPv6 address to be configured before the test starts.