summaryrefslogtreecommitdiff
path: root/net/sched/act_ct.c
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2023-01-28 10:58:33 -0500
committerJakub Kicinski <kuba@kernel.org>2023-02-01 20:54:27 -0800
commit043e397e48c58b4442ea5124dc1bdc95367a0a33 (patch)
tree0c9b6fd1b65b89f06afee50a2e35e1ecb52d3826 /net/sched/act_ct.c
parentec84c955a0d06cef31664bae328d94be7a3e2f03 (diff)
net: sched: use skb_ip_totlen and iph_totlen
There are 1 action and 1 qdisc that may process IPv4 TCP GSO packets and access iph->tot_len, replace them with skb_ip_totlen() and iph_totlen() accordingly. Note that we don't need to replace the one in tcf_csum_ipv4(), as it will return for TCP GSO packets in tcf_csum_ipv4_tcp(). Signed-off-by: Xin Long <lucien.xin@gmail.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/sched/act_ct.c')
-rw-r--r--net/sched/act_ct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c
index 0ca2bb8ed026..d68bb5dbf0dc 100644
--- a/net/sched/act_ct.c
+++ b/net/sched/act_ct.c
@@ -707,7 +707,7 @@ static int tcf_ct_skb_network_trim(struct sk_buff *skb, int family)
switch (family) {
case NFPROTO_IPV4:
- len = ntohs(ip_hdr(skb)->tot_len);
+ len = skb_ip_totlen(skb);
break;
case NFPROTO_IPV6:
len = sizeof(struct ipv6hdr)