Page MenuHomeFreeBSD

D17909.diff
No OneTemporary

D17909.diff

Index: head/sys/netinet/ip_icmp.c
===================================================================
--- head/sys/netinet/ip_icmp.c
+++ head/sys/netinet/ip_icmp.c
@@ -320,7 +320,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
@@ -362,6 +363,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;

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 26, 11:23 PM (11 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15608915
Default Alt Text
D17909.diff (798 B)

Event Timeline