Skip to content
Commit ac2e8f35 authored by Chiachang Wang's avatar Chiachang Wang
Browse files

Remove the UID range check for TCP sockets

The original patch (aosp/2891011) incorrectly counted TCP
sockets with keepalive enabled for VPNs. This issue was
caused by the UID range verification. On bypassable VPNs,
the socket mark is always correct. It's possible for an
app that is not in the UID ranges to establish a socket
on the VPN. But that socket should be counted for the
purposes of keepalive. The old code would correctly count
it and the new code will incorrectly not count it. Also,
the UID range verification does not help on non-bypassable
VPNs since the socket mark is always the mark of default
network, not the socket mark of the VPN.

Instead of reverting the entire patch, this commit
removes the UID range mechanism. The code refactoring from
the original commit (which used structured classes to read
socket information) has been kept as it is a valuable
improvement.

Bug: 320842519
Test: atest FrameworksNetTests
Change-Id: I00731796144c982b9fd4d9771f3d0db1f1529a89
parent 9a6f8ccf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment