svn commit: r269881 - projects/ipfw/sys/netpfil/ipfw
Alexander V. Chernikov
melifaro at FreeBSD.org
Tue Aug 12 16:08:15 UTC 2014
Author: melifaro
Date: Tue Aug 12 16:08:13 2014
New Revision: 269881
URL: http://svnweb.freebsd.org/changeset/base/269881
Log:
* Rename ipfw_[un]bind_table_rule to ipfw_[un]ref_rule_tables
* Update their descriptions.
Modified:
projects/ipfw/sys/netpfil/ipfw/ip_fw_sockopt.c
projects/ipfw/sys/netpfil/ipfw/ip_fw_table.c
projects/ipfw/sys/netpfil/ipfw/ip_fw_table.h
Modified: projects/ipfw/sys/netpfil/ipfw/ip_fw_sockopt.c
==============================================================================
--- projects/ipfw/sys/netpfil/ipfw/ip_fw_sockopt.c Tue Aug 12 15:51:48 2014 (r269880)
+++ projects/ipfw/sys/netpfil/ipfw/ip_fw_sockopt.c Tue Aug 12 16:08:13 2014 (r269881)
@@ -658,7 +658,7 @@ commit_rules(struct ip_fw_chain *chain,
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);
Modified: projects/ipfw/sys/netpfil/ipfw/ip_fw_table.c
==============================================================================
--- projects/ipfw/sys/netpfil/ipfw/ip_fw_table.c Tue Aug 12 15:51:48 2014 (r269880)
+++ projects/ipfw/sys/netpfil/ipfw/ip_fw_table.c Tue Aug 12 16:08:13 2014 (r269881)
@@ -2940,14 +2940,14 @@ ipfw_move_tables_sets(struct ip_fw_chain
/*
* 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,
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,
* 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_cha
}
/* 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;
Modified: projects/ipfw/sys/netpfil/ipfw/ip_fw_table.h
==============================================================================
--- projects/ipfw/sys/netpfil/ipfw/ip_fw_table.h Tue Aug 12 15:51:48 2014 (r269880)
+++ projects/ipfw/sys/netpfil/ipfw/ip_fw_table.h Tue Aug 12 16:08:13 2014 (r269881)
@@ -176,7 +176,7 @@ int ipfw_mark_table_kidx(struct ip_fw_ch
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);
More information about the svn-src-projects
mailing list