diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-02-22 09:34:23 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-02-22 09:34:23 -0300 |
commit | b32ea59d5a45b86beee73d416462c01d1ac915ec (patch) | |
tree | 48d932cc4416a64c5be87815d1d0913dad8b15bf | |
parent | 2ead5ea7deeb11abb7c4c81874baee1faa5afd2e (diff) | |
download | pfsense-b32ea59d5a45b86beee73d416462c01d1ac915ec.zip pfsense-b32ea59d5a45b86beee73d416462c01d1ac915ec.tar.gz |
Fixes on HA setup:
- Configure pfsync when configuration is changed
- Disable pfsync when it's disabled on GUI
- Remove syncpeer and back it to default multicast address when it's
removed from conf
Fixes #2491
-rw-r--r-- | etc/inc/interfaces.inc | 4 | ||||
-rwxr-xr-x | usr/local/www/system_hasync.php | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 58066a2..9eeb6c5 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1858,7 +1858,7 @@ function interfaces_carp_setup() { if (is_ipaddr($pfsyncpeerip)) mwexec("/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} syncpeer {$pfsyncpeerip} up", false); else - mwexec("/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} up", false); + mwexec("/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} -syncpeer up", false); sleep(1); @@ -1873,6 +1873,8 @@ function interfaces_carp_setup() { } log_error("pfsync done in $i seconds."); log_error("Configuring CARP settings finalize..."); + } else { + mwexec("/sbin/ifconfig pfsync0 -syncdev -syncpeer", false); } if($config['virtualip']['vip']) diff --git a/usr/local/www/system_hasync.php b/usr/local/www/system_hasync.php index b3e3cb8..a00c5ed 100755 --- a/usr/local/www/system_hasync.php +++ b/usr/local/www/system_hasync.php @@ -77,6 +77,7 @@ if ($_POST) { $a_hasync['username'] = $pconfig['username']; $a_hasync['password'] = $pconfig['password']; write_config("Updated High Availability Sync configuration"); + interfaces_carp_setup(); header("Location: system_hasync.php"); exit(); } |