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.
Unified · Split
| @@ -157,7 +157,7 @@ void *ipvlan_get_L3_hdr(struct ipvl_port *port, struct sk_buff *skb, int *type) · 156 unmodified lines | |||
| 157 | return NULL; | 157 | return NULL; |
| 158 | 158 | ||
| 159 | ip4h = ip_hdr(skb); | 159 | ip4h = ip_hdr(skb); |
| 160 | pktlen = ntohs(ip4h->tot_len); | 160 | pktlen = skb_ip_totlen(skb); |
| 161 | if (ip4h->ihl < 5 || ip4h->version != 4) | 161 | if (ip4h->ihl < 5 || ip4h->version != 4) |
| 162 | return NULL; | 162 | return NULL; |
| 163 | if (skb->len < pktlen || pktlen < (ip4h->ihl * 4)) | 163 | if (skb->len < pktlen || pktlen < (ip4h->ihl * 4)) |