diff options
| author | Maciej Żenczykowski <maze@google.com> | 2020-05-27 17:33:15 -0700 |
|---|---|---|
| committer | Maciej Żenczykowski <maze@google.com> | 2020-05-27 20:00:18 -0700 |
| commit | f14b23d56eba8ed2d5c4be2a753a8444916c2069 (patch) | |
| tree | 739006935334706997a8cdb27626493d7152350b /server/BandwidthController.cpp | |
| parent | 9071aa6ef4eb6d3de53b47aaa3155b3ba2416da3 (diff) | |
No longer get app uid bandwidth stats for the clat daemon
Test: atest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ibe2de1b04e5ff342d87aa47236c635b47f7ea11b
Diffstat (limited to 'server/BandwidthController.cpp')
| -rw-r--r-- | server/BandwidthController.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/BandwidthController.cpp b/server/BandwidthController.cpp index d7460270..e1ce56f2 100644 --- a/server/BandwidthController.cpp +++ b/server/BandwidthController.cpp @@ -229,8 +229,12 @@ std::vector<std::string> getBasicAccountingCommands(const bool useBpf) { "-A bw_OUTPUT -j bw_global_alert", // Prevents IPSec double counting (Tunnel mode and Transport mode, // respectively) - ("-A bw_OUTPUT -o " IPSEC_IFACE_PREFIX "+ -j RETURN"), - "-A bw_OUTPUT -m policy --pol ipsec --dir out -j RETURN", + useBpf ? "" : "-A bw_OUTPUT -o " IPSEC_IFACE_PREFIX "+ -j RETURN", + useBpf ? "" : "-A bw_OUTPUT -m policy --pol ipsec --dir out -j RETURN", + // Don't count clat traffic, as it has already been counted (and subject to + // costly / happy_box / data_saver / penalty_box etc. based on the real UID) + // on the stacked interface. + useBpf ? "" : "-A bw_OUTPUT -m owner --uid-owner clat -j RETURN", // This is egress application UID xt_qtaguid (pre-ebpf) accounting, // for bpf this is handled out of cgroup hooks instead. useBpf ? "" : "-A bw_OUTPUT -m owner --socket-exists", |
