Date: Sat, 20 Mar 2021 09:59:37 GMT From: Kristof Provost <kp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 3756d591f758 - stable/13 - pf: Retrieve DSCP value from the IPv6 header Message-ID: <202103200959.12K9xbwk063957@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3756d591f7583887168e51672cf9324c0996defe commit 3756d591f7583887168e51672cf9324c0996defe Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2021-03-03 20:33:42 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2021-03-19 22:38:50 +0000 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) --- sys/netpfil/pf/pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 86354e69d11f..f71f89187b58 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6384,7 +6384,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103200959.12K9xbwk063957>