support for left=%any change our address dynamically
authorMartin Willi <martin@strongswan.org>
Mon, 18 Jun 2007 05:57:59 +0000 (05:57 -0000)
committerMartin Willi <martin@strongswan.org>
Mon, 18 Jun 2007 05:57:59 +0000 (05:57 -0000)
src/charon/control/interfaces/stroke_interface.c

index 09846fe..7885fc2 100755 (executable)
@@ -288,16 +288,18 @@ static void stroke_add_conn(stroke_msg_t *msg, FILE *out)
                msg->add_conn.other = tmp_end;
                free(interface);
        }
-       if (!interface)
+       else
        {
                interface = charon->kernel_interface->get_interface(
                                                                                        charon->kernel_interface, my_host);
                if (!interface)
                {
-                       DBG1(DBG_CFG, "left nor right host is our side, aborting\n");
-                       goto destroy_hosts;
+                       DBG1(DBG_CFG, "left nor right host is our side, assuming left=local");
+               }
+               else
+               {
+                       free(interface);
                }
-               free(interface);
        }
 
        my_id = identification_create_from_string(msg->add_conn.me.id ?