diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-04-30 20:42:55 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-04-30 20:42:55 +0000 |
commit | 5980fbbeb34edf7155e0137b739bb2c7a81efefa (patch) | |
tree | 16bf3120561849ee9865e48f23cf3a772e9eded9 /usr | |
parent | 9afe0d5a935f5403644cc530dd330fec2173bd2f (diff) | |
download | pfsense-5980fbbeb34edf7155e0137b739bb2c7a81efefa.zip pfsense-5980fbbeb34edf7155e0137b739bb2c7a81efefa.tar.gz |
Do not allow the setting of the carp sync ip to be an ip address on the same firewall. This leads to a sync loop.
Diffstat (limited to 'usr')
-rw-r--r-- | usr/local/pkg/carp_settings.xml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/local/pkg/carp_settings.xml b/usr/local/pkg/carp_settings.xml index cb34bb5..95c00dc 100644 --- a/usr/local/pkg/carp_settings.xml +++ b/usr/local/pkg/carp_settings.xml @@ -160,6 +160,12 @@ if($_POST["synchronizetoip"]) if(!is_ipaddr($_POST["synchronizetoip"])) $input_errors[] = "You must specify a valid IP address."; + $ifdescrs = array('lan','wan'); + for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++) + $ifdescrs['opt' . $j] = "opt" . $j; + foreach($ifdescrs as $descr) + if($config['interfaces']['$descr']['ipaddr'] == $_POST["synchronizetoip"]) + $input_errors[] = "CARP sync IP must be the backup firewall ip! You cannot specify this firewalls IP in this location."; </custom_php_validation_command> <custom_add_php_command_late> /* setup carp interfaces */ |