aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2013-03-26 23:11:20 +0000
committerDavid S. Miller <davem@davemloft.net>2013-03-27 12:48:31 -0400
commite5d5decaedf41f5b03e6819789cc3ba8744d9f54 (patch)
tree741999a3d63a2d816a844d21cbe976231875d67c /net/core/skbuff.c
parentptp_pch: eliminate a number of sparse warnings (diff)
downloadlinux-dev-e5d5decaedf41f5b03e6819789cc3ba8744d9f54.tar.xz
linux-dev-e5d5decaedf41f5b03e6819789cc3ba8744d9f54.zip
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: Jason Wang <jasowang@redhat.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r--net/core/skbuff.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 31c6737d3189..ba646145cd5c 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -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);