Author: jtl
Date: Fri Nov 2 19:14:15 2018
New Revision: 340077
URL: https://svnweb.freebsd.org/changeset/base/340077
Log:
m_pulldown() may reallocate n. Update the oip pointer after the
m_pulldown() call.
MFC after: 2 weeks
Sponsored by: Netflix
Modified:
head/sys/netinet/ip_icmp.c
Modified: head/sys/netinet/ip_icmp.c
==============================================================================
--- head/sys/netinet/ip_icmp.c Fri Nov 2 19:02:03 2018 (r340076)
+++ head/sys/netinet/ip_icmp.c Fri Nov 2 19:14:15 2018 (r340077)
@@ -264,6 +264,7 @@ icmp_error(struct mbuf *n, int type, int code, uint32_
if (n->m_len < oiphlen + tcphlen &&
(n = m_pullup(n, oiphlen + tcphlen)) == NULL)
goto freeit;
+ oip = mtod(n, struct ip *);
icmpelen = max(tcphlen, min(V_icmp_quotelen,
ntohs(oip->ip_len) - oiphlen));
} else if (oip->ip_p == IPPROTO_SCTP) {
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"