]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: Correct calculation using skb->tail and skb-network_header
authorSimon Horman <horms@verge.net.au>
Thu, 30 May 2013 16:39:29 +0000 (16:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 31 May 2013 23:38:25 +0000 (16:38 -0700)
commitc131c5c98733ded17b59337916671d1f5fab1179
tree74a40a22f9090d7ac1dfcf96fda3486e41cc8eea
parent7b2b48cf070c9d4c572546eb9ecee5b3b8372723
netfilter: Correct calculation using skb->tail and skb-network_header

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 whereas skb->network_header
will be an offset from head. This is corrected by using wrappers that
ensure that calculations are always made using pointers.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nf_nat_helper.c