Skip to content
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

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

Merged
merged 18 commits into from
Nov 30, 2020

Conversation

hannesm
Copy link
Member

@hannesm hannesm commented Sep 11, 2020

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

@hannesm
Copy link
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 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
Copy link
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
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
Copy link
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.

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 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