examples/ipsec-secgw: fix AAD length setting
authorAviad Yehezkel <aviadye@mellanox.com>
Tue, 24 Oct 2017 12:48:59 +0000 (15:48 +0300)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 25 Oct 2017 16:11:00 +0000 (18:11 +0200)
Fixes: 501e9c226adf ("examples/ipsec-secgw: add AEAD parameters")
Cc: stable@dpdk.org
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
examples/ipsec-secgw/sa.c

index 7be0e62..0f5c4fe 100644 (file)
@@ -375,7 +375,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
                        rule->auth_algo = algo->algo;
                        rule->auth_key_len = algo->key_len;
                        rule->digest_len = algo->digest_len;
-                       rule->aad_len = algo->key_len;
 
                        /* NULL algorithm and combined algos do not
                         * require auth key
@@ -431,7 +430,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
                        rule->aead_algo = algo->algo;
                        rule->cipher_key_len = algo->key_len;
                        rule->digest_len = algo->digest_len;
-                       rule->aad_len = algo->key_len;
+                       rule->aad_len = algo->aad_len;
                        rule->block_size = algo->block_size;
                        rule->iv_len = algo->iv_len;