summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2017-09-20 16:22:03 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2017-09-20 16:22:03 +0000
commit6bea77ad56d879d39c2afb8a2928e5fc9053babe (patch)
tree1eead4e86358277356e9c2e1848fb9985a7f84ec /sys
parentaeec692a2037035a2e3c927d5c61415289ebf88c (diff)
Use m_copym() instead of m_dup_pkt() to fix a kernel assert when
setting IP options. Issue reported by Kapetanakis Giannis OK mpi@
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 88824a5c1ef..028b7a67653 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_output.c,v 1.341 2017/09/01 15:05:31 mpi Exp $ */
+/* $OpenBSD: ip_output.c,v 1.342 2017/09/20 16:22:02 visa Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
@@ -1304,7 +1304,7 @@ ip_pcbopts(struct mbuf **pcbopt, struct mbuf *m)
}
if (m->m_len > MAX_IPOPTLEN + sizeof(struct in_addr))
return (EINVAL);
- *pcbopt = m_dup_pkt(m, 0, M_NOWAIT);
+ *pcbopt = m_copym(m, 0, M_COPYALL, M_NOWAIT);
if (*pcbopt == NULL)
return (ENOBUFS);