aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/ip6.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/ip6.h')
-rw-r--r--sys/netinet/ip6.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip6.h b/sys/netinet/ip6.h
index 1bc79a98e689..6617e1ca7d00 100644
--- a/sys/netinet/ip6.h
+++ b/sys/netinet/ip6.h
@@ -106,9 +106,9 @@ struct ip6_hdr {
#endif
#define IPV6_FLOWLABEL_LEN 20
-#define IPV6_TRAFFIC_CLASS(ip6) ((ntohl((ip6)->ip6_flow) >> 20) & 0xff)
-#define IPV6_DSCP(ip6) ((ntohl((ip6)->ip6_flow) >> 20) & 0xfc)
-#define IPV6_ECN(ip6) ((ntohl((ip6)->ip6_flow) >> 20) & 0x03)
+#define IPV6_TRAFFIC_CLASS(ip6) ((ntohl((ip6)->ip6_flow) >> IPV6_FLOWLABEL_LEN) & 0xff)
+#define IPV6_DSCP(ip6) ((ntohl((ip6)->ip6_flow) >> IPV6_FLOWLABEL_LEN) & 0xfc)
+#define IPV6_ECN(ip6) ((ntohl((ip6)->ip6_flow) >> IPV6_FLOWLABEL_LEN) & 0x03)
/*
* Extension Headers