mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Add carp support for OpenVPN. Ticket #69
This commit is contained in:
parent
7998c3f280
commit
3d06e8f02f
@ -302,7 +302,13 @@ function openvpn_reconfigure($mode,& $settings) {
|
||||
if (!$interface)
|
||||
$interface = 'WAN';
|
||||
|
||||
$iface = convert_friendly_interface_to_real_interface_name($interface);
|
||||
/* For a carp interface, the name is well known:vip1, vip2, ...*/
|
||||
if (!strncmp($interface, "vip", 3)) {
|
||||
$iface=$interface;
|
||||
} else {
|
||||
$iface=convert_friendly_interface_to_real_interface_name($interface);
|
||||
}
|
||||
|
||||
$lines = explode(' ', trim(shell_exec("ifconfig {$iface} | grep inet | grep -v inet6")));
|
||||
$iface_ip = $lines[1];
|
||||
|
||||
|
||||
@ -387,7 +387,10 @@ function autotls_change() {
|
||||
<select name="interface" class="formselect">
|
||||
<?php
|
||||
$interfaces = get_configured_interface_with_descr();
|
||||
foreach ($interfaces as $iface => $ifacename):
|
||||
$carplist = get_configured_carp_interface_list();
|
||||
foreach ($carplist as $cif => $carpip)
|
||||
$interfaces[$cif] = strtoupper($cif) . " ({$carpip})";
|
||||
foreach ($interfaces as $iface => $ifacename):
|
||||
$selected = "";
|
||||
if ($iface == $pconfig['interface'])
|
||||
$selected = "selected";
|
||||
|
||||
@ -548,6 +548,9 @@ function netbios_change() {
|
||||
<select name="interface" class="formselect">
|
||||
<?php
|
||||
$interfaces = get_configured_interface_with_descr();
|
||||
$carplist = get_configured_carp_interface_list();
|
||||
foreach ($carplist as $cif => $carpip)
|
||||
$interfaces[$cif] = strtoupper($cif) . " ({$carpip})";
|
||||
foreach ($interfaces as $iface => $ifacename):
|
||||
$selected = "";
|
||||
if ($iface == $pconfig['interface'])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user