summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/esp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ipsec/esp.h')
-rw-r--r--src/vnet/ipsec/esp.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/ipsec/esp.h b/src/vnet/ipsec/esp.h
index b0364b59d29..8f900da428c 100644
--- a/src/vnet/ipsec/esp.h
+++ b/src/vnet/ipsec/esp.h
@@ -223,8 +223,10 @@ hmac_calc (vlib_main_t * vm, ipsec_sa_t * sa, u8 * data, int data_len,
if (sa->use_esn)
{
+ u32 seq_hi = clib_host_to_net_u32 (sa->seq_hi);
+
op->len += 4;
- clib_memcpy (data + data_len, &sa->seq_hi, 4);
+ clib_memcpy (data + data_len, &seq_hi, 4);
}
vnet_crypto_process_ops (vm, op, 1);