aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2009-11-24 19:29:51 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-25 18:48:37 -0500
commit4e242d1616781f9f1f0b01abf878700b259cd8b5 (patch)
tree9dbfba661b5a5466da155f6f25fc9c30513e801b /include
parenta661c4199b300503dae694efa21f1354f763b97c (diff)
xfrm: Define new XFRM netlink auth attribute with specified truncation bits
The new XFRMA_ALG_AUTH_TRUNC attribute taking a xfrm_algo_auth as argument allows the installation of authentication algorithms with a truncation length specified in userspace, i.e. SHA256 with 128 bit instead of 96 bit truncation. Signed-off-by: Martin Willi <martin@strongswan.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/xfrm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index 3246f0e66bcc..29e04beb1fc9 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -90,6 +90,13 @@ struct xfrm_algo {
90 char alg_key[0]; 90 char alg_key[0];
91}; 91};
92 92
93struct xfrm_algo_auth {
94 char alg_name[64];
95 unsigned int alg_key_len; /* in bits */
96 unsigned int alg_trunc_len; /* in bits */
97 char alg_key[0];
98};
99
93struct xfrm_algo_aead { 100struct xfrm_algo_aead {
94 char alg_name[64]; 101 char alg_name[64];
95 unsigned int alg_key_len; /* in bits */ 102 unsigned int alg_key_len; /* in bits */
@@ -274,6 +281,7 @@ enum xfrm_attr_type_t {
274 XFRMA_MIGRATE, 281 XFRMA_MIGRATE,
275 XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */ 282 XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */
276 XFRMA_KMADDRESS, /* struct xfrm_user_kmaddress */ 283 XFRMA_KMADDRESS, /* struct xfrm_user_kmaddress */
284 XFRMA_ALG_AUTH_TRUNC, /* struct xfrm_algo_auth */
277 __XFRMA_MAX 285 __XFRMA_MAX
278 286
279#define XFRMA_MAX (__XFRMA_MAX - 1) 287#define XFRMA_MAX (__XFRMA_MAX - 1)