From owner-svn-src-head@FreeBSD.ORG Tue May 12 20:42:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D88B5CEF; Tue, 12 May 2015 20:42:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C744314B4; Tue, 12 May 2015 20:42:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4CKggVN083196; Tue, 12 May 2015 20:42:42 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4CKgg9L083195; Tue, 12 May 2015 20:42:42 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201505122042.t4CKgg9L083195@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Tue, 12 May 2015 20:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282825 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2015 20:42:43 -0000 Author: melifaro Date: Tue May 12 20:42:42 2015 New Revision: 282825 URL: https://svnweb.freebsd.org/changeset/base/282825 Log: Remove ptei->value check from ipfw_link_table_values(): even if there was non-zero number of restarts, we would unref/clear all value references and start ipfw_link_table_values() once again with (mostly) cleared "tei" buffer. Additionally, ptei->ptv stores only to-be-added values, not existing ones. This is a forgotten piece of previous value refconting implementation, and now it is simply incorrect. Modified: head/sys/netpfil/ipfw/ip_fw_table_value.c Modified: head/sys/netpfil/ipfw/ip_fw_table_value.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table_value.c Tue May 12 20:04:17 2015 (r282824) +++ head/sys/netpfil/ipfw/ip_fw_table_value.c Tue May 12 20:42:42 2015 (r282825) @@ -563,17 +563,6 @@ ipfw_link_table_values(struct ip_fw_chai /* Let's try to link values */ for (i = 0; i < count; i++) { ptei = &tei[i]; - if (ptei->value != 0) { - - /* - * We may be here after several process restarts, - * so we need to update all fields that might - * have changed. - */ - ptv = (struct table_val_link *)ptei->ptv; - ptv->pval = &pval[i]; - continue; - } /* Check if record has appeared */ mask_table_value(ptei->pvalue, &tval, ts->vmask);