diff options
author | 2010-07-02 02:40:15 +0000 | |
---|---|---|
committer | 2010-07-02 02:40:15 +0000 | |
commit | 41b18b7efaec5eccb1adb3e63aeb9377f4c90ebf (patch) | |
tree | 302d91ce246e0922e434bf95ecec888dab2647f8 /sys/netinet/ip_ipcomp.c | |
parent | braces define scope, not indentation. found hunting uninit bugs. ok oga (diff) | |
download | wireguard-openbsd-41b18b7efaec5eccb1adb3e63aeb9377f4c90ebf.tar.xz wireguard-openbsd-41b18b7efaec5eccb1adb3e63aeb9377f4c90ebf.zip |
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_ipcomp.c')
-rw-r--r-- | sys/netinet/ip_ipcomp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_ipcomp.c b/sys/netinet/ip_ipcomp.c index 0b98d6e28d7..af855f0d7cb 100644 --- a/sys/netinet/ip_ipcomp.c +++ b/sys/netinet/ip_ipcomp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipcomp.c,v 1.25 2010/07/01 02:09:45 reyk Exp $ */ +/* $OpenBSD: ip_ipcomp.c,v 1.26 2010/07/02 02:40:16 blambert Exp $ */ /* * Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org) @@ -346,7 +346,7 @@ ipcomp_input_cb(op) crypto_freereq(crp); /* Restore the Next Protocol field */ - m_copyback(m, protoff, sizeof(u_int8_t), &nproto); + m_copyback(m, protoff, sizeof(u_int8_t), &nproto, M_NOWAIT); /* Back to generic IPsec input processing */ error = ipsec_common_input_cb(m, tdb, skip, protoff, NULL); |