diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-03-30 00:37:45 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-03-30 00:38:36 +0000 |
commit | a55e9c701c2fc8914e0aebf12e37038f59b07cf8 (patch) | |
tree | 05b5a1bc85f8742706649429ec164f576d240975 /usr/local/pkg | |
parent | cc460ee980e427bf4acdb8a4903e3278df59ea94 (diff) | |
download | pfsense-a55e9c701c2fc8914e0aebf12e37038f59b07cf8.zip pfsense-a55e9c701c2fc8914e0aebf12e37038f59b07cf8.tar.gz |
* Hide interfaces internals to other code and use the propper interfaces.
Basically use get_interface*() functions instead of accessing fields like 'ipaddr'/'descr' etc...
* Make get_interfaces_with_gateway less heavyweight by getting information from the configuration stored in config.xml
* Some other missed custom interface list building and substituing with propper get_configured_interface*()
NOTE: This should give indipendce on dynamic interfaces on some services that before could not be used on top of this type of interfaces.
Diffstat (limited to 'usr/local/pkg')
-rw-r--r-- | usr/local/pkg/carp_settings.xml | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/usr/local/pkg/carp_settings.xml b/usr/local/pkg/carp_settings.xml index 29c1ba9..8b37e8c 100644 --- a/usr/local/pkg/carp_settings.xml +++ b/usr/local/pkg/carp_settings.xml @@ -169,11 +169,9 @@ 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; + $ifdescrs = get_configured_interface_list(); foreach($ifdescrs as $descr) - if($config['interfaces']['$descr']['ipaddr'] == $_POST["synchronizetoip"]) + if(get_interface_ip($descr) == $_POST["synchronizetoip"]) $input_errors[] = "CARP sync IP must be the backup firewall IP! You cannot specify this firewalls IP in this location."; if($config['virtualip']['vip']) { foreach($config['virtualip']['vip'] as $vip) { @@ -181,9 +179,6 @@ $input_errors[] = "CARP sync IP must be the backup firewall IP! You cannot specify this firewalls IP in this location."; } } - $wanip = get_interface_ip(); - if($wanip == $_POST["synchronizetoip"]) - $input_errors[] = "CARP sync IP must be the backup firewall's IP! You cannot specify this firewall's IP in this location."; } </custom_php_validation_command> <custom_add_php_command_late> |