summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-03-11 20:51:46 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-03-11 20:51:46 -0300
commit934c88ee9535919b8b75b6e939b2a6becb9561bd (patch)
treea0f378ab47726429b64b81aa1deeaff7cae880f6 /usr
parent3f5e998c9cc7e9cce41a3f5abe4d1be6c272d2c1 (diff)
downloadpfsense-934c88ee9535919b8b75b6e939b2a6becb9561bd.zip
pfsense-934c88ee9535919b8b75b6e939b2a6becb9561bd.tar.gz
Proper fix #4443, do not unset carp entry when content differ, also set correct real interface and use subnet to check IP protocol
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/xmlrpc.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php
index 376aa59..87d922d 100755
--- a/usr/local/www/xmlrpc.php
+++ b/usr/local/www/xmlrpc.php
@@ -258,7 +258,6 @@ function restore_config_section_xmlrpc($raw_params) {
continue; // Skip reconfiguring this vips since nothing has changed.
}
}
- unset($oldvips["{$vip['interface']}_vip{$vip['vhid']}"]);
} else if ($vip['mode'] == "ipalias" && strstr($vip['interface'], "_vip") && isset($oldvips[$vip['subnet']])) {
if ($oldvips[$vip['subnet']]['content'] == "{$vip['interface']}{$vip['subnet']}{$vip['subnet_bits']}") {
if (does_vip_exist($vip)) {
@@ -285,9 +284,14 @@ function restore_config_section_xmlrpc($raw_params) {
}
/* Cleanup remaining old carps */
foreach ($oldvips as $oldvipar) {
- $oldvipif = get_real_interface($oldvipar['interface']);
+ if (strstr($oldvipar['interface'], '_vip')) {
+ list($oldvipif, $vhid) = explode('_vip', $oldvipar['interface']);
+ $oldvipif = get_real_interface($oldvipif);
+ } else {
+ $oldvipif = get_real_interface($oldvipar['interface']);
+ }
if (!empty($oldvipif)) {
- if (is_ipaddrv6($oldvipif))
+ if (is_ipaddrv6($oldvipar['subnet']))
mwexec("/sbin/ifconfig " . escapeshellarg($oldvipif) . " inet6 " . escapeshellarg($oldvipar['subnet']) . " delete");
else
pfSense_interface_deladdress($oldvipif, $oldvipar['subnet']);
OpenPOWER on IntegriCloud