+
+static void test_iptables_basic0(void)
+{
+ int err;
+
+ err = __connman_iptables_command("-C INPUT -i session-bridge -j ACCEPT");
+ g_assert(err != 0);
+ err = __connman_iptables_commit("filter");
+ g_assert(err == 0);
+
+ err = __connman_iptables_command("-I INPUT -i session-bridge -j ACCEPT");
+ g_assert(err == 0);
+ err = __connman_iptables_commit("filter");
+ g_assert(err == 0);
+
+ err = __connman_iptables_command("-C INPUT -i session-bridge -j ACCEPT");
+ g_assert(err == 0);
+ err = __connman_iptables_commit("filter");
+ g_assert(err == 0);
+
+ err = __connman_iptables_command("-D INPUT -i session-bridge -j ACCEPT");
+ g_assert(err == 0);
+ err = __connman_iptables_commit("filter");
+ g_assert(err == 0);
+
+ err = __connman_iptables_command("-C INPUT -i session-bridge -j ACCEPT");
+ g_assert(err != 0);
+ err = __connman_iptables_commit("filter");
+ g_assert(err == 0);
+}
+