test-nat: Commit table changes
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Mon, 13 Feb 2012 14:51:41 +0000 (15:51 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 13 Feb 2012 16:24:56 +0000 (17:24 +0100)
unit/test-nat.c

index a601871..98a7b7a 100644 (file)
@@ -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[])