summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip6.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip6.h b/sys/netinet/ip6.h
index c189cc9d5f3..c86728cdbc8 100644
--- a/sys/netinet/ip6.h
+++ b/sys/netinet/ip6.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6.h,v 1.7 2001/06/09 07:03:41 angelos Exp $ */
+/* $OpenBSD: ip6.h,v 1.8 2001/07/05 23:41:34 itojun Exp $ */
/* $KAME: ip6.h,v 1.14 2000/10/09 01:04:09 itojun Exp $ */
/*
@@ -280,8 +280,8 @@ do { \
#define IP6_EXTHDR_GET0(val, typ, m, off, len) \
do { \
struct mbuf *t; \
- if ((off) == 0) \
- (val) = (typ)mtod(m, caddr_t); \
+ if ((off) == 0 && (m)->m_len >= len) \
+ (val) = (typ)mtod((m), caddr_t); \
else { \
t = m_pulldown((m), (off), (len), NULL); \
if (t) { \