VPN / IPsec - pass protocol when resolving via ipsec_resolve() (#5360)

closes https://github.com/opnsense/core/issues/5359
This commit is contained in:
FloMeyer 2022-02-17 20:06:08 +01:00 committed by GitHub
parent 197f290801
commit e7356fa395
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -864,7 +864,7 @@ function ipsec_configure_spd()
foreach ($config['ipsec']['phase2'] as $ph2ent) {
if (!isset($ph2ent['disabled']) && $ph1ent['ikeid'] == $ph2ent['ikeid'] && !empty($ph2ent['spd'])) {
$tunnel_src = ipsec_get_phase1_src($ph1ent);
$tunnel_dst = ipsec_resolve($ph1ent['remote-gateway']);
$tunnel_dst = ipsec_resolve($ph1ent['remote-gateway'], $ph1ent['protocol']);
// XXX: remove me, temporary logging to validate https://github.com/opnsense/core/issues/1773
$peerid_spec = ipsec_find_id($ph1ent, "peer");