History

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.

Xin Long committed 3 years ago

Commit 50e6fb51 parent 7eb072b1 file · +1 −1Browse files

Unified · Split

drivers/net/ipvlan/ipvlan_core.c+1−1
@@ -157,7 +157,7 @@ void *ipvlan_get_L3_hdr(struct ipvl_port *port, struct sk_buff *skb, int *type) · 156 unmodified lines
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))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t