vici: Fallback to socket listening port if no explicit local port specified
This commit is contained in:
@@ -1709,7 +1709,6 @@ CALLBACK(config_sn, bool,
|
|||||||
.pull = TRUE,
|
.pull = TRUE,
|
||||||
.send_cert = CERT_SEND_IF_ASKED,
|
.send_cert = CERT_SEND_IF_ASKED,
|
||||||
.version = IKE_ANY,
|
.version = IKE_ANY,
|
||||||
.local_port = IKEV2_UDP_PORT,
|
|
||||||
.remote_port = IKEV2_UDP_PORT,
|
.remote_port = IKEV2_UDP_PORT,
|
||||||
.fragmentation = FRAGMENTATION_NO,
|
.fragmentation = FRAGMENTATION_NO,
|
||||||
.unique = UNIQUE_NO,
|
.unique = UNIQUE_NO,
|
||||||
@@ -1759,6 +1758,10 @@ CALLBACK(config_sn, bool,
|
|||||||
{
|
{
|
||||||
peer.remote_addrs = strdup("%any");
|
peer.remote_addrs = strdup("%any");
|
||||||
}
|
}
|
||||||
|
if (!peer.local_port)
|
||||||
|
{
|
||||||
|
peer.local_port = charon->socket->get_port(charon->socket, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
if (peer.over_time == LFT_UNDEFINED)
|
if (peer.over_time == LFT_UNDEFINED)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user