mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-09 00:00:53 -04:00
set nexthop default value to 0::0 in IPv6 connections
This commit is contained in:
parent
e044510e5a
commit
aa1a730bfb
@ -173,7 +173,7 @@ kw_end(starter_conn_t *conn, starter_end_t *end, kw_token_t token
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (streq(value, "%any"))
|
else if (streq(value, "%any") || streq(value, "%any4"))
|
||||||
{
|
{
|
||||||
anyaddr(conn->addr_family, &end->addr);
|
anyaddr(conn->addr_family, &end->addr);
|
||||||
}
|
}
|
||||||
|
@ -148,17 +148,22 @@ connection_name(starter_conn_t *conn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_whack_end(whack_end_t *w, starter_end_t *end)
|
set_whack_end(whack_end_t *w, starter_end_t *end, sa_family_t family)
|
||||||
{
|
{
|
||||||
w->id = end->id;
|
w->id = end->id;
|
||||||
w->cert = end->cert;
|
w->cert = end->cert;
|
||||||
w->ca = end->ca;
|
w->ca = end->ca;
|
||||||
w->groups = end->groups;
|
w->groups = end->groups;
|
||||||
w->host_addr = end->addr;
|
w->host_addr = end->addr;
|
||||||
w->host_nexthop = end->nexthop;
|
|
||||||
w->host_srcip = end->srcip;
|
w->host_srcip = end->srcip;
|
||||||
w->has_client = end->has_client;
|
w->has_client = end->has_client;
|
||||||
|
|
||||||
|
if (family == AF_INET6 && isanyaddr(&end->nexthop))
|
||||||
|
{
|
||||||
|
anyaddr(AF_INET6, &end->nexthop);
|
||||||
|
}
|
||||||
|
w->host_nexthop = end->nexthop;
|
||||||
|
|
||||||
if (w->has_client)
|
if (w->has_client)
|
||||||
w->client = end->subnet;
|
w->client = end->subnet;
|
||||||
else
|
else
|
||||||
@ -246,8 +251,8 @@ starter_whack_add_conn(starter_conn_t *conn)
|
|||||||
msg.sa_keying_tries = conn->sa_keying_tries;
|
msg.sa_keying_tries = conn->sa_keying_tries;
|
||||||
msg.policy = conn->policy;
|
msg.policy = conn->policy;
|
||||||
|
|
||||||
set_whack_end(&msg.left, &conn->left);
|
set_whack_end(&msg.left, &conn->left, conn->addr_family);
|
||||||
set_whack_end(&msg.right, &conn->right);
|
set_whack_end(&msg.right, &conn->right, conn->addr_family);
|
||||||
|
|
||||||
msg.esp = conn->esp;
|
msg.esp = conn->esp;
|
||||||
msg.ike = conn->ike;
|
msg.ike = conn->ike;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user