Queue Mode Config tasks after main mode as initiator, not as responder
authorMartin Willi <martin@revosec.ch>
Tue, 3 Jan 2012 10:57:35 +0000 (11:57 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 20 Mar 2012 16:31:32 +0000 (17:31 +0100)
src/libcharon/sa/ikev1/tasks/main_mode.c

index cd79078..a9486e8 100644 (file)
@@ -950,12 +950,6 @@ METHOD(task_t, build_r, status_t,
                        authenticator->destroy(authenticator);
                        save_auth_cfg(this, TRUE);
 
-                       if (this->peer_cfg->get_virtual_ip(this->peer_cfg))
-                       {
-                               this->ike_sa->queue_task(this->ike_sa,
-                                                       (task_t*)mode_config_create(this->ike_sa, TRUE));
-                       }
-
                        switch (this->auth_method)
                        {
                                case AUTH_XAUTH_INIT_PSK:
@@ -1072,6 +1066,12 @@ METHOD(task_t, process_i, status_t,
                        }
                        save_auth_cfg(this, FALSE);
 
+                       if (this->peer_cfg->get_virtual_ip(this->peer_cfg))
+                       {
+                               this->ike_sa->queue_task(this->ike_sa,
+                                                       (task_t*)mode_config_create(this->ike_sa, TRUE));
+                       }
+
                        switch (this->auth_method)
                        {
                                case AUTH_XAUTH_INIT_PSK: