summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2007-01-15 21:32:30 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2007-01-15 21:32:30 +0000
commitde2c7fd0d70a1310a4552965fb3132fa4aa93f24 (patch)
tree00faffa90971644bcd7a532db828d0eb4d466ef0
parent3a5e2d5cd5b7ca8d186e711132f0fd7d627e8df3 (diff)
fix infinite loop in case nip6 and nicmp6 are not on the same mbuf. NetBSD PR 34994+35333
-rw-r--r--sys/netinet6/icmp6.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 5fdac2d2f16..01f4d8fc492 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: icmp6.c,v 1.90 2006/12/09 01:12:28 itojun Exp $ */
+/* $OpenBSD: icmp6.c,v 1.91 2007/01/15 21:32:29 itojun Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@@ -619,6 +619,7 @@ icmp6_input(mp, offp, proto)
} else {
deliverecho:
nip6 = mtod(n, struct ip6_hdr *);
+ IP6_EXTHDR_GET(nicmp6, struct icmp6_hdr *, n, off, NULL);
nicmp6 = (struct icmp6_hdr *)((caddr_t)nip6 + off);
noff = off;
}