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
This commit is contained in:
Navdeep Parhar
2023-07-19 10:56:03 -07:00
parent 8d0cab8800
commit c721694a1c
+2 -2
View File
@@ -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;
}