I'm very pleased to announce the release of our new website and documentation using the new toolchain with Hugo and AsciiDoctor. To get more information about the new toolchain please read the FreeBSD Documentation Project Primer[1], Hugo docs[2] and AsciiDoctor docs[3]. Acknowledgment: Benedict Reuschling <bcr@> Glen Barber <gjb@> Hiroki Sato <hrs@> Li-Wen Hsu <lwhsu@> Sean Chittenden <seanc@> The FreeBSD Foundation [1] https://docs.FreeBSD.org/en/books/fdp-primer/ [2] https://gohugo.io/documentation/ [3] https://docs.asciidoctor.org/home/ Approved by: doceng, core
21 lines
691 B
Diff
21 lines
691 B
Diff
--- sys/netinet/ip_icmp.c.orig
|
|
+++ sys/netinet/ip_icmp.c
|
|
@@ -310,7 +310,8 @@
|
|
#endif
|
|
icmplen = min(icmplen, M_TRAILINGSPACE(m) -
|
|
sizeof(struct ip) - ICMP_MINLEN);
|
|
- m_align(m, ICMP_MINLEN + icmplen);
|
|
+ m_align(m, sizeof(struct ip) + ICMP_MINLEN + icmplen);
|
|
+ m->m_data += sizeof(struct ip);
|
|
m->m_len = ICMP_MINLEN + icmplen;
|
|
|
|
/* XXX MRT make the outgoing packet use the same FIB
|
|
@@ -352,6 +353,8 @@
|
|
* reply should bypass as well.
|
|
*/
|
|
m->m_flags |= n->m_flags & M_SKIP_FIREWALL;
|
|
+ KASSERT(M_LEADINGSPACE(m) >= sizeof(struct ip),
|
|
+ ("insufficient space for ip header"));
|
|
m->m_data -= sizeof(struct ip);
|
|
m->m_len += sizeof(struct ip);
|
|
m->m_pkthdr.len = m->m_len;
|