From b729e0e88e8eb94f92de1d61b3fe924459334f33 Mon Sep 17 00:00:00 2001 From: Kaustubh Pandey Date: Tue, 28 Dec 2021 14:20:39 -0800 Subject: [PATCH] rmnet_core: pass correct length to ip_fast_csum ip_fast_csum() takes in the header length in 4-byte words, not the length in bytes. Change-Id: Ib3941876e21260aad32ed761427714e133220cfb Signed-off-by: Sean Tranchetti Signed-off-by: Kaustubh Pandey --- core/rmnet_descriptor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/rmnet_descriptor.c b/core/rmnet_descriptor.c index dc0fb7581bf9e..80834676724f3 100644 --- a/core/rmnet_descriptor.c +++ b/core/rmnet_descriptor.c @@ -1,5 +1,5 @@ /* Copyright (c) 2013-2020, The Linux Foundation. All rights reserved. - * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1447,7 +1447,7 @@ static int rmnet_frag_checksum_pkt(struct rmnet_frag_descriptor *frag_desc) csum_len -= frag_desc->ip_len; /* IPv4 checksum must be valid */ - if (ip_fast_csum((u8 *)iph, frag_desc->ip_len)) { + if (ip_fast_csum((u8 *)iph, iph->ihl)) { priv->stats.csum_sw++; return 0; }