summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-05-14 23:56:06 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-05-14 23:56:06 +0000
commit51a6bf4f01ed35085f4599a7139e6e848ceb75c1 (patch)
tree5acfc32f3f6bec7c3b2d74166a8aa17b48f342b2 /etc
parentb741d4c489bb30235e9774a5f428538bd8c7985b (diff)
downloadpfsense-51a6bf4f01ed35085f4599a7139e6e848ceb75c1.zip
pfsense-51a6bf4f01ed35085f4599a7139e6e848ceb75c1.tar.gz
Use pfSync SYNCPEER directive if defined. Ticket #1317
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc12
1 files changed, 9 insertions, 3 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 63d8d0e..554e781 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -379,6 +379,7 @@ function interfaces_carp_configure() {
$pfsyncenabled = $carp['pfsyncenabled'];
$balanacing = $carp['balancing'];
$pfsyncinterface = $carp['pfsyncinterface'];
+ $pfsyncpeerip = $carp['pfsyncpeerip'];
}
} else {
unset($pfsyncinterface);
@@ -402,10 +403,15 @@ function interfaces_carp_configure() {
exec("/sbin/pfctl -f /tmp/rules.boot");
}
/* setup pfsync interface */
- if($carp_sync_int and $pfsyncenabled)
- mwexec("/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} up");
- else
+ if($carp_sync_int and $pfsyncenabled) {
+ if($pfsyncpeerip) {
+ mwexec("/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} syncpeer {$pfsyncpeerip} up");
+ } else {
+ mwexec("/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} up");
+ }
+ } else {
mwexec("/sbin/ifconfig pfsync0 syncdev lo0 up");
+ }
$fd = fopen("/tmp/carp.sh", "w");
if($config['virtualip']['vip']) {
$viparr = &$config['virtualip']['vip'];
OpenPOWER on IntegriCloud