Skip to content

Commit 50e6fb5

Browse files
lxinkuba-moo
authored andcommitted
ipvlan: use skb_ip_totlen in ipvlan_get_L3_hdr
ipvlan devices calls netif_inherit_tso_max() to get the tso_max_size/segs from the lower device, so when lower device supports BIG TCP, the ipvlan devices support it too. We also should consider its iph tot_len accessing. Signed-off-by: Xin Long <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 7eb072b commit 50e6fb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ipvlan/ipvlan_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void *ipvlan_get_L3_hdr(struct ipvl_port *port, struct sk_buff *skb, int *type)
157157
return NULL;
158158

159159
ip4h = ip_hdr(skb);
160-
pktlen = ntohs(ip4h->tot_len);
160+
pktlen = skb_ip_totlen(skb);
161161
if (ip4h->ihl < 5 || ip4h->version != 4)
162162
return NULL;
163163
if (skb->len < pktlen || pktlen < (ip4h->ihl * 4))

0 commit comments

Comments
 (0)