* Rename ipfw_[un]bind_table_rule to ipfw_[un]ref_rule_tables
* Update their descriptions.
This commit is contained in:
parent
20eb17aed6
commit
37a5b4aafb
@ -658,7 +658,7 @@ commit_rules(struct ip_fw_chain *chain, struct rule_check_info *rci, int count)
|
||||
ci--;
|
||||
if (ci->table_opcodes == 0)
|
||||
continue;
|
||||
ipfw_unbind_table_rule(chain,ci->krule);
|
||||
ipfw_unref_rule_tables(chain,ci->krule);
|
||||
|
||||
}
|
||||
IPFW_UH_WUNLOCK(chain);
|
||||
|
@ -2940,14 +2940,14 @@ ipfw_move_tables_sets(struct ip_fw_chain *ch, ipfw_range_tlv *rt,
|
||||
|
||||
/*
|
||||
* Finds and bumps refcount for tables referenced by given @rule.
|
||||
* Allocates new indexes for non-existing tables.
|
||||
* Auto-creates non-existing tables.
|
||||
* Fills in @oib array with userland/kernel indexes.
|
||||
* First free oidx pointer is saved back in @oib.
|
||||
*
|
||||
* Returns 0 on success.
|
||||
*/
|
||||
static int
|
||||
bind_table_rule(struct ip_fw_chain *ch, struct ip_fw *rule,
|
||||
find_ref_rule_tables(struct ip_fw_chain *ch, struct ip_fw *rule,
|
||||
struct rule_check_info *ci, struct obj_idx **oib, struct tid_info *ti)
|
||||
{
|
||||
struct table_config *tc;
|
||||
@ -2969,10 +2969,7 @@ bind_table_rule(struct ip_fw_chain *ch, struct ip_fw *rule,
|
||||
IPFW_UH_WLOCK(ch);
|
||||
ni = CHAIN_TO_NI(ch);
|
||||
|
||||
/*
|
||||
* Increase refcount on each referenced table.
|
||||
* Allocate table indexes for non-existing tables.
|
||||
*/
|
||||
/* Increase refcount on each existing referenced table. */
|
||||
for ( ; l > 0 ; l -= cmdlen, cmd += cmdlen) {
|
||||
cmdlen = F_LEN(cmd);
|
||||
|
||||
@ -3071,7 +3068,7 @@ bind_table_rule(struct ip_fw_chain *ch, struct ip_fw *rule,
|
||||
* Remove references from every table used in @rule.
|
||||
*/
|
||||
void
|
||||
ipfw_unbind_table_rule(struct ip_fw_chain *chain, struct ip_fw *rule)
|
||||
ipfw_unref_rule_tables(struct ip_fw_chain *chain, struct ip_fw *rule)
|
||||
{
|
||||
int cmdlen, l;
|
||||
ipfw_insn *cmd;
|
||||
@ -3203,7 +3200,7 @@ ipfw_rewrite_table_uidx(struct ip_fw_chain *chain,
|
||||
}
|
||||
|
||||
/* Reference all used tables */
|
||||
error = bind_table_rule(chain, ci->krule, ci, &pidx_last, &ti);
|
||||
error = find_ref_rule_tables(chain, ci->krule, ci, &pidx_last, &ti);
|
||||
if (error != 0)
|
||||
goto free;
|
||||
|
||||
|
@ -176,7 +176,7 @@ int ipfw_mark_table_kidx(struct ip_fw_chain *chain, struct ip_fw *rule,
|
||||
uint32_t *bmask);
|
||||
int ipfw_export_table_ntlv(struct ip_fw_chain *ch, uint16_t kidx,
|
||||
struct sockopt_data *sd);
|
||||
void ipfw_unbind_table_rule(struct ip_fw_chain *chain, struct ip_fw *rule);
|
||||
void ipfw_unref_rule_tables(struct ip_fw_chain *chain, struct ip_fw *rule);
|
||||
|
||||
/* utility functions */
|
||||
int ipfw_check_table_name(char *name);
|
||||
|
Loading…
Reference in New Issue
Block a user