Date: Sat, 26 Nov 2011 23:11:41 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r228008 - head/sys/netipsec Message-ID: <201111262311.pAQNBfqJ012400@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Sat Nov 26 23:11:41 2011 New Revision: 228008 URL: http://svn.freebsd.org/changeset/base/228008 Log: There is no need to virtualize esp_max_ivlen. Modified: head/sys/netipsec/xform_esp.c Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Sat Nov 26 22:28:25 2011 (r228007) +++ head/sys/netipsec/xform_esp.c Sat Nov 26 23:11:41 2011 (r228008) @@ -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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111262311.pAQNBfqJ012400>