[PATCH v0 5/6] test-nat: Commit table changes

Daniel Wagner wagi at monom.org
Mon Feb 13 06:51:41 PST 2012


From: Daniel Wagner <daniel.wagner at bmw-carit.de>

---
 unit/test-nat.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/unit/test-nat.c b/unit/test-nat.c
index a601871..98a7b7a 100644
--- a/unit/test-nat.c
+++ b/unit/test-nat.c
@@ -73,6 +73,9 @@ static void test_nat_basic0(void)
 	err = __connman_iptables_command("-t nat -C POSTROUTING "
 					"-s 192.168.2.1/24 -o eth0 -j MASQUERADE");
 	g_assert(err != 0);
+	err = __connman_iptables_commit("nat");
+	g_assert(err == 0);
+
 
 	__connman_nat_disable("bridge");
 }
@@ -94,6 +97,8 @@ static void test_nat_basic1(void)
 	err = __connman_iptables_command("-t nat -C POSTROUTING "
 					"-s 192.168.2.1/24 -o eth0 -j MASQUERADE");
 	g_assert(err == 0);
+	err = __connman_iptables_commit("nat");
+	g_assert(err == 0);
 
 	__connman_nat_disable("bridge");
 
@@ -101,6 +106,8 @@ static void test_nat_basic1(void)
 	err = __connman_iptables_command("-t nat -C POSTROUTING "
 					"-s 192.168.2.1/24 -o eth0 -j MASQUERADE");
 	g_assert(err != 0);
+	err = __connman_iptables_commit("nat");
+	g_assert(err == 0);
 }
 
 int main(int argc, char *argv[])
-- 
1.7.9.48.g85da4d




More information about the connman mailing list