diff options
| author | Hungming Chen <nuccachen@google.com> | 2022-03-07 14:13:49 +0800 |
|---|---|---|
| committer | Hungming Chen <nuccachen@google.com> | 2022-03-07 16:04:32 +0800 |
| commit | bcc0f5b14fbcf63c06cce1cd04cfa0e8282d2762 (patch) | |
| tree | 4725908240474a9ef0033ca0469425be9028df45 /Tethering/common/TetheringLib/src/android/net/TetheringManager.java | |
| parent | 478c0eb21c1be93e9baa762c1d69f0057a5941fe (diff) | |
BpfHandler: only allow to tag INET/INET6 socket
This is a follow up commit for the family validation {INET, INET6}.
The protocol validation {TCP, UDP} has been added in previous
commit.
The TrafficController socket destroy listener only monitors
on the group {INET_TCP, INET_UDP, INET6_TCP, INET6_UDP}.
Tagging listener unsupported socket causes that the tag can't
be removed from tag map automatically. Eventually, the tag map
run out of space because of dead tag entries.
See TrafficController::makeSkDestroyListener in
packages/modules/Connectivity/service/native/TrafficController.cpp
Also address the comments from previous commit.
- Remove the useless else-statment in tagSocket protocol validation.
- Make the socket cookie query and test into one line in
BpfHandlerTest#TestTagSocketWithUnsupportedProtocol
Bug: 223094609
Test: atest BpfHandlerTest
Change-Id: I0f571fc00caa01c86399f0dbb593e8a40ad94bbd
Diffstat (limited to 'Tethering/common/TetheringLib/src/android/net/TetheringManager.java')
0 files changed, 0 insertions, 0 deletions
