diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2010-07-02 02:40:18 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2010-07-02 02:40:18 +0000 |
commit | bfc9493d9280a5a8ab43b8df30cd772c910140ba (patch) | |
tree | 32334a91bf10c89a8551f90fe6749d45476d9ad8 /sys/netinet/ip_ether.c | |
parent | 364840df3893a5f720df05ee307b996c62195a07 (diff) |
m_copyback can fail to allocate memory, but is a void fucntion so gymnastics
are required to detect that.
Change the function to take a wait argument (used in nfs server, but
M_NOWAIT everywhere else for now) and to return an error
ok claudio@ henning@ krw@
Diffstat (limited to 'sys/netinet/ip_ether.c')
-rw-r--r-- | sys/netinet/ip_ether.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_ether.c b/sys/netinet/ip_ether.c index 1a40db89819..cf52c76e011 100644 --- a/sys/netinet/ip_ether.c +++ b/sys/netinet/ip_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ether.c,v 1.54 2010/05/11 09:36:07 claudio Exp $ */ +/* $OpenBSD: ip_ether.c,v 1.55 2010/07/02 02:40:16 blambert Exp $ */ /* * The author of this code is Angelos D. Keromytis (kermit@adk.gr) * @@ -550,7 +550,7 @@ etherip_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int proto) eip.eip_ver = ETHERIP_VERSION & ETHERIP_VER_VERS_MASK; eip.eip_pad = 0; m_copyback(m, hlen - sizeof(struct etherip_header), - sizeof(struct etherip_header), &eip); + sizeof(struct etherip_header), &eip, M_NOWAIT); } *mp = m; |