Avoid infinite loop if nicmp6 and nip6 are not on the same mbuf.
NetBSD PR 34994+35333 MFC after: 3 days
This commit is contained in:
parent
e9f0620b9f
commit
6a550ab34b
@ -588,7 +588,8 @@ icmp6_input(mp, offp, proto)
|
|||||||
n->m_next = n0;
|
n->m_next = n0;
|
||||||
} else {
|
} else {
|
||||||
nip6 = mtod(n, struct ip6_hdr *);
|
nip6 = mtod(n, struct ip6_hdr *);
|
||||||
nicmp6 = (struct icmp6_hdr *)((caddr_t)nip6 + off);
|
IP6_EXTHDR_GET(nicmp6, struct icmp6_hdr *, n, off,
|
||||||
|
sizeof(*nicmp6));
|
||||||
noff = off;
|
noff = off;
|
||||||
}
|
}
|
||||||
nicmp6->icmp6_type = ICMP6_ECHO_REPLY;
|
nicmp6->icmp6_type = ICMP6_ECHO_REPLY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user