diff options
author | Kristof Provost <kp@FreeBSD.org> | 2021-03-03 20:33:42 +0000 |
---|---|---|
committer | Kristof Provost <kp@FreeBSD.org> | 2021-03-19 22:38:50 +0000 |
commit | e7e1836a0efadfdb5f8e8e4c7ad41f1211f55f2d (patch) | |
tree | effbaf6b021aca368872f3fc1bb6c2a0445164e3 | |
parent | d9653edbaeae779ed331d1d7331ded1348f2b980 (diff) |
pf: Retrieve DSCP value from the IPv6 header
Teach pf to read the DSCP value from the IPv6 header so that we can
match on them.
Reviewed by: donner
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29048
(cherry picked from commit f19323847ca894af8a58839f6a2a41691a8e2245)
-rw-r--r-- | sys/netpfil/pf/pf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index d4101aab9332..625b1d6e32ca 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6481,7 +6481,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb pd.sidx = (dir == PF_IN) ? 0 : 1; pd.didx = (dir == PF_IN) ? 1 : 0; pd.af = AF_INET6; - pd.tos = 0; + pd.tos = (ntohl(h->ip6_flow) >> 20) & 0xfc; pd.tot_len = ntohs(h->ip6_plen) + sizeof(struct ip6_hdr); off = ((caddr_t)h - m->m_data) + sizeof(struct ip6_hdr); |