summaryrefslogtreecommitdiffstats
path: root/sys/netipsec
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-11-26 23:11:41 +0000
committerpjd <pjd@FreeBSD.org>2011-11-26 23:11:41 +0000
commit2a876c6d0ac8b079f312a0edde14360cecd9d2c1 (patch)
tree305f5c27e4e9dc07ae19d2b3725296960622d299 /sys/netipsec
parente1ad0a76be94a0706b3083987f73b6ce133afb54 (diff)
downloadFreeBSD-src-2a876c6d0ac8b079f312a0edde14360cecd9d2c1.zip
FreeBSD-src-2a876c6d0ac8b079f312a0edde14360cecd9d2c1.tar.gz
There is no need to virtualize esp_max_ivlen.
Diffstat (limited to 'sys/netipsec')
-rw-r--r--sys/netipsec/xform_esp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/netipsec/xform_esp.c b/sys/netipsec/xform_esp.c
index d6d1fb9..3010e72 100644
--- a/sys/netipsec/xform_esp.c
+++ b/sys/netipsec/xform_esp.c
@@ -76,6 +76,8 @@
#include <opencrypto/cryptodev.h>
#include <opencrypto/xform.h>
+static int esp_max_ivlen; /* max iv length over all algorithms */
+
VNET_DEFINE(int, esp_enable) = 1;
VNET_DEFINE(struct espstat, espstat);
@@ -85,9 +87,6 @@ SYSCTL_VNET_INT(_net_inet_esp, OID_AUTO,
SYSCTL_VNET_STRUCT(_net_inet_esp, IPSECCTL_STATS,
stats, CTLFLAG_RD, &VNET_NAME(espstat), espstat, "");
-static VNET_DEFINE(int, esp_max_ivlen); /* max iv length over all algorithms */
-#define V_esp_max_ivlen VNET(esp_max_ivlen)
-
static int esp_input_cb(struct cryptop *op);
static int esp_output_cb(struct cryptop *crp);
@@ -147,7 +146,7 @@ esp_hdrsiz(struct secasvar *sav)
* + sizeof (next header field)
* + max icv supported.
*/
- size = sizeof (struct newesp) + V_esp_max_ivlen + 9 + 16;
+ size = sizeof (struct newesp) + esp_max_ivlen + 9 + 16;
}
return size;
}
@@ -1029,8 +1028,8 @@ static void
esp_attach(void)
{
#define MAXIV(xform) \
- if (xform.blocksize > V_esp_max_ivlen) \
- V_esp_max_ivlen = xform.blocksize \
+ if (xform.blocksize > esp_max_ivlen) \
+ esp_max_ivlen = xform.blocksize \
MAXIV(enc_xform_des); /* SADB_EALG_DESCBC */
MAXIV(enc_xform_3des); /* SADB_EALG_3DESCBC */
OpenPOWER on IntegriCloud