Add uniqueids=never to ignore INITIAL_CONTACT notifies
[strongswan.git] / src / libcharon / sa / ikev2 / tasks / ike_auth.c
index 36f8acf..7d462f1 100644 (file)
@@ -435,7 +435,8 @@ METHOD(task_t, build_i, status_t,
                message->add_payload(message, (payload_t*)id_payload);
 
                if (idr && message->get_message_id(message) == 1 &&
-                       this->peer_cfg->get_unique_policy(this->peer_cfg) != UNIQUE_NO)
+                       this->peer_cfg->get_unique_policy(this->peer_cfg) != UNIQUE_NO &&
+                       this->peer_cfg->get_unique_policy(this->peer_cfg) != UNIQUE_NEVER)
                {
                        host_t *host;