51 lines
1.9 KiB
Diff
51 lines
1.9 KiB
Diff
From 4d2d565742bc15b9c783b39ddf949b246145f92c Mon Sep 17 00:00:00 2001
|
|
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
|
Date: Sat, 31 Jul 2021 06:14:33 +0000
|
|
Subject: [PATCH 1/3] ignore iptables error
|
|
|
|
---
|
|
server/BandwidthController.cpp | 1 +
|
|
server/Controllers.cpp | 1 -
|
|
server/IptablesRestoreController.cpp | 1 +
|
|
3 files changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/server/BandwidthController.cpp b/server/BandwidthController.cpp
|
|
index 438dbb8d..8a4ffecb 100644
|
|
--- a/server/BandwidthController.cpp
|
|
+++ b/server/BandwidthController.cpp
|
|
@@ -541,6 +541,7 @@ int BandwidthController::updateQuota(const std::string& quotaName, int64_t bytes
|
|
if (!isOk(file)) {
|
|
int res = errno;
|
|
ALOGE("Updating quota %s failed (%s)", quotaName.c_str(), toString(file).c_str());
|
|
+ res = 0; // HACKED
|
|
return -res;
|
|
}
|
|
// TODO: should we propagate this error?
|
|
diff --git a/server/Controllers.cpp b/server/Controllers.cpp
|
|
index 43a2d1ee..4eafb117 100644
|
|
--- a/server/Controllers.cpp
|
|
+++ b/server/Controllers.cpp
|
|
@@ -284,7 +284,6 @@ void Controllers::init() {
|
|
// As such simply exit netd. This may crash loop the system, but by failing
|
|
// to bootup we will trigger rollback and thus this offers us protection against
|
|
// a mainline update breaking things.
|
|
- exit(1);
|
|
}
|
|
gLog.info("Enabling bandwidth control: %" PRId64 "us", s.getTimeAndResetUs());
|
|
|
|
diff --git a/server/IptablesRestoreController.cpp b/server/IptablesRestoreController.cpp
|
|
index dc718309..160350ca 100644
|
|
--- a/server/IptablesRestoreController.cpp
|
|
+++ b/server/IptablesRestoreController.cpp
|
|
@@ -345,6 +345,7 @@ int IptablesRestoreController::execute(const IptablesTarget target, const std::s
|
|
if (target == V6 || target == V4V6) {
|
|
res |= sendCommand(IP6TABLES_PROCESS, command, output);
|
|
}
|
|
+ res = 0; // ignore iptables error
|
|
return res;
|
|
}
|
|
|
|
--
|
|
2.34.1
|
|
|