Source-Changes-HG archive

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

[src/trunk]: src/sys/netipsec Fix usages of sadb_msg_errno



details:   https://anonhg.NetBSD.org/src/rev/5e3c305dac9f
branches:  trunk
changeset: 354958:5e3c305dac9f
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Thu Jul 06 09:04:26 2017 +0000

description:
Fix usages of sadb_msg_errno

diffstat:

 sys/netipsec/key.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r 8855bd912220 -r 5e3c305dac9f sys/netipsec/key.c
--- a/sys/netipsec/key.c        Thu Jul 06 08:50:52 2017 +0000
+++ b/sys/netipsec/key.c        Thu Jul 06 09:04:26 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: key.c,v 1.165 2017/07/04 08:11:32 ozaki-r Exp $        */
+/*     $NetBSD: key.c,v 1.166 2017/07/06 09:04:26 ozaki-r Exp $        */
 /*     $FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $        */
 /*     $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $   */
 
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.165 2017/07/04 08:11:32 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.166 2017/07/06 09:04:26 ozaki-r Exp $");
 
 /*
  * This code is referd to RFC 2367
@@ -5295,10 +5295,10 @@
                return key_senderror(so, m, EINVAL);
 
        /* check SA values to be mature. */
-       mhp->msg->sadb_msg_errno = key_mature(sav);
-       if (mhp->msg->sadb_msg_errno != 0) {
+       error = key_mature(sav);
+       if (error != 0) {
                KEY_FREESAV(&sav);
-               return key_senderror(so, m, 0);
+               return key_senderror(so, m, error);
        }
 
     {
@@ -6523,7 +6523,7 @@
        error = key_acquire(&saidx, NULL);
        if (error != 0) {
                IPSECLOG(LOG_DEBUG, "error %d returned from key_acquire.\n",
-                   mhp->msg->sadb_msg_errno);
+                   error);
                return key_senderror(so, m, error);
        }
 



Home | Main Index | Thread Index | Old Index