summaryrefslogtreecommitdiff
path: root/unit
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2012-02-13 14:51:41 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2012-02-13 16:24:56 (GMT)
commit0b3ac5a7dc3f0b531ca275ccad2f6e875fb81738 (patch)
tree7e909cbe813183c207f2a9e0403c6c1bf938208b /unit
parentf5951db69430d5ff6192cbd851ce36feff1a595b (diff)
downloadconnman-0b3ac5a7dc3f0b531ca275ccad2f6e875fb81738.tar.gz
connman-0b3ac5a7dc3f0b531ca275ccad2f6e875fb81738.tar.xz
test-nat: Commit table changes
Diffstat (limited to 'unit')
-rw-r--r--unit/test-nat.c7
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[])