diff options
author | Xin Long <lucien.xin@gmail.com> | 2023-01-28 16:58:36 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-02-02 05:54:27 +0100 |
commit | 50e6fb5c6efb2b33b15ea490dfe355cb312f6eb5 (patch) | |
tree | f7a89acabdbc7d19a6b01d0cd67ae2c272985f37 /drivers/net/ipvlan | |
parent | cipso_ipv4: use iph_set_totlen in skbuff_setattr (diff) | |
download | linux-50e6fb5c6efb2b33b15ea490dfe355cb312f6eb5.tar.xz linux-50e6fb5c6efb2b33b15ea490dfe355cb312f6eb5.zip |
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 <lucien.xin@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ipvlan')
-rw-r--r-- | drivers/net/ipvlan/ipvlan_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c index bb1c298c1e78..460b3d4f2245 100644 --- a/drivers/net/ipvlan/ipvlan_core.c +++ b/drivers/net/ipvlan/ipvlan_core.c @@ -157,7 +157,7 @@ void *ipvlan_get_L3_hdr(struct ipvl_port *port, struct sk_buff *skb, int *type) return NULL; ip4h = ip_hdr(skb); - pktlen = ntohs(ip4h->tot_len); + pktlen = skb_ip_totlen(skb); if (ip4h->ihl < 5 || ip4h->version != 4) return NULL; if (skb->len < pktlen || pktlen < (ip4h->ihl * 4)) |