summaryrefslogtreecommitdiff
path: root/server/BandwidthControllerTest.cpp
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-09-21 17:09:51 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-09-21 17:09:51 +0000
commitdefce53ada62ebdb67844549bf634f7df3f31779 (patch)
tree7309f2a0efe904b46bfbafc67aeb0af56d19c33f /server/BandwidthControllerTest.cpp
parentd09bf2d641bee3a23327bf6f9564fe4674e6ff66 (diff)
parent51eb324050098c8359ff4c577945de16a2cc2756 (diff)
Merge "Add costly interface rules to make forwarding in both directions"
Diffstat (limited to 'server/BandwidthControllerTest.cpp')
-rw-r--r--server/BandwidthControllerTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/BandwidthControllerTest.cpp b/server/BandwidthControllerTest.cpp
index e62f340d..7a960e84 100644
--- a/server/BandwidthControllerTest.cpp
+++ b/server/BandwidthControllerTest.cpp
@@ -235,6 +235,7 @@ const std::vector<std::string> makeInterfaceQuotaCommands(const std::string& ifa
StringPrintf("-A %s -j bw_penalty_box", c_chain),
StringPrintf("-I bw_INPUT %d -i %s --jump %s", ruleIndex, c_iface, c_chain),
StringPrintf("-I bw_OUTPUT %d -o %s --jump %s", ruleIndex, c_iface, c_chain),
+ StringPrintf("-A bw_FORWARD -i %s --jump %s", c_iface, c_chain),
StringPrintf("-A bw_FORWARD -o %s --jump %s", c_iface, c_chain),
StringPrintf("-A %s -m quota2 ! --quota %" PRIu64 " --name %s --jump REJECT", c_chain,
quota, c_iface),
@@ -251,6 +252,7 @@ const std::vector<std::string> removeInterfaceQuotaCommands(const std::string& i
"*filter",
StringPrintf("-D bw_INPUT -i %s --jump %s", c_iface, c_chain),
StringPrintf("-D bw_OUTPUT -o %s --jump %s", c_iface, c_chain),
+ StringPrintf("-D bw_FORWARD -i %s --jump %s", c_iface, c_chain),
StringPrintf("-D bw_FORWARD -o %s --jump %s", c_iface, c_chain),
StringPrintf("-F %s", c_chain),
StringPrintf("-X %s", c_chain),
@@ -288,6 +290,7 @@ const std::vector<std::string> makeInterfaceSharedQuotaCommands(const std::strin
"*filter",
StringPrintf("-I bw_INPUT %d -i %s --jump %s", ruleIndex, c_iface, c_chain),
StringPrintf("-I bw_OUTPUT %d -o %s --jump %s", ruleIndex, c_iface, c_chain),
+ StringPrintf("-A bw_FORWARD -i %s --jump %s", c_iface, c_chain),
StringPrintf("-A bw_FORWARD -o %s --jump %s", c_iface, c_chain),
};
if (insertQuota) {
@@ -307,6 +310,7 @@ const std::vector<std::string> removeInterfaceSharedQuotaCommands(const std::str
"*filter",
StringPrintf("-D bw_INPUT -i %s --jump %s", c_iface, c_chain),
StringPrintf("-D bw_OUTPUT -o %s --jump %s", c_iface, c_chain),
+ StringPrintf("-D bw_FORWARD -i %s --jump %s", c_iface, c_chain),
StringPrintf("-D bw_FORWARD -o %s --jump %s", c_iface, c_chain),
};
if (deleteQuota) {