Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Nov 2006 09:40:52 +0800
From:      "Earl Lapus" <earl.lapus@gmail.com>
To:        "Henning Brauer" <henning@openbsd.org>
Cc:        Ryan Thomas McBride <mcbride@cvs.openbsd.org>, Vasil Dimov <vd@freebsd.org>, mlaier@freebsd.org, freebsd-hackers@freebsd.org
Subject:   Re: pfctl
Message-ID:  <604f76120611271740g61c1a3a4pe8e9d37ab1df3f28@mail.gmail.com>
In-Reply-To: <20061127142312.17227.qmail@nudo.bsws.de>
References:  <604f76120611270203n3d065114vdbe8487cc04357e1@mail.gmail.com> <20061127125022.GA5690@qlovarnika.bg.datamax> <20061127142312.17227.qmail@nudo.bsws.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <henning@openbsd.org> wrote:
> * Vasil Dimov <vd@FreeBSD.org> [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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?604f76120611271740g61c1a3a4pe8e9d37ab1df3f28>