controller: Keep following initiate() if the first DH guess was wrong
authorMartin Willi <martin@revosec.ch>
Mon, 3 Nov 2014 08:39:16 +0000 (09:39 +0100)
committerMartin Willi <martin@revosec.ch>
Fri, 21 Nov 2014 11:51:19 +0000 (12:51 +0100)
src/libcharon/control/controller.c

index 25667e5..60d186e 100644 (file)
@@ -303,6 +303,18 @@ METHOD(listener_t, child_state_change, bool,
                                                /* proper delete */
                                                this->status = SUCCESS;
                                                break;
+                                       case CHILD_RETRYING:
+                                               /* retrying with a different DH group; survive another
+                                                * initiation round */
+                                               this->status = NEED_MORE;
+                                               return TRUE;
+                                       case CHILD_CREATED:
+                                               if (this->status == NEED_MORE)
+                                               {
+                                                       this->status = FAILED;
+                                                       return TRUE;
+                                               }
+                                               break;
                                        default:
                                                break;
                                }