Skip to content

stack-direct & tcp: implement disconnect#429

Merged
hannesm merged 1 commit into
mirage:masterfrom
hannesm:tcp-disconnect
Aug 26, 2020
Merged

stack-direct & tcp: implement disconnect#429
hannesm merged 1 commit into
mirage:masterfrom
hannesm:tcp-disconnect

Conversation

@hannesm
Copy link
Copy Markdown
Member

@hannesm hannesm commented Aug 25, 2020

  • TCP close()s all active channels and avoids establishing new connections
  • Stack-direct cancels the listener task

An example use side will look like:

Tcp.disconnect tcp >>= fun () ->
Stack_direct.disconnect stack >>= fun () ->
(* now ready for re-setup of a stack, i.e. IP configuration changed *)

- TCP close()s all active channels and avoids establishing new connections
- Stack-direct cancels the listener task

An example use side will look like:
Tcp.disconnect tcp >>= fun () ->
Stack_direct.disconnect stack >>= fun () ->
(* now ready for re-setup of a stack, i.e. IP configuration changed *)

Sponsored by Nitrokey GmbH
@hannesm
Copy link
Copy Markdown
Member Author

hannesm commented Aug 26, 2020

I removed the sleep. The behaviour of Linux and FreeBSD is:

  • send out a FIN+ACK for existing TCP connections
  • when the other side replies, send a RST

That's what this PR does as well now.

@hannesm
Copy link
Copy Markdown
Member Author

hannesm commented Aug 26, 2020

all green and approved -- merging

@hannesm hannesm merged commit 8dbb9c5 into mirage:master Aug 26, 2020
hannesm added a commit to hannesm/opam-repository that referenced this pull request Sep 22, 2020
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)
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.

2 participants