~ubuntu-branches/ubuntu/maverick/strongswan/maverick

« back to all changes in this revision

Viewing changes to src/charon/sa/tasks/child_rekey.c

  • Committer: Bazaar Package Importer
  • Author(s): Rene Mayrhofer
  • Date: 2008-12-05 17:21:42 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20081205172142-9g77wgyzcj0blq7p
* New upstream release, fixes a MOBIKE issue.
  Closes: #507542: strongswan: endless loop
* Explicitly enable compilation with libcurl for CRL fetching
  Closes: #497756: strongswan: not compiled with curl support; crl 
                   fetching not available
* Enable compilation with SSH agent support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14
14
 * for more details.
15
15
 *
16
 
 * $Id: child_rekey.c 3589 2008-03-13 14:14:44Z martin $
 
16
 * $Id: child_rekey.c 4659 2008-11-14 14:05:47Z martin $
17
17
 */
18
18
 
19
19
#include "child_rekey.h"
23
23
#include <sa/tasks/child_create.h>
24
24
#include <sa/tasks/child_delete.h>
25
25
#include <processing/jobs/rekey_child_sa_job.h>
 
26
#include <processing/jobs/rekey_ike_sa_job.h>
26
27
 
27
28
 
28
29
typedef struct private_child_rekey_t private_child_rekey_t;
177
178
        protocol_id_t protocol;
178
179
        u_int32_t spi;
179
180
        child_sa_t *to_delete;
 
181
        iterator_t *iterator;
 
182
        payload_t *payload;
 
183
        
 
184
        /* handle NO_ADDITIONAL_SAS notify */
 
185
        iterator = message->get_payload_iterator(message);
 
186
        while (iterator->iterate(iterator, (void**)&payload))
 
187
        {
 
188
                if (payload->get_type(payload) == NOTIFY)
 
189
                {
 
190
                        notify_payload_t *notify = (notify_payload_t*)payload;
 
191
                        
 
192
                        if (notify->get_notify_type(notify) == NO_ADDITIONAL_SAS)
 
193
                        {
 
194
                                DBG1(DBG_IKE, "peer seems to not support CHILD_SA rekeying, "
 
195
                                         "starting reauthentication");
 
196
                                this->child_sa->set_state(this->child_sa, CHILD_INSTALLED);
 
197
                                charon->processor->queue_job(charon->processor,
 
198
                                                (job_t*)rekey_ike_sa_job_create(
 
199
                                                                        this->ike_sa->get_id(this->ike_sa), TRUE));
 
200
                                iterator->destroy(iterator);
 
201
                                return SUCCESS;
 
202
                        }
 
203
                }
 
204
        }
 
205
        iterator->destroy(iterator);
180
206
        
181
207
        if (this->child_create->task.process(&this->child_create->task, message) == NEED_MORE)
182
208
        {