-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate UDP & TCP session keys to fix VPN bug
Previously, sessions were tracked in one big session table, keyed by source/destionation ip/port pairs. This sounds great, until you release that actually UDP & TCP ports are independent, and so it's totally possible to create a new TCP connection on the same ports that are being used for an existing UDP connection. Uh oh. In practice, this meant that SYN packets for TCP connections on existing UDP ports would attempt to re-ack, rejecting the SYN as a duplicate for an existing TCP connection. This would then fail, because the session didn't actually have existing TCP data required to do this. Oops. We now track them separately, which should avoid that situation entirely.
- Loading branch information
Showing
4 changed files
with
48 additions
and
26 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
6 changes: 6 additions & 0 deletions
6
app/src/main/java/tech/httptoolkit/android/vpn/SessionProtocol.java
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package tech.httptoolkit.android.vpn; | ||
|
||
public enum SessionProtocol { | ||
TCP, | ||
UDP | ||
} |