From: Xin Long Date: Sat, 28 Jan 2023 15:58:32 +0000 (-0500) Subject: openvswitch: use skb_ip_totlen in conntrack X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ec84c955a0d06cef31664bae328d94be7a3e2f03;p=linux.git openvswitch: use skb_ip_totlen in conntrack IPv4 GSO packets may get processed in ovs_skb_network_trim(), and we need to use skb_ip_totlen() to get iph totlen. Signed-off-by: Xin Long Reviewed-by: Aaron Conole Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski --- diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index c8b137649ca46..2172930b1f170 100644 --- a/net/openvswitch/conntrack.c +++ b/net/openvswitch/conntrack.c @@ -1103,7 +1103,7 @@ static int ovs_skb_network_trim(struct sk_buff *skb) switch (skb->protocol) { case htons(ETH_P_IP): - len = ntohs(ip_hdr(skb)->tot_len); + len = skb_ip_totlen(skb); break; case htons(ETH_P_IPV6): len = sizeof(struct ipv6hdr)