aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/ah_encrypt.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-03-21 14:34:09 +0000
committerDamjan Marion <dmarion@me.com>2019-03-25 20:03:24 +0000
commit3833ffd6c648c5066448e598976810c85c66bd58 (patch)
tree60d55db908ec188a36a87fca60157f0379ec551b /src/vnet/ipsec/ah_encrypt.c
parent20ab31e8f6d96e95d0f921a7c8a7680d4f46790a (diff)
IPSEC tests fnd fix or Extended Sequence Numbers
Change-Id: Iad6c4b867961ec8036110a4e15a829ddb93193ed Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ipsec/ah_encrypt.c')
-rw-r--r--src/vnet/ipsec/ah_encrypt.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/vnet/ipsec/ah_encrypt.c b/src/vnet/ipsec/ah_encrypt.c
index c6dbe57f73b..95be1412c90 100644
--- a/src/vnet/ipsec/ah_encrypt.c
+++ b/src/vnet/ipsec/ah_encrypt.c
@@ -61,7 +61,8 @@ typedef struct
{
u32 sa_index;
u32 spi;
- u32 seq;
+ u32 seq_lo;
+ u32 seq_hi;
ipsec_integ_alg_t integ_alg;
} ah_encrypt_trace_t;
@@ -73,8 +74,8 @@ format_ah_encrypt_trace (u8 * s, va_list * args)
CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
ah_encrypt_trace_t *t = va_arg (*args, ah_encrypt_trace_t *);
- s = format (s, "ah: sa-index %d spi %u seq %u integrity %U",
- t->sa_index, t->spi, t->seq,
+ s = format (s, "ah: sa-index %d spi %u seq %u:%u integrity %U",
+ t->sa_index, t->spi, t->seq_hi, t->seq_lo,
format_ipsec_integ_alg, t->integ_alg);
return s;
}
@@ -127,8 +128,7 @@ ah_encrypt_inline (vlib_main_t * vm,
if (PREDICT_FALSE (esp_seq_advance (sa0)))
{
- vlib_node_increment_counter (vm, node->node_index,
- AH_ENCRYPT_ERROR_SEQ_CYCLED, 1);
+ i_b0->error = node->errors[AH_ENCRYPT_ERROR_SEQ_CYCLED];
goto trace;
}
vlib_increment_combined_counter
@@ -294,7 +294,8 @@ ah_encrypt_inline (vlib_main_t * vm,
ah_encrypt_trace_t *tr =
vlib_add_trace (vm, node, i_b0, sizeof (*tr));
tr->spi = sa0->spi;
- tr->seq = sa0->seq - 1;
+ tr->seq_lo = sa0->seq;
+ tr->seq_hi = sa0->seq_hi;
tr->integ_alg = sa0->integ_alg;
tr->sa_index = sa_index0;
}