From owner-svn-src-all@freebsd.org Fri May 20 03:04:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F8B5B435EE; Fri, 20 May 2016 03:04:24 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 147D8173B; Fri, 20 May 2016 03:04:24 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4K34N1q019722; Fri, 20 May 2016 03:04:23 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4K34NTL019720; Fri, 20 May 2016 03:04:23 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201605200304.u4K34NTL019720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 20 May 2016 03:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300259 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2016 03:04:24 -0000 Author: cy Date: Fri May 20 03:04:22 2016 New Revision: 300259 URL: https://svnweb.freebsd.org/changeset/base/300259 Log: Enable the two ip_frag tuneables. The code is there but the two ip_frag tuneables aren't registered in the ipf_tuners linked list. This commmit enables the two existing ip_frag tuneables by registering them. MFC after: 1 month Modified: head/sys/contrib/ipfilter/netinet/ip_frag.c head/sys/contrib/ipfilter/netinet/ip_frag.h Modified: head/sys/contrib/ipfilter/netinet/ip_frag.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_frag.c Fri May 20 03:03:04 2016 (r300258) +++ head/sys/contrib/ipfilter/netinet/ip_frag.c Fri May 20 03:04:22 2016 (r300259) @@ -112,7 +112,7 @@ static void ipf_frag_free __P((ipf_frag_ static frentry_t ipfr_block; -const ipftuneable_t ipf_tuneables[] = { +static ipftuneable_t ipf_frag_tuneables[] = { { { (void *)offsetof(ipf_frag_softc_t, ipfr_size) }, "frag_size", 1, 0x7fffffff, stsizeof(ipf_frag_softc_t, ipfr_size), @@ -189,6 +189,18 @@ ipf_frag_soft_create(softc) RWLOCK_INIT(&softf->ipfr_frag, "ipf fragment rwlock"); RWLOCK_INIT(&softf->ipfr_natfrag, "ipf NAT fragment rwlock"); + softf->ipf_frag_tune = ipf_tune_array_copy(softf, + sizeof(ipf_frag_tuneables), + ipf_frag_tuneables); + if (softf->ipf_frag_tune == NULL) { + ipf_frag_soft_destroy(softc, softf); + return NULL; + } + if (ipf_tune_array_link(softc, softf->ipf_frag_tune) == -1) { + ipf_frag_soft_destroy(softc, softf); + return NULL; + } + softf->ipfr_size = IPFT_SIZE; softf->ipfr_ttl = IPF_TTLVAL(60); softf->ipfr_lock = 1; @@ -219,6 +231,13 @@ ipf_frag_soft_destroy(softc, arg) RW_DESTROY(&softf->ipfr_frag); RW_DESTROY(&softf->ipfr_natfrag); + if (softf->ipf_frag_tune != NULL) { + ipf_tune_array_unlink(softc, softf->ipf_frag_tune); + KFREES(softf->ipf_frag_tune, sizeof(ipf_frag_tuneables)); + softf->ipf_frag_tune = NULL; + } + + KFREE(softf); } Modified: head/sys/contrib/ipfilter/netinet/ip_frag.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_frag.h Fri May 20 03:03:04 2016 (r300258) +++ head/sys/contrib/ipfilter/netinet/ip_frag.h Fri May 20 03:04:22 2016 (r300259) @@ -78,6 +78,7 @@ typedef struct ipf_frag_softc_s { int ipfr_ttl; int ipfr_lock; int ipfr_inited; + ipftuneable_t *ipf_frag_tune; ipfr_t *ipfr_list; ipfr_t **ipfr_tail; ipfr_t *ipfr_natlist;