forked from moby/vpnkit
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Close partially-established TCP connections
If a client sends SYN, we connect the external socket and reply with SYN ACK. If the client responds with RST ACK then previously we would leak the connection. This patch extends the existing mechanism which closes connections when switch ports are timed-out, adding a connection close when such an "early reset" is encountered. Once the connection has been established we assume we can use the existing closing mechanism: a client sending a RST should cause the TCP/IP stack to close our flow. Related to [docker/for-mac#1132] Signed-off-by: David Scott <dave.scott@docker.com>
- Loading branch information
Showing
5 changed files
with
71 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -426,7 +426,7 @@ struct | |
in | ||
Lwt.pick [ | ||
loop (); | ||
close | ||
Lwt.map (fun _ -> ()) close | ||
] | ||
in | ||
Some f | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters