diff options
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r-- | net/ipv6/icmp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index d3edc3cf1ce9..e94992ab92e6 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -317,7 +317,8 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, | |||
317 | int hlimit, tclass; | 317 | int hlimit, tclass; |
318 | int err = 0; | 318 | int err = 0; |
319 | 319 | ||
320 | if ((u8*)hdr < skb->head || (u8*)(hdr+1) > skb->tail) | 320 | if ((u8 *)hdr < skb->head || |
321 | (skb->network_header + sizeof(*hdr)) > skb->tail) | ||
321 | return; | 322 | return; |
322 | 323 | ||
323 | /* | 324 | /* |