diff options
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/icmp6.c | 6 | ||||
-rw-r--r-- | sys/netinet6/ip6_forward.c | 3 | ||||
-rw-r--r-- | sys/netinet6/ip6_mroute.c | 13 | ||||
-rw-r--r-- | sys/netinet6/ip6_output.c | 4 | ||||
-rw-r--r-- | sys/netinet6/raw_ip6.c | 2 | ||||
-rw-r--r-- | sys/netinet6/udp6_usrreq.c | 3 |
6 files changed, 17 insertions, 14 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 6b6c92e2539f1..0d040e4b0f7c2 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -554,7 +554,7 @@ icmp6_input(struct mbuf **mp, int *offp, int proto) icmp6_ifstat_inc(ifp, ifs6_in_echo); if (code != 0) goto badcode; - if ((n = m_copy(m, 0, M_COPYALL)) == NULL) { + if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { /* Give up remote */ break; } @@ -651,7 +651,7 @@ icmp6_input(struct mbuf **mp, int *offp, int proto) IP6_EXTHDR_CHECK(m, off, sizeof(struct icmp6_nodeinfo), IPPROTO_DONE); #endif - n = m_copy(m, 0, M_COPYALL); + n = m_copym(m, 0, M_COPYALL, M_NOWAIT); if (n) n = ni6_input(n, off); /* XXX meaningless if n == NULL */ @@ -2039,7 +2039,7 @@ icmp6_rip6_input(struct mbuf **mp, int off) } } if (n != NULL || - (n = m_copy(m, 0, (int)M_COPYALL)) != NULL) { + (n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) != NULL) { if (last->inp_flags & INP_CONTROLOPTS) ip6_savecontrol(last, n, &opts); /* strip intermediate headers */ diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c index 83d42dfe29e26..1a3e5f4dee276 100644 --- a/sys/netinet6/ip6_forward.c +++ b/sys/netinet6/ip6_forward.c @@ -166,7 +166,8 @@ ip6_forward(struct mbuf *m, int srcrt) * It is important to save it before IPsec processing as IPsec * processing may modify the mbuf. */ - mcopy = m_copy(m, 0, imin(m->m_pkthdr.len, ICMPV6_PLD_MAXLEN)); + mcopy = m_copym(m, 0, imin(m->m_pkthdr.len, ICMPV6_PLD_MAXLEN), + M_NOWAIT); #ifdef IPSEC /* get a security policy for this packet */ diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 3ae900d6a7acb..66586c933be91 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -1145,7 +1145,7 @@ X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) MFC6_UNLOCK(); return (ENOBUFS); } - mb0 = m_copy(m, 0, M_COPYALL); + mb0 = m_copym(m, 0, M_COPYALL, M_NOWAIT); /* * Pullup packet header if needed before storing it, * as other references may modify it in the meantime. @@ -1185,7 +1185,7 @@ X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) * Make a copy of the header to send to the user * level process */ - mm = m_copy(mb0, 0, sizeof(struct ip6_hdr)); + mm = m_copym(mb0, 0, sizeof(struct ip6_hdr), M_NOWAIT); if (mm == NULL) { free(rte, M_MRTABLE6); m_freem(mb0); @@ -1417,7 +1417,8 @@ ip6_mdq(struct mbuf *m, struct ifnet *ifp, struct mf6c *rt) struct omrt6msg *oim; #endif - mm = m_copy(m, 0, sizeof(struct ip6_hdr)); + mm = m_copym(m, 0, sizeof(struct ip6_hdr), + M_NOWAIT); if (mm && (!M_WRITABLE(mm) || mm->m_len < sizeof(struct ip6_hdr))) @@ -1547,7 +1548,7 @@ phyint_send(struct ip6_hdr *ip6, struct mif6 *mifp, struct mbuf *m) * the IPv6 header is actually copied, not just referenced, * so that ip6_output() only scribbles on the copy. */ - mb_copy = m_copy(m, 0, M_COPYALL); + mb_copy = m_copym(m, 0, M_COPYALL, M_NOWAIT); if (mb_copy && (!M_WRITABLE(mb_copy) || mb_copy->m_len < sizeof(struct ip6_hdr))) mb_copy = m_pullup(mb_copy, sizeof(struct ip6_hdr)); @@ -1651,7 +1652,7 @@ register_send(struct ip6_hdr *ip6, struct mif6 *mif, struct mbuf *m) mm->m_data += max_linkhdr; mm->m_len = sizeof(struct ip6_hdr); - if ((mm->m_next = m_copy(m, 0, M_COPYALL)) == NULL) { + if ((mm->m_next = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { m_freem(mm); return (ENOBUFS); } @@ -1870,7 +1871,7 @@ pim6_input(struct mbuf **mp, int *offp, int proto) /* * make a copy of the whole header to pass to the daemon later. */ - mcp = m_copy(m, 0, off + PIM6_REG_MINLEN); + mcp = m_copym(m, 0, off + PIM6_REG_MINLEN, M_NOWAIT); if (mcp == NULL) { MRT6_DLOG(DEBUG_ANY | DEBUG_ERR, "pim register: " "could not copy register head"); diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 2b0e50d7be3e4..7b71abd4657af 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -259,7 +259,7 @@ ip6_fragment(struct ifnet *ifp, struct mbuf *m0, int hlen, u_char nextproto, ip6f->ip6f_offlg |= IP6F_MORE_FRAG; mhip6->ip6_plen = htons((u_short)(mtu + hlen + sizeof(*ip6f) - sizeof(struct ip6_hdr))); - if ((m_frgpart = m_copy(m0, off, mtu)) == NULL) { + if ((m_frgpart = m_copym(m0, off, mtu, M_NOWAIT)) == NULL) { IP6STAT_INC(ip6s_odropped); return (ENOBUFS); } @@ -3003,7 +3003,7 @@ ip6_mloopback(struct ifnet *ifp, struct mbuf *m) struct mbuf *copym; struct ip6_hdr *ip6; - copym = m_copy(m, 0, M_COPYALL); + copym = m_copym(m, 0, M_COPYALL, M_NOWAIT); if (copym == NULL) return; diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index 2b95e4811fec1..e827057c31c82 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -256,7 +256,7 @@ rip6_input(struct mbuf **mp, int *offp, int proto) } } if (last != NULL) { - struct mbuf *n = m_copy(m, 0, (int)M_COPYALL); + struct mbuf *n = m_copym(m, 0, M_COPYALL, M_NOWAIT); #ifdef IPSEC /* diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index b44fb9ecb5f16..144989445a0df 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -366,7 +366,8 @@ udp6_input(struct mbuf **mp, int *offp, int proto) if (last != NULL) { struct mbuf *n; - if ((n = m_copy(m, 0, M_COPYALL)) != NULL) { + if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) != + NULL) { INP_RLOCK(last); UDP_PROBE(receive, NULL, last, ip6, last, uh); |