summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorShan Wei2011-04-22 13:07:41 +0200
committerDavid S. Miller2011-04-28 22:28:57 +0200
commit96339d6c490a32de35fa798ca7922d13a8538ecd (patch)
treebfeab66ca069f4c4d99f30c2da23ae7c78c139e2 /net/ipv6
parentinet: add RCU protection to inet->opt (diff)
downloadkernel-qcow2-linux-96339d6c490a32de35fa798ca7922d13a8538ecd.tar.gz
kernel-qcow2-linux-96339d6c490a32de35fa798ca7922d13a8538ecd.tar.xz
kernel-qcow2-linux-96339d6c490a32de35fa798ca7922d13a8538ecd.zip
net:use help function of skb_checksum_start_offset to calculate offset
Although these are equivalent, but the skb_checksum_start_offset() is more readable. Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/udp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 98ecfd7359e2..fc0c42a88e54 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -1328,7 +1328,7 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb, u32 features)
/* Do software UFO. Complete and fill in the UDP checksum as HW cannot
* do checksum of UDP packets sent as multiple IP fragments.
*/
- offset = skb->csum_start - skb_headroom(skb);
+ offset = skb_checksum_start_offset(skb);
csum = skb_checksum(skb, offset, skb->len- offset, 0);
offset += skb->csum_offset;
*(__sum16 *)(skb->data + offset) = csum_fold(csum);