Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netkey should return error code from key_senderror(). s...



details:   https://anonhg.NetBSD.org/src/rev/f10afa3981d9
branches:  trunk
changeset: 535483:f10afa3981d9
user:      itojun <itojun%NetBSD.org@localhost>
date:      Tue Aug 20 08:17:02 2002 +0000

description:
should return error code from key_senderror().  sync w/kame

diffstat:

 sys/netkey/key.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r 6acf24de7be4 -r f10afa3981d9 sys/netkey/key.c
--- a/sys/netkey/key.c  Tue Aug 20 07:53:51 2002 +0000
+++ b/sys/netkey/key.c  Tue Aug 20 08:17:02 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: key.c,v 1.73 2002/08/20 06:20:26 itojun Exp $  */
+/*     $NetBSD: key.c,v 1.74 2002/08/20 08:17:02 itojun Exp $  */
 /*     $KAME: key.c,v 1.249 2002/06/14 14:46:22 itojun Exp $   */
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.73 2002/08/20 06:20:26 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.74 2002/08/20 08:17:02 itojun Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -1722,8 +1722,7 @@
        if (mhp->ext[SADB_X_EXT_POLICY] == NULL ||
            mhp->extlen[SADB_X_EXT_POLICY] < sizeof(struct sadb_x_policy)) {
                ipseclog((LOG_DEBUG, "key_spddelete2: invalid message is passed.\n"));
-               key_senderror(so, m, EINVAL);
-               return 0;
+               return key_senderror(so, m, EINVAL);
        }
 
        id = ((struct sadb_x_policy *)mhp->ext[SADB_X_EXT_POLICY])->sadb_x_policy_id;
@@ -1731,7 +1730,7 @@
        /* Is there SP in SPD ? */
        if ((sp = key_getspbyid(id)) == NULL) {
                ipseclog((LOG_DEBUG, "key_spddelete2: no SP found id:%u.\n", id));
-               key_senderror(so, m, EINVAL);
+               return key_senderror(so, m, EINVAL);
        }
 
        key_sp_dead(sp);



Home | Main Index | Thread Index | Old Index