mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-08 05:34:58 +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);
|
||||
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) {
|
||||
peer = list_entry(pos, struct peer, head);
|
||||
|
||||
@@ -525,7 +527,6 @@ remove_rule(struct xt_pknock_mtinfo *info)
|
||||
kfree(rule->peer_head);
|
||||
kfree(rule);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* If peer status exist in the list it returns peer status, if not it returns NULL.
|
||||
|
Reference in New Issue
Block a user