mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-11 23:24:57 +02:00
pknock: reduce indent in remove_rule
This commit is contained in:
@@ -504,7 +504,9 @@ remove_rule(struct xt_pknock_mtinfo *info)
|
|||||||
pr_debug("(N) rule not found: %s.\n", info->rule_name);
|
pr_debug("(N) rule not found: %s.\n", info->rule_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (rule != NULL && rule->ref_count == 0) {
|
if (rule == NULL || rule->ref_count != 0)
|
||||||
|
return;
|
||||||
|
|
||||||
hashtable_for_each_safe(pos, n, rule->peer_head, peer_hashsize, i) {
|
hashtable_for_each_safe(pos, n, rule->peer_head, peer_hashsize, i) {
|
||||||
peer = list_entry(pos, struct peer, head);
|
peer = list_entry(pos, struct peer, head);
|
||||||
|
|
||||||
@@ -525,7 +527,6 @@ remove_rule(struct xt_pknock_mtinfo *info)
|
|||||||
kfree(rule->peer_head);
|
kfree(rule->peer_head);
|
||||||
kfree(rule);
|
kfree(rule);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If peer status exist in the list it returns peer status, if not it returns NULL.
|
* If peer status exist in the list it returns peer status, if not it returns NULL.
|
||||||
|
Reference in New Issue
Block a user