net: add a couple of helpers for iph tot_len
authorXin Long <lucien.xin@gmail.com>
Sat, 28 Jan 2023 15:58:30 +0000 (10:58 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jul 2023 14:22:00 +0000 (16:22 +0200)
commita6c9b0f7ba95311d797b6c5341b4e3ecdb920796
tree704c4a4ffa9a9384e2b81854c06d9f99f2ce3b47
parent201948effabfaf470249de25a6c747800f9a726c
net: add a couple of helpers for iph tot_len

[ Upstream commit 058a8f7f73aae1cc22b53fcefec031b9e391b54d ]

This patch adds three APIs to replace the iph->tot_len setting
and getting in all places where IPv4 BIG TCP packets may reach,
they will be used in the following patches.

Note that iph_totlen() will be used when iph is not in linear
data of the skb.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: b2dc32dcba08 ("net/sched: act_ipt: add sanity checks on skb before calling target")
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/ip.h
include/net/route.h