X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fipsec%2Fikev2.c;h=d85feee4274dfa5a7d08b5007d1dbfeb727e88da;hb=eba31ecebed1a7d168da17194cab7a8955761f2b;hp=3d5c0f766cfba9cf45dabdef6220e0c3e69468cc;hpb=684586786e98bc779e269c0d879a2a4d3f1f4bce;p=vpp.git diff --git a/src/vnet/ipsec/ikev2.c b/src/vnet/ipsec/ikev2.c index 3d5c0f766cf..d85feee4274 100644 --- a/src/vnet/ipsec/ikev2.c +++ b/src/vnet/ipsec/ikev2.c @@ -3376,6 +3376,7 @@ ikev2_mngr_process_ipsec_sa (ipsec_sa_t * ipsec_sa) ikev2_sa_t *fsa = 0; ikev2_child_sa_t *fchild = 0; f64 now = vlib_time_now (vm); + vlib_counter_t counts; /* Search for the SA and child SA */ vec_foreach (tkm, km->per_thread_data) @@ -3394,11 +3395,13 @@ ikev2_mngr_process_ipsec_sa (ipsec_sa_t * ipsec_sa) })); /* *INDENT-ON* */ } + vlib_get_combined_counter (&ipsec_sa_counters, + ipsec_sa->stat_index, &counts); if (fchild && fsa && fsa->profile && fsa->profile->lifetime_maxdata) { if (!fchild->is_expired - && ipsec_sa->total_data_size > fsa->profile->lifetime_maxdata) + && counts.bytes > fsa->profile->lifetime_maxdata) { fchild->time_to_expiration = now; }