android_packages_modules_Co.../netd
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hungming Chen bcc0f5b14f 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
2022-03-07 16:04:32 +08:00
..
include [NETD-BPF#19] Mainline part of bpf code from netd 2022-01-30 09:51:25 +08:00
Android.bp [LSC] Add LOCAL_LICENSE_KINDS to packages/modules/Connectivity 2022-02-10 10:57:23 -08:00
BpfHandler.cpp BpfHandler: only allow to tag INET/INET6 socket 2022-03-07 16:04:32 +08:00
BpfHandler.h [NETD-BPF#19] Mainline part of bpf code from netd 2022-01-30 09:51:25 +08:00
BpfHandlerTest.cpp BpfHandler: only allow to tag INET/INET6 socket 2022-03-07 16:04:32 +08:00
libnetd_updatable.map.txt [NETD-BPF#19] Mainline part of bpf code from netd 2022-01-30 09:51:25 +08:00
NetdUpdatable.cpp [NETD-BPF#19] Mainline part of bpf code from netd 2022-01-30 09:51:25 +08:00
NetdUpdatable.h [NETD-BPF#19] Mainline part of bpf code from netd 2022-01-30 09:51:25 +08:00