Skip to content

move Tcpip_stack_socket to Tcpip_stack_socket.V4, provide Tcpip_stack_socket.V6; also dual direct stack and fixes#433

Merged
hannesm merged 18 commits into
mirage:masterfrom
hannesm:tcpip-stack-socket-v6
Nov 30, 2020
Merged

move Tcpip_stack_socket to Tcpip_stack_socket.V4, provide Tcpip_stack_socket.V6; also dual direct stack and fixes#433
hannesm merged 18 commits into
mirage:masterfrom
hannesm:tcpip-stack-socket-v6

Conversation

@hannesm
Copy link
Copy Markdown
Member

@hannesm hannesm commented Sep 11, 2020

..continuing the #431 ride.. //cc @MagnusS

@hannesm hannesm force-pushed the tcpip-stack-socket-v6 branch from ac95b40 to 663f5f8 Compare September 11, 2020 15:06
@hannesm
Copy link
Copy Markdown
Member Author

hannesm commented Sep 11, 2020

travis is failing since this is an API-breaking change which needs updates to the mirage tool (there are some needed for #432 as well). i'd suggest to merge #432 and #433 (and an upcoming #434), cut a release (6.0.0 -- to avoid earlier mirage releases using the new, API-incompatible tcpip), and cut a mirage release (3.8.1).

@hannesm hannesm force-pushed the tcpip-stack-socket-v6 branch from 663f5f8 to dea044b Compare September 12, 2020 09:59
@hannesm hannesm changed the title move Tcpip_stack_socket to Tcpip_stack_socket.V4, provide Tcpip_stack_socket.V6 move Tcpip_stack_socket to Tcpip_stack_socket.V4, provide Tcpip_stack_socket.V6; also dual direct stack and fixes Sep 13, 2020
@hannesm hannesm force-pushed the tcpip-stack-socket-v6 branch from c978861 to a00400e Compare September 13, 2020 18:12
@hannesm
Copy link
Copy Markdown
Member Author

hannesm commented Sep 13, 2020

this now requires mirage/mirage-protocols#27 and mirage/mirage-stack#19, and fix some bugs:

  • UDP write now has a ?src argument (crucial for IPv6 where we deal with at least two IP addresses)
  • TCP write uses its src for checksum computation and passing it onto the IP layer (otherwise, the other peer may receive a reply from an unexpected IP address)
  • Direct dual IPv4 and IPv6 stack implementation

@hannesm
Copy link
Copy Markdown
Member Author

hannesm commented Sep 22, 2020

moving forward, I first cut a 5.0.1 release (based on master, but reverting the API-breaking change of Ipv6.connect -- which mirage knows about). now we can figure the IPv6 out subsequently, break APIs and move to a 6.0.0 release. I pushed the 5.0.1 changes entry to master directly.

@hannesm hannesm force-pushed the tcpip-stack-socket-v6 branch from 9ae1f0c to 890d978 Compare September 30, 2020 10:09
@hannesm
Copy link
Copy Markdown
Member Author

hannesm commented Sep 30, 2020

now with setsockopt IPV6_ONLY true/false there's (a) the IPv6 socket stack doing only ipv6, and a dual socket stack. I'll revise together with the mirage PR (mirage/mirage#1187) for some more convenient usage.

Comment thread src/stack-direct/tcpip_stack_direct.ml Outdated
@hannesm hannesm force-pushed the tcpip-stack-socket-v6 branch from 7e45588 to a04b6f7 Compare November 30, 2020 10:04
dual stack: accept ipv4_only and ipv6_only arguments
fix tests with revised API
Also, adapt the IP.mtu implementation to its interface: now ~dst:ipaddr
is required. This allows the dual stack to provide appropriate numbers.
@hannesm hannesm force-pushed the tcpip-stack-socket-v6 branch from a04b6f7 to 8b84db2 Compare November 30, 2020 12:39
@hannesm hannesm merged commit 55708c5 into mirage:master Nov 30, 2020
@hannesm hannesm deleted the tcpip-stack-socket-v6 branch November 30, 2020 12:49
hannesm added a commit to hannesm/opam-repository that referenced this pull request Nov 30, 2020
CHANGES:

* Dual IPv4 and IPv6 socket and direct stack support, now requires
  mirage-stack 2.2.0 and mirage-protocols 5.0.0 (mirage/mirage-tcpip#433 @hannesm)
* The above change also unified arguments passed to connect functions which
  are API-breaking changes
* IPv6 waits for timeout after sending neighbour advertisement (for duplicate
  address detection)
* Remove Xen cross-compilation runes, with mirage-xen 6.0.0 they're provided
  by mirage-xen (mirage/mirage-tcpip#434 @hannesm)
* Move to dune 2.7.0 (and bisect instrumentation if desired) (mirage/mirage-tcpip#436 @hannesm)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant