pfctl

Henning Brauer henning at openbsd.org
Mon Nov 27 14:27:53 UTC 2006


* Vasil Dimov <vd at 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);
 	}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20061127/70275e48/attachment.pgp


More information about the freebsd-hackers mailing list