From 8927f87fca5a2fb9c1929f31e1f36bd1f5eaa225 Mon Sep 17 00:00:00 2001 From: dlg Date: Mon, 15 Aug 2016 11:35:25 +0000 Subject: [PATCH] replace the last uses of m_copym2 with m_dup_pkt. ok mpi@ visa@ --- sys/net/pfkey.c | 4 ++-- sys/netinet/ip_ah.c | 4 ++-- sys/netinet/ip_esp.c | 4 ++-- sys/netinet/ip_ipcomp.c | 4 ++-- sys/netinet/ip_output.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/net/pfkey.c b/sys/net/pfkey.c index 66c08935876..f4b8e7608e9 100644 --- a/sys/net/pfkey.c +++ b/sys/net/pfkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkey.c,v 1.29 2016/03/22 11:53:21 dlg Exp $ */ +/* $OpenBSD: pfkey.c,v 1.30 2016/08/15 11:35:25 dlg Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) 17 January 1995 @@ -142,7 +142,7 @@ pfkey_sendup(struct socket *socket, struct mbuf *packet, int more) int s; if (more) { - if (!(packet2 = m_copym2(packet, 0, M_COPYALL, M_DONTWAIT))) + if (!(packet2 = m_dup_pkt(packet, 0, M_DONTWAIT))) return (ENOMEM); } else packet2 = packet; diff --git a/sys/netinet/ip_ah.c b/sys/netinet/ip_ah.c index 92105cf27d6..1fc2c149378 100644 --- a/sys/netinet/ip_ah.c +++ b/sys/netinet/ip_ah.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ah.c,v 1.119 2016/03/07 18:44:00 naddy Exp $ */ +/* $OpenBSD: ip_ah.c,v 1.120 2016/08/15 11:35:25 dlg Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -1048,7 +1048,7 @@ ah_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, if (mi != NULL) { /* Replace the rest of the mbuf chain. */ - struct mbuf *n = m_copym2(mi, 0, M_COPYALL, M_DONTWAIT); + struct mbuf *n = m_dup_pkt(mi, 0, M_DONTWAIT); if (n == NULL) { ahstat.ahs_hdrops++; diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c index 48a555f3edf..4b44c77c76c 100644 --- a/sys/netinet/ip_esp.c +++ b/sys/netinet/ip_esp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_esp.c,v 1.137 2016/03/07 18:44:00 naddy Exp $ */ +/* $OpenBSD: ip_esp.c,v 1.138 2016/08/15 11:35:25 dlg Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -895,7 +895,7 @@ esp_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, if (mi != NULL) { /* Replace the rest of the mbuf chain. */ - struct mbuf *n = m_copym2(mi, 0, M_COPYALL, M_DONTWAIT); + struct mbuf *n = m_dup_pkt(mi, 0, M_DONTWAIT); if (n == NULL) { DPRINTF(("esp_output(): bad mbuf chain, SA %s/%08x\n", diff --git a/sys/netinet/ip_ipcomp.c b/sys/netinet/ip_ipcomp.c index fd7c49739ae..27bc2f381cc 100644 --- a/sys/netinet/ip_ipcomp.c +++ b/sys/netinet/ip_ipcomp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipcomp.c,v 1.44 2015/07/15 22:16:42 deraadt Exp $ */ +/* $OpenBSD: ip_ipcomp.c,v 1.45 2016/08/15 11:35:25 dlg Exp $ */ /* * Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org) @@ -473,7 +473,7 @@ ipcomp_output(m, tdb, mp, skip, protoff) if (mi != NULL) { /* Replace the rest of the mbuf chain. */ - struct mbuf *n = m_copym2(mi, 0, M_COPYALL, M_DONTWAIT); + struct mbuf *n = m_dup_pkt(mi, 0, M_DONTWAIT); if (n == NULL) { DPRINTF(("ipcomp_output(): bad mbuf chain, IPCA %s/%08x\n", diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index d65e81bac37..4aa06de5f8e 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.325 2016/07/01 18:28:58 jca Exp $ */ +/* $OpenBSD: ip_output.c,v 1.326 2016/08/15 11:35:25 dlg Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -1696,7 +1696,7 @@ ip_mloopback(struct ifnet *ifp, struct mbuf *m, struct sockaddr_in *dst) struct ip *ip; struct mbuf *copym; - copym = m_copym2(m, 0, M_COPYALL, M_DONTWAIT); + copym = m_dup_pkt(m, max_linkhdr, M_DONTWAIT); if (copym != NULL) { /* * We don't bother to fragment if the IP length is greater -- 2.20.1