aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/ipsec_sa.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-04-11 15:14:07 +0000
committerNeale Ranns <nranns@cisco.com>2019-04-17 00:12:05 +0000
commit32b13bba2e3013a1b2a67eca8fe6a177d8e927ed (patch)
tree97dbae11a361e7537be09329c80ae7c3a3acb799 /src/vnet/ipsec/ipsec_sa.h
parent07a4d675c8d1b1bc19fa1846369f610ab91a9aba (diff)
IPSEC: support GCM in ESP
Change-Id: Id2ddb77b4ec3dd543d6e638bc882923f2bac011d Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 47feb1146ec3b0e1cf2ebd83cd5211e1df261194)
Diffstat (limited to 'src/vnet/ipsec/ipsec_sa.h')
-rw-r--r--src/vnet/ipsec/ipsec_sa.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vnet/ipsec/ipsec_sa.h b/src/vnet/ipsec/ipsec_sa.h
index 72a592984f6..f87e12e0204 100644
--- a/src/vnet/ipsec/ipsec_sa.h
+++ b/src/vnet/ipsec/ipsec_sa.h
@@ -43,6 +43,11 @@ typedef enum
IPSEC_CRYPTO_N_ALG,
} ipsec_crypto_alg_t;
+#define IPSEC_CRYPTO_ALG_IS_GCM(_alg) \
+ (((_alg == IPSEC_CRYPTO_ALG_AES_GCM_128) || \
+ (_alg == IPSEC_CRYPTO_ALG_AES_GCM_192) || \
+ (_alg == IPSEC_CRYPTO_ALG_AES_GCM_256)))
+
#define foreach_ipsec_integ_alg \
_ (0, NONE, "none") \
_ (1, MD5_96, "md5-96") /* RFC2403 */ \
@@ -92,6 +97,7 @@ typedef struct ipsec_key_t_
_ (16, UDP_ENCAP, "udp-encap") \
_ (32, IS_GRE, "GRE") \
_ (64, IS_INBOUND, "inboud") \
+ _ (128, IS_AEAD, "aead") \
typedef enum ipsec_sad_flags_t_
{
@@ -192,6 +198,7 @@ extern int ipsec_sa_add (u32 id,
const ipsec_key_t * ik,
ipsec_sa_flags_t flags,
u32 tx_table_id,
+ u32 salt,
const ip46_address_t * tunnel_src_addr,
const ip46_address_t * tunnel_dst_addr,
u32 * sa_index);