diff options
| author | Lorenzo Colitti <lorenzo@google.com> | 2020-07-30 12:03:40 +0900 |
|---|---|---|
| committer | Lorenzo Colitti <lorenzo@google.com> | 2020-07-30 23:13:40 +0900 |
| commit | cdd79f13c670605819333de2d7b67d7f8a42210c (patch) | |
| tree | 7e45bb560bfdf10340ecd95b6d9c8ff4c11611b3 /server/BandwidthControllerTest.cpp | |
| parent | 16a23705a18ee4839442598bb6f075b1bfacfbe8 (diff) | |
Mostly remove "blacklist" and "whitelist" from netd.
Rename these to allowlist and denylist.
This change is mostly automatically generated with:
sed -i 's/WHITE/ALLOW/g' server/*.{cpp,h} libnetdbpf/{*.cpp,/include/netdbpf/*.h} bpf_progs/*.[ch]
sed -i 's/white/allow/g' server/*.{cpp,h} libnetdbpf/{*.cpp,/include/netdbpf/*.h} bpf_progs/*.[ch]
sed -i 's/BLACK/DENY/g' server/*.{cpp,h} libnetdbpf/{*.cpp,/include/netdbpf/*.h} bpf_progs/*.[ch]
sed -i 's/black/deny/g' server/*.{cpp,h} libnetdbpf/{*.cpp,/include/netdbpf/*.h} bpf_progs/*.[ch]
sed -i 's/White/Allow/g' server/*.{cpp,h} libnetdbpf/{*.cpp,/include/netdbpf/*.h} bpf_progs/*.[ch]
sed -i 's/Black/Deny/g' server/*.{cpp,h} libnetdbpf/{*.cpp,/include/netdbpf/*.h} bpf_progs/*.[ch]
plus manual changes to FirewallController.h and NdcDispatcher.cpp
to make them continue to use INetd::FIREWALL_WHITELIST and
INetd::FIREWALL_BLACKLIST.
INetd (and FIREWALL_WHITELIST and FIREWALL_BLACKLIST) are not
being fixed in this change because doing so would require
changing frozen AIDL files, which is a more complex undertaking.
Also manually change occurrences in the test.
Finally, fix some formatting errors found by clang-format, and
some errors such as "a allowlist" (should be "an allowlist") or`
"allowspace" (should be "whitespace").
Bug: 161896447
Test: atest netd_unit_test netd_integration_test
Test: crosshatch builds, boots, no IptablesRestoreController errors in logs
Change-Id: I3f5b864686651134a50e90b28fc9914bfa3f9a8e
Diffstat (limited to 'server/BandwidthControllerTest.cpp')
| -rw-r--r-- | server/BandwidthControllerTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/BandwidthControllerTest.cpp b/server/BandwidthControllerTest.cpp index 115a0da5..9953ecdf 100644 --- a/server/BandwidthControllerTest.cpp +++ b/server/BandwidthControllerTest.cpp @@ -96,12 +96,12 @@ const std::string ACCOUNT_RULES_WITH_BPF = "\n" "-A bw_costly_shared -j bw_penalty_box\n" + StringPrintf("-I bw_penalty_box -m bpf --object-pinned %s -j REJECT\n", - XT_BPF_BLACKLIST_PROG_PATH) + + XT_BPF_DENYLIST_PROG_PATH) + "-A bw_penalty_box -j bw_happy_box\n" "-A bw_happy_box -j bw_data_saver\n" "-A bw_data_saver -j RETURN\n" + StringPrintf("-I bw_happy_box -m bpf --object-pinned %s -j RETURN\n", - XT_BPF_WHITELIST_PROG_PATH) + + XT_BPF_ALLOWLIST_PROG_PATH) + "COMMIT\n" "*raw\n" "-A bw_raw_PREROUTING -i ipsec+ -j RETURN\n" |
