dscp set/get

Kristof Provost kp at FreeBSD.org
Thu Oct 6 13:32:30 UTC 2016


On 6 Oct 2016, at 15:01, Mark Martinec wrote:
> Just adding recognition to a parser for a couple of DSCP constants
> to be mapped to TOS is not the solution. Keep in mind that DSCP
> is a 6-bit field, and TOS is an 8-bit field. The remaining two bits
> are used for ECN (Explicit Congestion Notification).
>
> Setting TOS field with the intention of changing DSCP
> clobbers ECN bits.  Pf needs a proper support for DSCP,
> currently it is unusable for this purpose in FreeBSD
> (one can use the PF from OpenBSD).
>

Hmm, that’s a good point.

OpenBSD seem to just always preserve the ECN bits (so there’s no dscp 
keyword).
Perhaps we should do the same.

Regards,
Kristof


More information about the freebsd-pf mailing list