crypto/chcr: fix incorrect ipv6 packet length
Subsystems (4)
PATCH 1/1 crypto/chcr: fix incorrect ipv6 packet length
IPv6 header's payload length field shouldn't include IPv6 header length.
Signed-off-by Rohit Maheshwari <[email protected]>
--- drivers/crypto/chelsio/chcr_ktls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/chelsio/chcr_ktls.c +1 -1
@@ -981,7 +981,7 @@ chcr_ktls_write_tcp_options(struct chcr_ktls_info *tx_info, struct sk_buff *skb, ip->tot_len =htons (pktlen - maclen); }else { ip6 = (struct ipv6hdr *)(buf + maclen); - ip6->payload_len =htons (pktlen - maclen); + ip6->payload_len =htons (pktlen - maclen - iplen); }/* now take care of the tcp header, if fin is not set then clear push * bit as well, and if fin is set, it will be sent at the last so we
Signature · 1 line
2.18.1
From: Rohit Maheshwari <[email protected]>
Date: Mon, 30 Mar 2020 21:41:22 +0530
Quoted 3 lines
IPv6 header's payload length field shouldn't include IPv6 header length.
Signed-off-by Rohit Maheshwari <[email protected]>
Applied.