diff options
| author | Chenbo Feng <fengc@google.com> | 2018-12-11 12:23:24 -0800 |
|---|---|---|
| committer | Chenbo Feng <fengc@google.com> | 2019-02-15 04:33:30 +0000 |
| commit | 47dd073ca85df9fa7dc611f7b6fafcb0f7fccefa (patch) | |
| tree | 2819bfe21613d72a1e7f89f3c71b5d77ff6f9d83 /server/FirewallControllerTest.cpp | |
| parent | abdb0bde3a39717c5b8c2e1f8b2b5687880bf85e (diff) | |
Get bpf level when check bpf support
Instead of return boolean, bpf support check now returns a integer
represent the current bpf level on device. This level is used to decide
if the device support some advanced bpf feature such as map_in_map and
bpf cgroup socket filter. Delete the binder call for bpf status check
since no one is using it.
Bug: 111441138
Test: libnetdbpf_test, netd_integration_test
Change-Id: Ib70c07647ffe491d493b4582b4b4b0eba7caf3a9
Diffstat (limited to 'server/FirewallControllerTest.cpp')
| -rw-r--r-- | server/FirewallControllerTest.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/FirewallControllerTest.cpp b/server/FirewallControllerTest.cpp index 71cc532f..bd933b47 100644 --- a/server/FirewallControllerTest.cpp +++ b/server/FirewallControllerTest.cpp @@ -39,7 +39,10 @@ class FirewallControllerTest : public IptablesBaseTest { protected: FirewallControllerTest() { FirewallController::execIptablesRestore = fakeExecIptablesRestore; - mFw.mUseBpfOwnerMatch = false; + // This unit test currently doesn't cover the eBPF owner match case so + // we have to manually turn eBPF support off. + // TODO: find a way to unit test the eBPF code path. + mFw.mUseBpfOwnerMatch = android::bpf::BpfLevel::NONE; } FirewallController mFw; |
