aboutsummaryrefslogtreecommitdiff
path: root/sys/net/altq/altq_subr.c
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2021-05-10 14:30:44 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2021-05-10 14:30:44 +0000
commitb7622437f5fb6bce84b42f3607e86729ad2a84b6 (patch)
tree174b23e79c9e495eb87458ad88c791d009295589 /sys/net/altq/altq_subr.c
parenta122a5ebdee28f7bbd50d21558a7328bf730c195 (diff)
downloadsrc-b7622437f5fb6bce84b42f3607e86729ad2a84b6.tar.gz
src-b7622437f5fb6bce84b42f3607e86729ad2a84b6.zip
net: Introduce IPV6_DSCP(), IPV6_ECN() and IPV6_TRAFFIC_CLASS() macros
Introduce convenience macros to retrieve the DSCP, ECN or traffic class bits from an IPv6 header. Use them where appropriate. Reviewed by: ae (previous version), rscheff, tuexen, rgrimes Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29056 (cherry picked from commit bb4a7d94b99fbf7f59c876ffff8ded5f6a5b5c3e)
Diffstat (limited to 'sys/net/altq/altq_subr.c')
-rw-r--r--sys/net/altq/altq_subr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c
index 9d998c40485c..ba1d3af5f5fd 100644
--- a/sys/net/altq/altq_subr.c
+++ b/sys/net/altq/altq_subr.c
@@ -1063,7 +1063,7 @@ altq_extractflow(m, af, flow, filt_bmask)
fin6->fi6_family = AF_INET6;
fin6->fi6_proto = ip6->ip6_nxt;
- fin6->fi6_tclass = (ntohl(ip6->ip6_flow) >> 20) & 0xff;
+ fin6->fi6_tclass = IPV6_TRAFFIC_CLASS(ip6);
fin6->fi6_flowlabel = ip6->ip6_flow & htonl(0x000fffff);
fin6->fi6_src = ip6->ip6_src;