summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2005-05-10 13:42:12 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2005-05-10 13:42:12 +0000
commit871030bbf20d828a2cf476cf4e1e751a1cf70c3d (patch)
treecf82fc6a2aa620810c4c200abc5df94df3334c5b /sys/net
parent0d5699d5552a32f081891a1e532434a13e6a8885 (diff)
support NULL encryption for ESP; ok hshoexer, ho
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/pfkeyv2.c3
-rw-r--r--sys/net/pfkeyv2_convert.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c
index 1a67f9e25f2..fc503aaccaf 100644
--- a/sys/net/pfkeyv2.c
+++ b/sys/net/pfkeyv2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkeyv2.c,v 1.101 2005/04/04 22:18:47 hshoexer Exp $ */
+/* $OpenBSD: pfkeyv2.c,v 1.102 2005/05/10 13:42:11 markus Exp $ */
/*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
@@ -94,6 +94,7 @@ static int nregistered = 0;
static int npromisc = 0;
static const struct sadb_alg ealgs[] = {
+ { SADB_EALG_NULL, 0, 0, 0 },
{ SADB_EALG_DESCBC, 64, 64, 64 },
{ SADB_EALG_3DESCBC, 64, 192, 192 },
{ SADB_X_EALG_BLF, 64, 40, BLF_MAXKEYLEN * 8},
diff --git a/sys/net/pfkeyv2_convert.c b/sys/net/pfkeyv2_convert.c
index 7552bd67693..54a44f13765 100644
--- a/sys/net/pfkeyv2_convert.c
+++ b/sys/net/pfkeyv2_convert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkeyv2_convert.c,v 1.21 2004/08/10 16:17:05 ho Exp $ */
+/* $OpenBSD: pfkeyv2_convert.c,v 1.22 2005/05/10 13:42:11 markus Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@keromytis.org)
*
@@ -214,6 +214,10 @@ export_sa(void **p, struct tdb *tdb)
if (tdb->tdb_encalgxform) {
switch (tdb->tdb_encalgxform->type) {
+ case CRYPTO_NULL:
+ sadb_sa->sadb_sa_encrypt = SADB_EALG_NULL;
+ break;
+
case CRYPTO_DES_CBC:
sadb_sa->sadb_sa_encrypt = SADB_EALG_DESCBC;
break;