This is done in iptables.c directly.
-static void flush_nat(void)
-{
- int err;
-
- err = __connman_iptables_command("-t nat -F POSTROUTING");
- if (err < 0) {
- DBG("Flushing the nat table failed");
-
- return;
- }
-
- __connman_iptables_commit("nat");
-}
-
static int enable_nat(struct connman_nat *nat)
{
int err;
static int enable_nat(struct connman_nat *nat)
{
int err;
nat_hash = g_hash_table_new_full(g_str_hash, g_str_equal,
g_free, cleanup_nat);
nat_hash = g_hash_table_new_full(g_str_hash, g_str_equal,
g_free, cleanup_nat);
g_hash_table_destroy(nat_hash);
nat_hash = NULL;
g_hash_table_destroy(nat_hash);
nat_hash = NULL;
connman_notifier_unregister(&nat_notifier);
}
connman_notifier_unregister(&nat_notifier);
}