};
struct connman_iptables {
+ char *name;
int ipt_sock;
struct ipt_getinfo *info;
struct connman_iptables_entry *entry;
int builtin, removed = 0;
+ DBG("table %s chain %s", table->name, name);
+
chain_head = find_chain_head(table, name);
if (chain_head == NULL)
return -EINVAL;
struct ipt_standard_target *standard;
u_int16_t entry_head_size, entry_return_size;
+ DBG("table %s chain %s", table->name, name);
+
last = g_list_last(table->entries);
/*
struct connman_iptables_entry *entry;
GList *chain_head, *chain_tail;
+ DBG("table %s chain %s", table->name, name);
+
chain_head = find_chain_head(table, name);
if (chain_head == NULL)
return -EINVAL;
int builtin = -1, ret;
GList *chain_tail;
+ DBG("table %s chain %s", table->name, chain_name);
+
chain_tail = find_chain_tail(table, chain_name);
if (chain_tail == NULL)
return -EINVAL;
GList *chain_head, *chain_tail, *list;
int builtin, removed;
+ DBG("table %s chain %s", table->name, chain_name);
+
removed = 0;
chain_head = find_chain_head(table, chain_name);
struct xt_standard_target *t;
int verdict;
+ DBG("table %s chain %s policy %s", table->name, chain_name, policy);
+
verdict = target_to_verdict(policy);
switch (verdict) {
case -NF_ACCEPT - 1:
}
g_list_free(table->entries);
+ g_free(table->name);
g_free(table->info);
g_free(table->blob_entries);
g_free(table);
if (table == NULL)
return NULL;
- g_hash_table_insert(table_hash, g_strdup(table_name), table);
+ table->name = g_strdup(table_name);
+ g_hash_table_replace(table_hash, table->name, table);
return table;
}
connman_bool_t invert = FALSE;
int len, c, err;
- DBG("");
-
ctx->ip = g_try_new0(struct ipt_ip, 1);
if (ctx->ip == NULL)
return -ENOMEM;
debug_enabled = TRUE;
table_hash = g_hash_table_new_full(g_str_hash, g_str_equal,
- g_free, remove_table);
+ NULL, remove_table);
xtables_init_all(&iptables_globals, NFPROTO_IPV4);