Ticket #4254 Handle even hosts specified throguh dns name

This commit is contained in:
Ermal LUÇI 2015-01-21 21:04:49 +01:00
parent c7edf1f8e8
commit 4e1fd3b6f0

View File

@ -583,7 +583,12 @@ EOD;
$passive = 'add';
} else {
$right_spec = $ph1ent['remote-gateway'];
if (is_ipaddrv4($right_spec)) {
if (is_ipaddr($right_spec))
$sourcehost = $right_spec;
else
$sourcehost = $rgmap['remote-gateway'];
if (is_ipaddrv4($sourcehost)) {
if (strpos($ph1ent['interface'], '_vip')) {
$vpninterface = explode('_vip', $ph1ent['interface']);
$ifacesuse = get_real_interface($vpninterface[0]);
@ -604,7 +609,7 @@ EOD;
}
}
}
} else if (is_ipaddrv6($right_spec)) {
} else if (is_ipaddrv6($sourcehost)) {
if (strpos($ph1ent['interface'], '_vip')) {
$vpninterface = explode('_vip', $ph1ent['interface']);
$ifacesuse = get_real_interface($vpninterface[0]);