summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2022-06-16 00:19:29 +0900
committerMaciej Żenczykowski <maze@google.com>2022-06-16 06:43:49 +0000
commitd017856865a3b331e429727bec569ad03fbb04d7 (patch)
treee720d1aef2bf5055b8c80a17c605d4de5e028898
parentfbc85069c14474b6987f2699849e7a9db72c6e35 (diff)
downloadnetd-d017856865a3b331e429727bec569ad03fbb04d7.tar.gz
Use CLAT_MARK from the netd AIDL interface.
Test: m Bug: 235778483 Change-Id: I8aa4a23bbf7ee81c0d2d11eb1854c91b2c39e9fb (cherry picked from commit 67a19cf8590077d5dcd3713b3dc656abfa11d80f) Merged-In: I8aa4a23bbf7ee81c0d2d11eb1854c91b2c39e9fb
-rw-r--r--server/BandwidthController.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/BandwidthController.cpp b/server/BandwidthController.cpp
index b076c875..8dba75a5 100644
--- a/server/BandwidthController.cpp
+++ b/server/BandwidthController.cpp
@@ -55,6 +55,7 @@
#include "FirewallController.h" /* For makeCriticalCommands */
#include "Fwmark.h"
#include "NetdConstants.h"
+#include "android/net/INetd.h"
#include "bpf/BpfUtils.h"
/* Alphabetical */
@@ -66,9 +67,6 @@ const char BandwidthController::LOCAL_RAW_PREROUTING[] = "bw_raw_PREROUTING";
const char BandwidthController::LOCAL_MANGLE_POSTROUTING[] = "bw_mangle_POSTROUTING";
const char BandwidthController::LOCAL_GLOBAL_ALERT[] = "bw_global_alert";
-// Sync from packages/modules/Connectivity/bpf_progs/clatd.c
-#define CLAT_MARK 0xdeadc1a7
-
auto BandwidthController::iptablesRestoreFunction = execIptablesRestoreWithOutput;
using android::base::Join;
@@ -76,6 +74,7 @@ using android::base::StartsWith;
using android::base::StringAppendF;
using android::base::StringPrintf;
using android::net::FirewallController;
+using android::net::INetd::CLAT_MARK;
using android::netdutils::StatusOr;
using android::netdutils::UniqueFile;