Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/netkey pullup (approved by releng-1-5)
details: https://anonhg.NetBSD.org/src/rev/fa17267f2ffa
branches: netbsd-1-5
changeset: 489574:fa17267f2ffa
user: itojun <itojun%NetBSD.org@localhost>
date: Fri Sep 29 06:29:00 2000 +0000
description:
pullup (approved by releng-1-5)
avoid kernel memory stavation.
sys/netkey/keysock.c 1.10 -> 1.11
diffstat:
sys/netkey/keysock.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diffs (44 lines):
diff -r f55e1f14bac9 -r fa17267f2ffa sys/netkey/keysock.c
--- a/sys/netkey/keysock.c Fri Sep 29 05:50:49 2000 +0000
+++ b/sys/netkey/keysock.c Fri Sep 29 06:29:00 2000 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: keysock.c,v 1.10 2000/06/12 10:40:48 itojun Exp $ */
-/* $KAME: keysock.c,v 1.22 2000/05/23 13:19:21 itojun Exp $ */
+/* $NetBSD: keysock.c,v 1.10.2.1 2000/09/29 06:29:00 itojun Exp $ */
+/* $KAME: keysock.c,v 1.23 2000/09/22 08:26:33 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -229,6 +229,8 @@
struct mbuf *m;
int promisc;
{
+ int error;
+
if (promisc) {
struct sadb_msg *pmsg;
@@ -255,17 +257,18 @@
pfkeystat.in_msgtype[pmsg->sadb_msg_type]++;
}
- if (!sbappendaddr(&rp->rcb_socket->so_rcv,
- (struct sockaddr *)&key_src, m, NULL)) {
+ if (!sbappendaddr(&rp->rcb_socket->so_rcv, (struct sockaddr *)&key_src,
+ m, NULL)) {
#ifdef IPSEC_DEBUG
printf("key_sendup0: sbappendaddr failed\n");
#endif
pfkeystat.in_nomem++;
m_freem(m);
- return ENOBUFS;
- }
+ error = ENOBUFS;
+ } else
+ error = 0;
sorwakeup(rp->rcb_socket);
- return 0;
+ return error;
}
/* XXX this interface should be obsoleted. */
Home |
Main Index |
Thread Index |
Old Index