mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
ktls: Fix capability checks in ktls_reset_receive_tag()
IFCAP2_RXTLS4 and IFCAP2_RXTLS6 are bit numbers, not masks, so ktls_reset_receive_tag() tested if_capenable2 against 0 for IPv4 and against the RXTLS4 bit for IPv6. An IPv4 connection with NIC receive TLS offload thus never got a new receive tag after its packets moved to another interface, and fell back to software decryption for good.c721694fixed the same checks in ktls_alloc_rcv_tag(); use IFCAP2_BIT() here as well. Fixes:fe8c78f("ktls: Add full support for TLS RX offloading via network interface.") Approved by: gallatin, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D60757
This commit is contained in:
1 parent
c9599b8001
commit
32a981471c
1 file changed
+2
-2
@@ -1708,10 +1708,10 @@ ktls_reset_receive_tag(void *context, int pending)
|
||||
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)
|
||||
goto out;
|
||||
} else {
|
||||
if ((if_getcapenable2(ifp) & IFCAP2_RXTLS4) == 0)
|
||||
if ((if_getcapenable2(ifp) & IFCAP2_BIT(IFCAP2_RXTLS4)) == 0)
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user