mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 16:44:39 +00:00
IPsec: add virtual IPv6 pool for mobile clients
This commit deals with ipsec.conf file drafting. In terms of mobile clients option 'rightsourceip' now may be: 1) empty if no pools are configured; 2) %pool_address%/%pool_netbits% for an IPv4 only option; 3) %pool_address_v6%/%pool_netbits_v6% for an IPv6 only option; 4) %pool_address%/%pool_netbits%,%pool_address_v6%/%pool_netbits_v6% for a dual stack option.
This commit is contained in:
parent
a96a081f67
commit
234e7e27ea
@ -1349,8 +1349,15 @@ function ipsec_configure_do($verbose = false, $interface = '')
|
||||
}
|
||||
|
||||
$rightsourceip = null;
|
||||
if (!empty($a_client['pool_address']) && isset($ph1ent['mobile'])) {
|
||||
$rightsourceip = "\trightsourceip = {$a_client['pool_address']}/{$a_client['pool_netbits']}\n";
|
||||
if (isset($ph1ent['mobile']) && (!empty($a_client['pool_address']) || !empty($a_client['pool_address_v6']))) {
|
||||
$rightsourceip = "\trightsourceip = ";
|
||||
if (!empty($a_client['pool_address'])) {
|
||||
$rightsourceip .= "{$a_client['pool_address']}/{$a_client['pool_netbits']}";
|
||||
}
|
||||
if (!empty($a_client['pool_address_v6'])) {
|
||||
$rightsourceip .= (!empty($a_client['pool_address']) ? "," : "")."{$a_client['pool_address_v6']}/{$a_client['pool_netbits_v6']}";
|
||||
}
|
||||
$rightsourceip .= "\n";
|
||||
}
|
||||
|
||||
$authentication = "";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user