Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5d5deca authored by Jason Wang's avatar Jason Wang Committed by David S. Miller
Browse files

net: core: let skb_partial_csum_set() set transport header



For untrusted packets with partial checksum, we need to set the transport header
for precise packet length estimation. We can just let skb_pratial_csum_set() to
do this to avoid extra call to skb_flow_dissect() and simplify the caller.

Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7d3ac5c7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3370,6 +3370,7 @@ bool skb_partial_csum_set(struct sk_buff *skb, u16 start, u16 off)
	skb->ip_summed = CHECKSUM_PARTIAL;
	skb->csum_start = skb_headroom(skb) + start;
	skb->csum_offset = off;
	skb_set_transport_header(skb, start);
	return true;
}
EXPORT_SYMBOL_GPL(skb_partial_csum_set);