Skip to content

Commit ec84c95

Browse files
lxinkuba-moo
authored andcommitted
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 <[email protected]> Reviewed-by: Aaron Conole <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 46abd17 commit ec84c95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/openvswitch/conntrack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ static int ovs_skb_network_trim(struct sk_buff *skb)
11031103

11041104
switch (skb->protocol) {
11051105
case htons(ETH_P_IP):
1106-
len = ntohs(ip_hdr(skb)->tot_len);
1106+
len = skb_ip_totlen(skb);
11071107
break;
11081108
case htons(ETH_P_IPV6):
11091109
len = sizeof(struct ipv6hdr)

0 commit comments

Comments
 (0)