From: Rohit Maheshwari Date: Mon, 30 Mar 2020 16:11:22 +0000 (+0530) Subject: crypto/chcr: fix incorrect ipv6 packet length X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e14394e656855c218c0c6cf918c550d5fdc1401d;p=linux.git crypto/chcr: fix incorrect ipv6 packet length IPv6 header's payload length field shouldn't include IPv6 header length. Signed-off-by: Rohit Maheshwari Signed-off-by: David S. Miller --- diff --git a/drivers/crypto/chelsio/chcr_ktls.c b/drivers/crypto/chelsio/chcr_ktls.c index 00099e793e631..73658b71d4a35 100644 --- a/drivers/crypto/chelsio/chcr_ktls.c +++ b/drivers/crypto/chelsio/chcr_ktls.c @@ -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