From owner-svn-src-stable@FreeBSD.ORG Sun Oct 12 17:13:15 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A13ABA9; Sun, 12 Oct 2014 17:13:15 +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 862A6F0D; Sun, 12 Oct 2014 17:13:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9CHDF9C063065; Sun, 12 Oct 2014 17:13:15 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9CHDFsF063064; Sun, 12 Oct 2014 17:13:15 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201410121713.s9CHDFsF063064@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 12 Oct 2014 17:13:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272994 - stable/10/sys/contrib/ipfilter/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Oct 2014 17:13:15 -0000 Author: cy Date: Sun Oct 12 17:13:14 2014 New Revision: 272994 URL: https://svnweb.freebsd.org/changeset/base/272994 Log: MFC r272551 ipfiler bug #550 filter rule list corrupted with inserted rules Obtained from: ipfilter CVS repo (r1.128); NetBSD CVS repo (r1.15) Modified: stable/10/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/fil.c Sun Oct 12 17:10:44 2014 (r272993) +++ stable/10/sys/contrib/ipfilter/netinet/fil.c Sun Oct 12 17:13:14 2014 (r272994) @@ -4496,7 +4496,15 @@ frrequest(softc, unit, req, data, set, m fp = f; f = NULL; + fp->fr_next = NULL; fp->fr_dnext = NULL; + fp->fr_pnext = NULL; + fp->fr_pdnext = NULL; + fp->fr_grp = NULL; + fp->fr_grphead = NULL; + fp->fr_icmpgrp = NULL; + fp->fr_isc = (void *)-1; + fp->fr_ptr = NULL; fp->fr_ref = 0; fp->fr_flags |= FR_COPIED; } else { @@ -5000,7 +5008,9 @@ frrequest(softc, unit, req, data, set, m if (f->fr_collect > fp->fr_collect) break; ftail = &f->fr_next; + fprev = ftail; } + ftail = fprev; f = NULL; ptr = NULL; } else if (req == (ioctlcmd_t)SIOCINAFR || @@ -5091,6 +5101,8 @@ frrequest(softc, unit, req, data, set, m fp->fr_ref = 1; fp->fr_pnext = ftail; fp->fr_next = *ftail; + if (fp->fr_next != NULL) + fp->fr_next->fr_pnext = &fp->fr_next; *ftail = fp; if (addrem == 0) ipf_fixskip(ftail, fp, 1);