Skip to content

Commit

Permalink
openvswitch: use skb_ip_totlen in conntrack
Browse files Browse the repository at this point in the history
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 <lucien.xin@gmail.com>
Reviewed-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Xin Long authored and Jakub Kicinski committed Feb 2, 2023
1 parent 46abd17 commit ec84c95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/openvswitch/conntrack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ec84c95

Please sign in to comment.