svn commit: r333068 - head/sys/dev/cxgbe/tom
John Baldwin
jhb at FreeBSD.org
Fri Apr 27 17:20:24 UTC 2018
Author: jhb
Date: Fri Apr 27 17:20:23 2018
New Revision: 333068
URL: https://svnweb.freebsd.org/changeset/base/333068
Log:
Use the correct key address when renegotiating the transmit key.
Previously, get_keyid() was returning the address of the receive key
instead of the transmit key when renegotiating the transmit key. This
could either hang the card (if a connection was only offloading TLS TX
and thus had a receive key address of -1) or cause the connection to
fail by overwriting the wrong key (if both RX and TX TLS were
offloaded).
Submitted by: Harsh Jain @ Chelsio
Sponsored by: Chelsio Communications
Modified:
head/sys/dev/cxgbe/tom/t4_tls.c
Modified: head/sys/dev/cxgbe/tom/t4_tls.c
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_tls.c Fri Apr 27 16:34:28 2018 (r333067)
+++ head/sys/dev/cxgbe/tom/t4_tls.c Fri Apr 27 17:20:23 2018 (r333068)
@@ -488,7 +488,7 @@ static int
get_keyid(struct tls_ofld_info *tls_ofld, unsigned int ops)
{
return (ops & KEY_WRITE_RX ? tls_ofld->rx_key_addr :
- ((ops & KEY_WRITE_TX) ? tls_ofld->rx_key_addr : -1));
+ ((ops & KEY_WRITE_TX) ? tls_ofld->tx_key_addr : -1));
}
static int
More information about the svn-src-all
mailing list