diff options
| author | Martin Willi <martin@revosec.ch> | 2012-10-08 11:32:44 +0200 |
|---|---|---|
| committer | Martin Willi <martin@revosec.ch> | 2012-10-24 11:34:30 +0200 |
| commit | 81e0e1034407572aecf8aa6de83b183a67e71dc0 (patch) | |
| tree | f717c2bd77d213e2305cfe5baf17379ff4b80753 /src/libcharon/plugins/stroke | |
| parent | a32a8d4a673190d02587c18c9953b648cf93669e (diff) | |
| download | strongswan-81e0e1034407572aecf8aa6de83b183a67e71dc0.tar.bz2 strongswan-81e0e1034407572aecf8aa6de83b183a67e71dc0.tar.xz | |
Add stroke CHILD_SA rekeying counter
Diffstat (limited to 'src/libcharon/plugins/stroke')
| -rw-r--r-- | src/libcharon/plugins/stroke/stroke_counter.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_counter.c b/src/libcharon/plugins/stroke/stroke_counter.c index b46ca0d6c..ab2882ed5 100644 --- a/src/libcharon/plugins/stroke/stroke_counter.c +++ b/src/libcharon/plugins/stroke/stroke_counter.c @@ -88,6 +88,17 @@ METHOD(listener_t, ike_rekey, bool, return TRUE; } +METHOD(listener_t, child_rekey, bool, + private_stroke_counter_t *this, ike_sa_t *ike_sa, + child_sa_t *old, child_sa_t *new) +{ + this->lock->lock(this->lock); + this->counter[COUNTER_CHILD_SA_REKEY]++; + this->lock->unlock(this->lock); + + return TRUE; +} + METHOD(stroke_counter_t, destroy, void, private_stroke_counter_t *this) { @@ -106,6 +117,7 @@ stroke_counter_t *stroke_counter_create() .public = { .listener = { .ike_rekey = _ike_rekey, + .child_rekey = _child_rekey, }, .destroy = _destroy, }, |
