Skip to content

Commit

Permalink
crypto/chcr: fix incorrect ipv6 packet length
Browse files Browse the repository at this point in the history
IPv6 header's payload length field shouldn't include IPv6 header length.

Signed-off-by: Rohit Maheshwari <rohitm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Rohit Maheshwari authored and David S. Miller committed Mar 30, 2020
1 parent ed64639 commit e14394e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/crypto/chelsio/chcr_ktls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e14394e

Please sign in to comment.