starter: Load config again when restarting charon
authorTobias Brunner <tobias@strongswan.org>
Wed, 5 Sep 2012 14:43:34 +0000 (16:43 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 5 Sep 2012 14:43:34 +0000 (16:43 +0200)
This got lost in 041e763b.

src/starter/starter.c

index e867b7a..166be3e 100644 (file)
@@ -711,6 +711,22 @@ int main (int argc, char **argv)
                                starter_stroke_configure(cfg);
                        }
                        _action_ &= ~FLAG_ACTION_START_CHARON;
+
+                       for (ca = cfg->ca_first; ca; ca = ca->next)
+                       {
+                               if (ca->state == STATE_ADDED)
+                               {
+                                       ca->state = STATE_TO_ADD;
+                               }
+                       }
+
+                       for (conn = cfg->conn_first; conn; conn = conn->next)
+                       {
+                               if (conn->state == STATE_ADDED)
+                               {
+                                       conn->state = STATE_TO_ADD;
+                               }
+                       }
                }
 
                /*