Module Name: src
Committed By: riz
Date: Sun Nov 21 20:13:02 UTC 2010
Modified Files:
src/sys/netinet6 [netbsd-5]: esp_aesctr.c esp_core.c
Log Message:
Pull up following revision(s) (requested by jym in ticket #1440):
sys/netinet6/esp_core.c: revision 1.46
sys/netinet6/esp_aesctr.c: revision 1.13
Fix some code paths where pointers are dereferenced after checking that
they are NULL (oops?)
XXX pull-ups for NetBSD-4 and NetBSD-5.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.20.1 src/sys/netinet6/esp_aesctr.c
cvs rdiff -u -r1.40 -r1.40.44.1 src/sys/netinet6/esp_core.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/netinet6/esp_aesctr.c
diff -u src/sys/netinet6/esp_aesctr.c:1.8 src/sys/netinet6/esp_aesctr.c:1.8.20.1
--- src/sys/netinet6/esp_aesctr.c:1.8 Tue Dec 25 18:33:47 2007
+++ src/sys/netinet6/esp_aesctr.c Sun Nov 21 20:13:01 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: esp_aesctr.c,v 1.8 2007/12/25 18:33:47 perry Exp $ */
+/* $NetBSD: esp_aesctr.c,v 1.8.20.1 2010/11/21 20:13:01 riz Exp $ */
/* $KAME: esp_aesctr.c,v 1.2 2003/07/20 00:29:37 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp_aesctr.c,v 1.8 2007/12/25 18:33:47 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp_aesctr.c,v 1.8.20.1 2010/11/21 20:13:01 riz Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -79,10 +79,10 @@
const struct esp_algorithm *algo;
algo = esp_algorithm_lookup(sav->alg_enc);
- if (!algo) {
+ if (algo == NULL) {
ipseclog((LOG_ERR,
- "esp_aeesctr_mature %s: unsupported algorithm.\n",
- algo->name));
+ "esp_aesctr_mature: unsupported encryption algorithm %d\n",
+ sav->alg_enc));
return 1;
}
Index: src/sys/netinet6/esp_core.c
diff -u src/sys/netinet6/esp_core.c:1.40 src/sys/netinet6/esp_core.c:1.40.44.1
--- src/sys/netinet6/esp_core.c:1.40 Wed May 23 17:15:00 2007
+++ src/sys/netinet6/esp_core.c Sun Nov 21 20:13:01 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: esp_core.c,v 1.40 2007/05/23 17:15:00 christos Exp $ */
+/* $NetBSD: esp_core.c,v 1.40.44.1 2010/11/21 20:13:01 riz Exp $ */
/* $KAME: esp_core.c,v 1.53 2001/11/27 09:47:30 sakane Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp_core.c,v 1.40 2007/05/23 17:15:00 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp_core.c,v 1.40.44.1 2010/11/21 20:13:01 riz Exp $");
#include "opt_inet.h"
@@ -404,9 +404,10 @@
}
algo = esp_algorithm_lookup(sav->alg_enc);
- if (!algo) {
+ if (algo == NULL) {
ipseclog((LOG_ERR,
- "esp_cbc_mature %s: unsupported algorithm.\n", algo->name));
+ "esp_cbc_mature: unsupported encryption algorithm %d\n",
+ sav->alg_enc));
return 1;
}