From owner-freebsd-pf@freebsd.org Thu Oct 6 09:03:47 2016 Return-Path: Delivered-To: freebsd-pf@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 20034BD3AA9 for ; Thu, 6 Oct 2016 09:03:47 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E028D78E for ; Thu, 6 Oct 2016 09:03:46 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [192.168.228.1] (vega.codepro.be [IPv6:2a01:4f8:162:1127::3]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 22E821567D; Thu, 6 Oct 2016 11:03:45 +0200 (CEST) From: "Kristof Provost" To: "Franco Fichtner" Cc: "Eugene M. Zheganin" , "freebsd-pf@freebsd.org" Subject: Re: dscp set/get Date: Thu, 06 Oct 2016 11:03:45 +0200 Message-ID: In-Reply-To: References: <57F5D9D2.1060103@norma.perm.ru> <311888F1-3BD6-4C4E-818D-C4A9C00B55ED@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; markup=markdown Content-Transfer-Encoding: 8bit X-Mailer: MailMate (2.0BETAr6056) X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2016 09:03:47 -0000 On 6 Oct 2016, at 10:30, Franco Fichtner wrote: >> On 06 Oct 2016, at 10:10 AM, Kristof Provost wrote: >> >> On 6 Oct 2016, at 6:57, Eugene M. Zheganin wrote: >>> pf still lacks the DSCP handling, will it be difficult/expensive to >>> add >>> this ? AFAIK ipfw got this recently. >>> >> pf has set-tos and tos keywords. What is it not letting you do? > > I think it works already with the plain hex/decimal values given, > though we're missing OpenBSD's parser support for special DSCP > options with its funky naming: > > "This rule applies to packets with the specified TOS bits set. string > may be one of critical, inetcontrol, lowdelay, netcontrol,throughput, > reliability, or one of the DiffServ Code Points: ef, af11 ... af43, > cs0 ... cs7; number may be either a hex or decimal number." > > http://man.openbsd.org/OpenBSD-current/man5/pf.conf.5 > > Looks like pfctl(8) is the only thing to "fix" here. I'll take a > look. > Oh, yes, if you want those constants that should be a straightforward port of their changes to parse.y. I have no objections to including that. It’s another (small) step in bringing our pf closer to openbsd pf. Regards, Kristof