[SK_BUFF]: Introduce skb_network_offset()
For the quite common 'skb->nh.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
e7dd65dafd
commit
bbe735e424
@@ -1121,7 +1121,7 @@ isdn_net_adjust_hdr(struct sk_buff *skb, struct net_device *dev)
|
||||
if (!skb)
|
||||
return;
|
||||
if (lp->p_encap == ISDN_NET_ENCAP_ETHER) {
|
||||
int pullsize = (ulong)skb->nh.raw - (ulong)skb->data - ETH_HLEN;
|
||||
const int pullsize = skb_network_offset(skb) - ETH_HLEN;
|
||||
if (pullsize > 0) {
|
||||
printk(KERN_DEBUG "isdn_net: Pull junk %d\n", pullsize);
|
||||
skb_pull(skb, pullsize);
|
||||
|
Reference in New Issue
Block a user