Commit graph android_packages_modules_Co.../DnsResolver/DnsBpfHelperTest.cpp
Message SHA1
Add firewall chains for HAPPY_BOX and user/admin PENALTY_BOX
Follow up CLs will update CS to generate blocked reason from bpf map
instead of asking NPMS.

However, one issue is NPMS set PENALTY_BOX for
BLOCKED_METERED_REASON_USER_RESTRICTED and
BLOCKED_METERED_REASON_ADMIN_DISABLED without telling the reason.
So, CS can not know the reason of PENALTY_BOX.

This CL add new firewall chain and match to distinguish reasons.
NPMS must call setUidFirewallRule with
FIREWALL_CHAIN_METERED_DENY_USER or FIREWALL_CHAIN_METERED_DENY_ADMIN
based on the reason so that CS can know the reason of restriction.

Bug: 332628891
Test: atest com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: Ia4ad4bdb345abc22c782630e828edfad2452db36

Motomu Utsumi   commited 2024-04-23 15:04:28 +09:00
11d3345daa
Support Data Saver awareness in libcom.android.tethering.dns_helper.so
Make ADnsHelper_isUidNetworkingBlocked() to reference 'metered'
information and Data Saver related BPF maps to make the final decision.

Bug: 288340533
Test: atest dns_helper_unit_test
Change-Id: I51b1dadd56a8d6fda3f8b18d64740e52b76e1bfe

Ken Chen   commited 2023-11-01 06:23:09 +08:00
006a3f1514
[Test] for libcom.android.tethering.dns_helper.so
Exercise the BpfReader::isUidNetworkingBlocked().

Bug: 288340533
Test: atest dns_helper_unit_test
Change-Id: Icc889a6a9649e991cba222427f9b8d4f5ee3b325

Ken Chen   commited 2023-11-01 06:23:09 +08:00
d4876dec06