Skip to content

Instantly share code, notes, and snippets.

@fire855
Created March 15, 2016 15:12
Show Gist options
  • Save fire855/dc757ae420252efbabda to your computer and use it in GitHub Desktop.
Save fire855/dc757ae420252efbabda to your computer and use it in GitHub Desktop.
From 73358e3e3501b911346186c4814a86761b0254a5 Mon Sep 17 00:00:00 2001
From: fire855 <thefire855@gmail.com>
Date: Fri, 6 Nov 2015 16:25:29 +0100
Subject: [PATCH] Remove new output interface rules uid code Wifi and Data
connection fix :-)
---
server/RouteController.cpp | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/server/RouteController.cpp b/server/RouteController.cpp
index 889779d..1bf9165 100644
--- a/server/RouteController.cpp
+++ b/server/RouteController.cpp
@@ -45,7 +45,6 @@ namespace {
// BEGIN CONSTANTS --------------------------------------------------------------------------------
const uint32_t RULE_PRIORITY_VPN_OVERRIDE_SYSTEM = 10000;
-const uint32_t RULE_PRIORITY_VPN_OVERRIDE_OIF = 10500;
const uint32_t RULE_PRIORITY_VPN_OUTPUT_TO_LOCAL = 11000;
const uint32_t RULE_PRIORITY_SECURE_VPN = 12000;
const uint32_t RULE_PRIORITY_EXPLICIT_NETWORK = 13000;
@@ -556,16 +555,6 @@ WARN_UNUSED_RESULT int modifyOutputInterfaceRules(const char* interface, uint32_
fwmark.permission = permission;
mask.permission = permission;
- // If this rule does not specify a UID range, then also add a corresponding high-priority rule
- // for UID. This covers forwarded packets and system daemons such as the tethering DHCP server.
- if (uidStart == INVALID_UID && uidEnd == INVALID_UID) {
- if (int ret = modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_VPN_OVERRIDE_OIF,
- table, fwmark.intValue, mask.intValue, IIF_NONE, interface,
- UID_ROOT, UID_ROOT)) {
- return ret;
- }
- }
-
return modifyIpRule(add ? RTM_NEWRULE : RTM_DELRULE, RULE_PRIORITY_OUTPUT_INTERFACE, table,
fwmark.intValue, mask.intValue, IIF_NONE, interface, uidStart, uidEnd);
}
--
2.1.1.1.g1fb337f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment