summaryrefslogtreecommitdiff
path: root/net/ipv6/exthdrs_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/exthdrs_core.c')
-rw-r--r--net/ipv6/exthdrs_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/exthdrs_core.c b/net/ipv6/exthdrs_core.c
index c5e83fae4df4..140748debc4a 100644
--- a/net/ipv6/exthdrs_core.c
+++ b/net/ipv6/exthdrs_core.c
@@ -115,7 +115,7 @@ EXPORT_SYMBOL(ipv6_skip_exthdr);
int ipv6_find_tlv(struct sk_buff *skb, int offset, int type)
{
const unsigned char *nh = skb_network_header(skb);
- int packet_len = skb->tail - skb->network_header;
+ int packet_len = skb_tail_pointer(skb) - skb_network_header(skb);
struct ipv6_opt_hdr *hdr;
int len;