From owner-svn-src-all@freebsd.org Fri May 20 03:27:26 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 BCC81B43AC8; Fri, 20 May 2016 03:27:26 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 74147130E; Fri, 20 May 2016 03:27:26 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id 3b5wbpnJJEWlr3b5xb4Bei; Thu, 19 May 2016 21:27:25 -0600 X-Authority-Analysis: v=2.2 cv=P7p4vWIu c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=yrkiwgmsf1kA:10 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=YxBL1-UpAAAA:8 a=Y8eC-1JYAjAzCA26YYAA:9 a=IjZwj45LgO3ly-622nXo:22 a=pxhY87DP9d2VeQe4joPk:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id DAD5D13751; Thu, 19 May 2016 20:27:23 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u4K3RNPw046568; Thu, 19 May 2016 20:27:23 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201605200327.u4K3RNPw046568@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r300259 - head/sys/contrib/ipfilter/netinet In-Reply-To: Message from Cy Schubert of "Fri, 20 May 2016 03:04:23 -0000." <201605200304.u4K34NTL019720@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 19 May 2016 20:27:23 -0700 X-CMAE-Envelope: MS4wfFRDIkc0KHzvFPMDaNqrk2kC1ZIvCvio7fQpqsHntbyXZj475o5N0g8m8GOBq0kW83H1RCqF1tXR9Td9KWJ6RrQImgtgi7FYDvLjYXbkRgfcsdepm+JS Vti5bJy3jXXs9vEGzRHi+0A/lgPOEZZ8yAjM3KWxOfDVOcrujTlkps2QLzEiPeN93JZPros2Oj8M3jh5muh74ORYosGshFD4JTZlJQD4pjmbsPXhHjd4Euz8 2ya7mpt7mJ0WApqZvXR17i3gE3Z5/xwnxNUxb7CC4hGOOTbfJnyhi3aV/w3vS7B/ 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:27:26 -0000 In message <201605200304.u4K34NTL019720@repo.freebsd.org>, Cy Schubert writes: > 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 201 > 6 (r300258) > +++ head/sys/contrib/ipfilter/netinet/ip_frag.c Fri May 20 03:04:22 201 > 6 (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 201 > 6 (r300258) > +++ head/sys/contrib/ipfilter/netinet/ip_frag.h Fri May 20 03:04:22 201 > 6 (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; > Darren Reed has been notified so that this patch can be included in the upline ipfilter repo. -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.