aboutsummaryrefslogtreecommitdiff
path: root/sys/netipsec/keysock.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netipsec/keysock.c')
-rw-r--r--sys/netipsec/keysock.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netipsec/keysock.c b/sys/netipsec/keysock.c
index 7a0b9e757022..49efa0a3c510 100644
--- a/sys/netipsec/keysock.c
+++ b/sys/netipsec/keysock.c
@@ -141,6 +141,7 @@ end:
static int
key_sendup0(struct rawcb *rp, struct mbuf *m, int promisc)
{
+ int error;
if (promisc) {
struct sadb_msg *pmsg;
@@ -164,12 +165,11 @@ key_sendup0(struct rawcb *rp, struct mbuf *m, int promisc)
m, NULL)) {
PFKEYSTAT_INC(in_nomem);
m_freem(m);
- soroverflow(rp->rcb_socket);
- return ENOBUFS;
- }
-
+ error = ENOBUFS;
+ } else
+ error = 0;
sorwakeup(rp->rcb_socket);
- return 0;
+ return error;
}
/* so can be NULL if target != KEY_SENDUP_ONE */