charon-cmd: Use %any as local address so IPv4 is not preferred

When resolving the remote host, we first determine if a particular
address family is preferred locally.  With `0.0.0.0` that's IPv4, with
`%any` that's not the case.  So we use the latter to allow resolvers
to return an IPv6 address.
This commit is contained in:
Tobias Brunner
2026-06-01 08:54:49 +02:00
parent 615e7ad9ab
commit 64e01e2812
+1 -1
View File
@@ -150,7 +150,7 @@ static peer_cfg_t* create_peer_cfg(private_cmd_connection_t *this)
peer_cfg_t *peer_cfg;
proposal_t *proposal;
ike_cfg_create_t ike = {
.local = "0.0.0.0",
.local = "%any",
.remote = this->host,
.remote_port = IKEV2_UDP_PORT,
.fragmentation = FRAGMENTATION_YES,