diff options
Diffstat (limited to 'src/charon/plugins/stroke/stroke_socket.c')
-rw-r--r-- | src/charon/plugins/stroke/stroke_socket.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/charon/plugins/stroke/stroke_socket.c b/src/charon/plugins/stroke/stroke_socket.c index 8c4ab7804..53edde031 100644 --- a/src/charon/plugins/stroke/stroke_socket.c +++ b/src/charon/plugins/stroke/stroke_socket.c @@ -337,6 +337,18 @@ static void stroke_purge(private_stroke_socket_t *this, CERT_X509_OCSP_RESPONSE); } +/** + * list pool leases + */ +static void stroke_leases(private_stroke_socket_t *this, + stroke_msg_t *msg, FILE *out) +{ + pop_string(msg, &msg->leases.pool); + pop_string(msg, &msg->leases.address); + + this->list->leases(this->list, msg, out); +} + debug_t get_group_from_name(char *type) { if (strcasecmp(type, "any") == 0) return DBG_ANY; @@ -498,6 +510,9 @@ static job_requeue_t process(stroke_job_context_t *ctx) case STR_PURGE: stroke_purge(this, msg, out); break; + case STR_LEASES: + stroke_leases(this, msg, out); + break; default: DBG1(DBG_CFG, "received unknown stroke"); break; @@ -621,7 +636,7 @@ stroke_socket_t *stroke_socket_create() this->ca = stroke_ca_create(this->cred); this->config = stroke_config_create(this->ca, this->cred); this->control = stroke_control_create(); - this->list = stroke_list_create(); + this->list = stroke_list_create(this->attribute); charon->credentials->add_set(charon->credentials, &this->ca->set); charon->credentials->add_set(charon->credentials, &this->cred->set); |