[SK_BUFF]: Introduce skb_transport_offset()
For the quite common 'skb->h.raw - skb->data' sequence. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
badff6d01a
commit
ea2ae17d64
@@ -435,7 +435,7 @@ static void udp4_hwcsum_outgoing(struct sock *sk, struct sk_buff *skb,
|
||||
* fragments on the socket so that all csums of sk_buffs
|
||||
* should be together
|
||||
*/
|
||||
offset = skb->h.raw - skb->data;
|
||||
offset = skb_transport_offset(skb);
|
||||
skb->csum = skb_checksum(skb, offset, skb->len - offset, 0);
|
||||
|
||||
skb->ip_summed = CHECKSUM_NONE;
|
||||
|
Reference in New Issue
Block a user