git: c721694a1ca8 - main - ktls_alloc_rcv_tag: Fix capability checks for RXTLS4/6.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 19 Jul 2023 18:17:12 UTC
The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=c721694a1ca8c1649b32a1ea6faa79a606cd19a6 commit c721694a1ca8c1649b32a1ea6faa79a606cd19a6 Author: Navdeep Parhar <np@FreeBSD.org> AuthorDate: 2023-07-19 17:56:03 +0000 Commit: Navdeep Parhar <np@FreeBSD.org> CommitDate: 2023-07-19 18:12:14 +0000 ktls_alloc_rcv_tag: Fix capability checks for RXTLS4/6. IFCAP2_* has the bit position and not the shifted value. Reviewed by: kib@ MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41100 --- sys/kern/uipc_ktls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index df4fe4b77c04..750e612cb273 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -993,12 +993,12 @@ ktls_alloc_rcv_tag(struct inpcb *inp, struct ktls_session *tls, INP_RUNLOCK(inp); if (inp->inp_vflag & INP_IPV6) { - if ((if_getcapenable2(ifp) & IFCAP2_RXTLS6) == 0) { + if ((if_getcapenable2(ifp) & IFCAP2_BIT(IFCAP2_RXTLS6)) == 0) { error = EOPNOTSUPP; goto out; } } else { - if ((if_getcapenable2(ifp) & IFCAP2_RXTLS4) == 0) { + if ((if_getcapenable2(ifp) & IFCAP2_BIT(IFCAP2_RXTLS4)) == 0) { error = EOPNOTSUPP; goto out; }