diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2013-02-12 10:19:50 +0100 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-02-12 12:34:42 +0200 |
commit | 161efbae1a4d554d244c206d5cfa1342fc4220cf (patch) | |
tree | 16daebe29d392fe41ea6d558a69ddf46c8a577cf /unit | |
parent | 4ef79dcb96b08830b03ffcc52120ea843a9f3685 (diff) | |
download | connman-161efbae1a4d554d244c206d5cfa1342fc4220cf.tar.gz connman-161efbae1a4d554d244c206d5cfa1342fc4220cf.tar.bz2 connman-161efbae1a4d554d244c206d5cfa1342fc4220cf.zip |
iptables: Remove unused __connman_iptables_command()
Diffstat (limited to 'unit')
-rw-r--r-- | unit/test-iptables.c | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/unit/test-iptables.c b/unit/test-iptables.c index 1e94647e..e378a90b 100644 --- a/unit/test-iptables.c +++ b/unit/test-iptables.c @@ -27,79 +27,6 @@ #include "../src/connman.h" -static void test_iptables_basic0(void) -{ - int err; - - err = __connman_iptables_command("-t filter -A INPUT " - "-m mark --mark 1 -j LOG"); - g_assert(err == 0); - - err = __connman_iptables_commit("filter"); - g_assert(err == 0); - - err = __connman_iptables_command("-t filter -D INPUT " - "-m mark --mark 1 -j LOG"); - g_assert(err == 0); - - err = __connman_iptables_commit("filter"); - g_assert(err == 0); -} - -static void test_iptables_basic1(void) -{ - int err; - - /* Test if we can do NAT stuff */ - - err = __connman_iptables_command("-t nat -A POSTROUTING " - "-s 10.10.1.0/24 -o eth0 -j MASQUERADE"); - - err = __connman_iptables_commit("nat"); - g_assert(err == 0); - - err = __connman_iptables_command("-t nat -D POSTROUTING " - "-s 10.10.1.0/24 -o eth0 -j MASQUERADE"); - - err = __connman_iptables_commit("nat"); - g_assert(err == 0); -} - -static void test_iptables_basic2(void) -{ - int err; - - /* Test if the right rule is removed */ - - err = __connman_iptables_command("-t filter -A INPUT " - "-m mark --mark 1 -j LOG"); - g_assert(err == 0); - - err = __connman_iptables_commit("filter"); - g_assert(err == 0); - - err = __connman_iptables_command("-t filter -A INPUT " - "-m mark --mark 2 -j LOG"); - g_assert(err == 0); - - err = __connman_iptables_commit("filter"); - g_assert(err == 0); - - err = __connman_iptables_command("-t filter -D INPUT " - "-m mark --mark 2 -j LOG"); - g_assert(err == 0); - - err = __connman_iptables_commit("filter"); - g_assert(err == 0); - - err = __connman_iptables_command("-t filter -D INPUT " - "-m mark --mark 1 -j LOG"); - g_assert(err == 0); - - err = __connman_iptables_commit("filter"); - g_assert(err == 0); -} - static void test_iptables_chain0(void) { int err; @@ -317,9 +244,6 @@ int main(int argc, char *argv[]) __connman_iptables_init(); __connman_nat_init(); - g_test_add_func("/iptables/basic0", test_iptables_basic0); - g_test_add_func("/iptables/basic1", test_iptables_basic1); - g_test_add_func("/iptables/basic2", test_iptables_basic2); g_test_add_func("/iptables/chain0", test_iptables_chain0); g_test_add_func("/iptables/chain1", test_iptables_chain1); g_test_add_func("/iptables/chain2", test_iptables_chain2); |