Message ID | 8ea56cf09856cedfa4c7a3f6e266c84723de8544.1674921359.git.lucien.xin@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ec84c955a0d06cef31664bae328d94be7a3e2f03 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: support ipv4 big tcp | expand |
Xin Long <lucien.xin@gmail.com> writes: > 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>
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index c8b137649ca4..2172930b1f17 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)
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> --- net/openvswitch/conntrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)