diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-10-03 12:09:43 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-10-03 12:15:44 -0300 |
commit | 4665dbdd51ea845a4b84d5068b4ecf31cd9dce4b (patch) | |
tree | 73f9c4553c38a462444873920d8f18e6267ff8c5 /usr | |
parent | 3c4fc30bea7a2beaeb26db7ba1952f8f88635480 (diff) | |
download | pfsense-4665dbdd51ea845a4b84d5068b4ecf31cd9dce4b.zip pfsense-4665dbdd51ea845a4b84d5068b4ecf31cd9dce4b.tar.gz |
Make proper check if IP address is configured on another interfaces and ignore current one. It fixes #3807
Diffstat (limited to 'usr')
-rw-r--r-- | usr/local/www/firewall_virtual_ip_edit.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php index 049b99f..9f4413c 100644 --- a/usr/local/www/firewall_virtual_ip_edit.php +++ b/usr/local/www/firewall_virtual_ip_edit.php @@ -119,13 +119,20 @@ if ($_POST) { if (isset($id) && isset($a_vip[$id])) { $ignore_if = $a_vip[$id]['interface']; $ignore_mode = $a_vip[$id]['mode']; + if (isset($a_vip[$id]['vhid'])) + $ignore_vhid = $a_vip[$id]['vhid']; } else { $ignore_if = $_POST['interface']; $ignore_mode = $_POST['mode']; } + if (!isset($ignore_vhid)) + $ignore_vhid = $_POST['vhid']; + if ($ignore_mode == 'carp') - $ignore_if .= "_vip{$id}"; + $ignore_if .= "_vip{$ignore_vhid}"; + else + $ignore_if .= "_virtualip{$id}"; if (is_ipaddr_configured($_POST['subnet'], $ignore_if)) $input_errors[] = gettext("This IP address is being used by another interface or VIP."); |