aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-10 23:07:32 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-10 23:07:32 +0000
commit3b47c463037264d019db58ae5c6f92254a1e902a (patch)
treec50e120a34f52d4b6c6cce59903cc30cdadbda75
parent318c82a0d171043c4a32c4ac841049abdd3d87bc (diff)
downloadpfsense-packages-3b47c463037264d019db58ae5c6f92254a1e902a.tar.gz
pfsense-packages-3b47c463037264d019db58ae5c6f92254a1e902a.tar.bz2
pfsense-packages-3b47c463037264d019db58ae5c6f92254a1e902a.zip
Correctly setup pfsync interface for syncing.
-rw-r--r--packages/carp.xml32
1 files changed, 14 insertions, 18 deletions
diff --git a/packages/carp.xml b/packages/carp.xml
index 995df321..b4beea8a 100644
--- a/packages/carp.xml
+++ b/packages/carp.xml
@@ -212,7 +212,6 @@
$pfsync_instances_counter = 0;
if($config['installedpackages']['carp']['config'] != "") {
foreach($config['installedpackages']['carp']['config'] as $carp) {
- $pfsync = 0;
/*
* create the carp interface
*/
@@ -232,23 +231,20 @@
$carp_instances_counter++;
}
}
- if($pfsync != 0) {
- /*
- * user has selected pfsync, bring it up.
- */
- $carp_sync_int = convert_friendly_interface_to_real_interface_name($config['installedpackages']['package']['carpsettings']['config']['pfsyncinterface']);
- $carp_sync_ip = $config['installedpackages']['package']['carpsettings']['config']['pfsyncip'];
- fwrite($fout, "/sbin/ifconfig pfsync0 create\n");
- fwrite($fout, "/sbin/ifconfig pfsync0 {$carp_sync_ip}/24\n");
- fwrite($fout, "/sbin/ifconfig pfsync0 up syncif " . carp_sync_ip . "\n");
- $pfsync_instances_counter++;
- }
- $using_arp_balance = 0;
- $preempt = 0;
- if($config['installedpackages']['package']['carpsettings']['premption'] != "")
- $preempt = 1;
- if($config['installedpackages']['package']['carpsettings']['balancing'] != "")
- $using_arp_balance = 1;
+ foreach($config['installedpackages']['carpsettings']['config'] as $carp)
+ if($carp['pfsyncenabled'] != "") {
+ $pfsync = 1;
+ if($carp['premption'] != "")
+ $preempt = 1;
+ if($carp['balancing'] != "")
+ $using_arp_balance = 1;
+ $carp_sync_int = convert_friendly_interface_to_real_interface_name($carp['pfsyncinterface']);
+ $carp_sync_ip = $carp['pfsyncip'];
+ fwrite($fout, "/sbin/ifconfig pfsync0 create\n");
+ fwrite($fout, "/sbin/ifconfig pfsync0 {$carp_sync_ip}/24\n");
+ fwrite($fout, "/sbin/ifconfig pfsync0 up syncif " . carp_sync_ip . "\n");
+ $pfsync_instances_counter++;
+ }
fwrite($fout, "/etc/rc.filter_configure");
fclose($fout);
mwexec("chmod a+x /usr/local/etc/rc.d/carp.sh");