diff options
author | Arnaldo Carvalho de Melo | 2007-03-20 02:29:03 +0100 |
---|---|---|
committer | David S. Miller | 2007-04-26 07:26:38 +0200 |
commit | 6b88dd966b42e374dc783c397efc15f5c1458265 (patch) | |
tree | 4876e6953c2281231be8b0ce9724f31a6e012a28 /net/ipv6/netfilter/ip6_tables.c | |
parent | [NETLINK]: Use nlmsg_trim() where appropriate (diff) | |
download | kernel-qcow2-linux-6b88dd966b42e374dc783c397efc15f5c1458265.tar.gz kernel-qcow2-linux-6b88dd966b42e374dc783c397efc15f5c1458265.tar.xz kernel-qcow2-linux-6b88dd966b42e374dc783c397efc15f5c1458265.zip |
[SK_BUFF] ipv6: Use skb_network_offset in some more places
So that we reduce the number of direct accesses to skb->data.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'net/ipv6/netfilter/ip6_tables.c')
-rw-r--r-- | net/ipv6/netfilter/ip6_tables.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index caf9e375a0f1..b97aedce62ae 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c @@ -1448,7 +1448,7 @@ static void __exit ip6_tables_fini(void) int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, int target, unsigned short *fragoff) { - unsigned int start = (u8 *)(ipv6_hdr(skb) + 1) - skb->data; + unsigned int start = skb_network_offset(skb) + sizeof(struct ipv6hdr); u8 nexthdr = ipv6_hdr(skb)->nexthdr; unsigned int len = skb->len - start; |