From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 05:37:21 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F161B16A6CD for ; Tue, 28 Nov 2006 05:37:21 +0000 (UTC) (envelope-from earl.lapus@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5484144FA3 for ; Tue, 28 Nov 2006 04:41:02 +0000 (GMT) (envelope-from earl.lapus@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so1260595uge for ; Mon, 27 Nov 2006 20:40:12 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jnbWcZOw3oPBwTeZwEhaybHc8P5sUNX0g6kIc3s68eFYfNuQBCvakCxq1950Wqygkf/an2jniH18af/fcPjO9UbBTqkoxMREeWDPF4EHUumD4pS86vbTeaC4mN4JiHdW0z21XsNhbCU2AZ2Di31rQx/UrhlykaoFtyYPgYzSGXc= Received: by 10.78.21.7 with SMTP id 7mr301101huu.1164678052321; Mon, 27 Nov 2006 17:40:52 -0800 (PST) Received: by 10.78.133.9 with HTTP; Mon, 27 Nov 2006 17:40:52 -0800 (PST) Message-ID: <604f76120611271740g61c1a3a4pe8e9d37ab1df3f28@mail.gmail.com> Date: Tue, 28 Nov 2006 09:40:52 +0800 From: "Earl Lapus" To: "Henning Brauer" In-Reply-To: <20061127142312.17227.qmail@nudo.bsws.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <604f76120611270203n3d065114vdbe8487cc04357e1@mail.gmail.com> <20061127125022.GA5690@qlovarnika.bg.datamax> <20061127142312.17227.qmail@nudo.bsws.de> Cc: Ryan Thomas McBride , Vasil Dimov , mlaier@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: pfctl X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 05:37:22 -0000 hi all, another quick question... I read that realtime must always be convex. That explains the checking. However, linkshare and upperlimit can be either concave or convex. If linkshare(lssc_xx) can be concave then we should allow lssc_m1 to be less than lssc_m2 even if lssc_m1 is greater than zero. And this also applies to upperlimit (ulsc_xx). Is this correct? On 11/27/06, Henning Brauer wrote: > * Vasil Dimov [2006-11-27 15:13]: > > > I was browsing through some code and stumbled upon this: > > > > if ((opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 != 0) || > > > (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 != 0) || > > > (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 != 0)) { > > > warnx("m1 must be zero for convex curve: %s", pa->qname); > > > return (-1); > > > } > > > Seems like a bug to me. Maybe rtsc should be changed to lssc and ulsc > > respectively on 712 and 713 line. > > indeed. > 1.24 (henning 17-Dec-02): if ((opts->rtsc_m1 > 0 && opts->rtsc_m2 == 0) || > 1.24 (henning 17-Dec-02): (opts->lssc_m1 > 0 && opts->lssc_m2 == 0) || > 1.24 (henning 17-Dec-02): (opts->ulsc_m1 > 0 && opts->ulsc_m2 == 0)) { > > almost 4 years, and nobody noticed ;( > > Index: pfctl_altq.c > =================================================================== > RCS file: /cvs/src/sbin/pfctl/pfctl_altq.c,v > retrieving revision 1.90 > diff -u -p -r1.90 pfctl_altq.c > --- pfctl_altq.c 10 Nov 2006 06:07:11 -0000 1.90 > +++ pfctl_altq.c 27 Nov 2006 14:19:45 -0000 > @@ -680,8 +680,8 @@ eval_pfqueue_hfsc(struct pfctl *pf, stru > } > > if ((opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 != 0) || > - (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 != 0) || > - (opts->rtsc_m1 < opts->rtsc_m2 && opts->rtsc_m1 != 0)) { > + (opts->lssc_m1 < opts->lssc_m2 && opts->lssc_m1 != 0) || > + (opts->ulsc_m1 < opts->ulsc_m2 && opts->ulsc_m1 != 0)) { > warnx("m1 must be zero for convex curve: %s", pa->qname); > return (-1); > } > > > > -- There are seven words in this sentence.