Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netipsec fix typo in comment, improve error message, add...
details: https://anonhg.NetBSD.org/src/rev/55037553d6fd
branches: trunk
changeset: 999633:55037553d6fd
user: christos <christos%NetBSD.org@localhost>
date: Wed Jun 12 22:23:06 2019 +0000
description:
fix typo in comment, improve error message, add default case handling to
set error.
diffstat:
sys/netipsec/key.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (43 lines):
diff -r 25eea0ad1a64 -r 55037553d6fd sys/netipsec/key.c
--- a/sys/netipsec/key.c Wed Jun 12 21:08:33 2019 +0000
+++ b/sys/netipsec/key.c Wed Jun 12 22:23:06 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: key.c,v 1.262 2019/06/12 01:32:30 christos Exp $ */
+/* $NetBSD: key.c,v 1.263 2019/06/12 22:23:06 christos Exp $ */
/* $FreeBSD: 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.262 2019/06/12 01:32:30 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.263 2019/06/12 22:23:06 christos Exp $");
/*
* This code is referred to RFC 2367
@@ -3276,7 +3276,7 @@
* When SAD message type is GETSPI:
* to set sequence number from acq_seq++,
* to set zero to SPI.
- * not to call key_setsava().
+ * not to call key_setsaval().
* OUT: NULL : fail
* others : pointer to new secasvar.
*
@@ -3700,10 +3700,13 @@
case SADB_X_SATYPE_TCPSIGNATURE:
error = xform_init(sav, XF_TCPSIGNATURE);
break;
+ default:
+ error = EOPNOTSUPP;
+ break;
}
if (error) {
- IPSECLOG(LOG_DEBUG, "unable to initialize SA type %u.\n",
- mhp->msg->sadb_msg_satype);
+ IPSECLOG(LOG_DEBUG, "unable to initialize SA type %u (%d)\n",
+ mhp->msg->sadb_msg_satype, error);
goto fail;
}
Home |
Main Index |
Thread Index |
Old Index