From owner-svn-src-projects@FreeBSD.ORG Tue Aug 12 16:08:14 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA74BEE8 for ; Tue, 12 Aug 2014 16:08:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9904253E for ; Tue, 12 Aug 2014 16:08:14 +0000 (UTC) Received: from melifaro (uid 1268) (envelope-from melifaro@FreeBSD.org) id 6e2b by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 16:08:14 +0000 From: Alexander V. Chernikov Date: Tue, 12 Aug 2014 16:08:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r269881 - projects/ipfw/sys/netpfil/ipfw X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53ea3bee.6e2b.38e72c57@svn.freebsd.org> X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 16:08:15 -0000 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);