summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2016-03-22 23:51:02 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2016-03-22 23:51:02 +0000
commit424e8193dcf1d820e01f18b44e49dd9ec567d8f8 (patch)
treecb8097e045a4049a89f1b1ee266156a780cf3229
parent9ebff3fcbc98d8072d86536cb0b0b9347bef4bc9 (diff)
replace m_copym2 with m_dup_pkt
this gives us preallocated space at the start of the packet for headers so later calls to M_PREPEND are far less likely to fail. ok yasuoka@
-rw-r--r--sys/net/pipex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/pipex.c b/sys/net/pipex.c
index c79c41953e4..13de69bfe55 100644
--- a/sys/net/pipex.c
+++ b/sys/net/pipex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pipex.c,v 1.85 2016/03/04 22:38:23 sashan Exp $ */
+/* $OpenBSD: pipex.c,v 1.86 2016/03/22 23:51:01 dlg Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -2568,7 +2568,7 @@ pipex_mppe_output(struct mbuf *m0, struct pipex_session *session,
*/
for (m = m0; m != NULL; m = m->m_next) {
if (M_READONLY(m)) {
- m = m_copym2(m0, 0, M_COPYALL, M_NOWAIT);
+ m = m_dup_pkt(m0, max_linkhdr, M_NOWAIT);
if (m == NULL)
goto drop;
m_freem(m0);