Révision d5971693
Ajouté par Renato Botelho il y a plus de 9 ans
usr/local/www/firewall_virtual_ip_edit.php | ||
---|---|---|
113 | 113 |
if ($_POST['subnet']) { |
114 | 114 |
if (!is_ipaddr($_POST['subnet'])) |
115 | 115 |
$input_errors[] = gettext("A valid IP address must be specified."); |
116 |
else if (is_ipaddr_configured($_POST['subnet'], "{$_POST['interface']}_vip{$id}")) |
|
117 |
$input_errors[] = gettext("This IP address is being used by another interface or VIP."); |
|
116 |
else { |
|
117 |
if (isset($id) && isset($a_vip[$id])) { |
|
118 |
$ignore_if = $a_vip[$id]['interface']; |
|
119 |
$ignore_mode = $a_vip[$id]['mode']; |
|
120 |
} else { |
|
121 |
$ignore_if = $_POST['interface']; |
|
122 |
$ignore_mode = $_POST['mode']; |
|
123 |
} |
|
124 |
|
|
125 |
if ($ignore_mode == 'carp') |
|
126 |
$ignore_if .= "_vip{$id}"; |
|
127 |
|
|
128 |
if (is_ipaddr_configured($_POST['subnet'], $ignore_if)) |
|
129 |
$input_errors[] = gettext("This IP address is being used by another interface or VIP."); |
|
130 |
|
|
131 |
unset($ignore_if, $ignore_mode); |
|
132 |
} |
|
118 | 133 |
} |
119 | 134 |
|
120 | 135 |
$natiflist = get_configured_interface_with_descr(); |
Formats disponibles : Unified diff
Fix #3807:
for checking, this fixes the issue that happens when you try to change
a VIP to a new interface.