/**
* Check if any addresses in the given string are local
*/
-static bool is_local(char *address)
+static bool is_local(char *address, bool any_allowed)
{
enumerator_t *enumerator;
host_t *host;
{
found = TRUE;
}
+ else if (any_allowed && host->is_anyaddr(host))
+ {
+ found = TRUE;
+ }
host->destroy(host);
if (found)
{
return;
}
- if (is_local(msg->add_conn.other.address))
+ if (is_local(msg->add_conn.other.address, FALSE))
{
stroke_end_t tmp_end;
msg->add_conn.me = msg->add_conn.other;
msg->add_conn.other = tmp_end;
}
- else if (!is_local(msg->add_conn.me.address))
+ else if (!is_local(msg->add_conn.me.address, TRUE))
{
DBG1(DBG_CFG, "left nor right host is our side, assuming left=local");
}