net, ipv4, ipv6: Correct assignment of skb->network_header to skb->tail
authorSimon Horman <horms@verge.net.au>
Tue, 28 May 2013 20:34:29 +0000 (20:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 May 2013 06:49:07 +0000 (23:49 -0700)
commit7cc461900549fc480eb133948649a1edb7eaaa6f
tree32782f0156c0eb27b2b188d7882e9c2e77d7c8c5
parent158874cac61245b84e939c92c53db7000122b7b0
net, ipv4, ipv6: Correct assignment of skb->network_header to skb->tail

This corrects an regression introduced by "net: Use 16bits for *_headers
fields of struct skbuff" when NET_SKBUFF_DATA_USES_OFFSET is not set. In
that case skb->tail will be a pointer however skb->network_header is now
an offset.

This patch corrects the problem by adding a wrapper to return skb tail as
an offset regardless of the value of NET_SKBUFF_DATA_USES_OFFSET. It seems
that skb->tail that this offset may be more than 64k and some care has been
taken to treat such cases as an error.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
net/core/netpoll.c
net/core/pktgen.c
net/ipv4/ipmr.c