HomeFreeBSD

ipfw: fix matching and setting DSCP value for IPv6

Description

ipfw: fix matching and setting DSCP value for IPv6

Matching for DSCP codes has used incorrect bits. Use IPV6_DSCP()
macro for matching opcodes to fix this. Also this leads to always
use value from a mbuf instead of cached value.

Previously different opcodes have used both cached in f_id value
and stored in the mbuf, and it did not always work after setdscp
action, since cached value was not updated.

Update IPv6 flowid value cached in the f_id.flow_id6 when we do
modification of DSCP value in O_SETDSCP opcode, it may be used by
external modules.

Also added logging support for O_SETDSCP opcode.

Reviewed by: kp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34807

Details

Provenance
aeAuthored on Apr 6 2022, 6:43 PM
Reviewer
kp
Differential Revision
D34807: ipfw: fix matching and setting DSCP value for IPv6
Parents
rG567378cc0796: Fix OID format for `vm.swap_reserved` and `vm.swap_total`
Branches
Unknown
Tags
Unknown