Module Name: src
Committed By: drochner
Date: Thu May 26 20:33:24 UTC 2011
Modified Files:
src/sys/opencrypto: cryptodev.c
Log Message:
fix building of a linked list if multiple algorithms are requested
in a session -- this just didn't work
To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/opencrypto/cryptodev.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/opencrypto/cryptodev.c
diff -u src/sys/opencrypto/cryptodev.c:1.64 src/sys/opencrypto/cryptodev.c:1.65
--- src/sys/opencrypto/cryptodev.c:1.64 Tue May 24 19:12:53 2011
+++ src/sys/opencrypto/cryptodev.c Thu May 26 20:33:24 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: cryptodev.c,v 1.64 2011/05/24 19:12:53 drochner Exp $ */
+/* $NetBSD: cryptodev.c,v 1.65 2011/05/26 20:33:24 drochner Exp $ */
/* $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $ */
/* $OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $ */
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.64 2011/05/24 19:12:53 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.65 2011/05/26 20:33:24 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1620,10 +1620,10 @@
DPRINTF(("tcomp->type = %d\n", tcomp->type));
crihead = &cric;
- if (thash) {
- cric.cri_next = &cria;
- } else if (txform) {
+ if (txform) {
cric.cri_next = &crie;
+ } else if (thash) {
+ cric.cri_next = &cria;
}
}
@@ -1644,6 +1644,8 @@
if (!crihead) {
crihead = &crie;
}
+ if (thash)
+ crie.cri_next = &cria;
}
if (thash) {
@@ -1663,8 +1665,6 @@
goto bail;
}
}
- if (txform)
- cria.cri_next = &crie; /* XXX forces enc then hash? */
if (!crihead) {
crihead = &cria;
}