diff options
author | Martin Willi <martin@revosec.ch> | 2012-09-11 12:20:37 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-09-11 16:18:28 +0200 |
commit | c7294f7a58f5c7bf9273e324299c8b311cfecaae (patch) | |
tree | 55aa16b83276a4a82a44a5f67f2391cbed4221d6 /src | |
parent | 1e04488f3230b42beab1453f12806b574a69ceb0 (diff) | |
download | strongswan-c7294f7a58f5c7bf9273e324299c8b311cfecaae.tar.bz2 strongswan-c7294f7a58f5c7bf9273e324299c8b311cfecaae.tar.xz |
Send FAILED_CP_REQUIRED if a configuration payload was expected, but not received
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/sa/ikev2/tasks/ike_config.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libcharon/sa/ikev2/tasks/ike_config.c b/src/libcharon/sa/ikev2/tasks/ike_config.c index d624fd170..c44f0452c 100644 --- a/src/libcharon/sa/ikev2/tasks/ike_config.c +++ b/src/libcharon/sa/ikev2/tasks/ike_config.c @@ -386,6 +386,15 @@ METHOD(task_t, build_r, status_t, pools->destroy(pools); return SUCCESS; } + if (pools->get_count(pools) && !this->vips->get_count(this->vips)) + { + DBG1(DBG_IKE, "expected a virtual IP request, sending %N", + notify_type_names, FAILED_CP_REQUIRED); + message->add_notify(message, FALSE, FAILED_CP_REQUIRED, chunk_empty); + vips->destroy_offset(vips, offsetof(host_t, destroy)); + pools->destroy(pools); + return SUCCESS; + } /* query registered providers for additional attributes to include */ enumerator = hydra->attributes->create_responder_enumerator( |