diff options
author | Seth Mos <seth.mos@dds.nl> | 2011-02-03 09:01:30 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@dds.nl> | 2011-02-03 09:01:30 +0100 |
commit | 6376913c3e85a923e32d5f4441cb768e28c3af8e (patch) | |
tree | 07ec772c077ed5d06f51cc3331eca7066d3fc4c9 /usr/local | |
parent | 396243e9b5dd4ea6a0eb0d59adaaf96782e1d5e2 (diff) | |
parent | 847e5e8257b58906a0d12ce48275cae7162aab47 (diff) | |
download | pfsense-6376913c3e85a923e32d5f4441cb768e28c3af8e.zip pfsense-6376913c3e85a923e32d5f4441cb768e28c3af8e.tar.gz |
Merge remote branch 'upstream/master'
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/firewall_rules.php | 8 | ||||
-rwxr-xr-x | usr/local/www/services_captiveportal_hostname_edit.php | 15 | ||||
-rwxr-xr-x | usr/local/www/xmlrpc.php | 10 |
3 files changed, 16 insertions, 17 deletions
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php index 600348d..7eb96d6 100755 --- a/usr/local/www/firewall_rules.php +++ b/usr/local/www/firewall_rules.php @@ -162,9 +162,11 @@ if ($config['pptpd']['mode'] == "server") if(have_ruleint_access("pptp")) $iflist['pptp'] = "PPTP VPN"; -foreach ($config['pppoes']['pppoe'] as $pppoes) - if (($pppoes['mode'] == 'server') && have_ruleint_access("pppoe")) - $iflist['pppoe'] = "PPPoE Server"; +if (is_array($config['pppoes']['pppoe'])) { + foreach ($config['pppoes']['pppoe'] as $pppoes) + if (($pppoes['mode'] == 'server') && have_ruleint_access("pppoe")) + $iflist['pppoe'] = "PPPoE Server"; +} /* add ipsec interfaces */ if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable'])) diff --git a/usr/local/www/services_captiveportal_hostname_edit.php b/usr/local/www/services_captiveportal_hostname_edit.php index b6e580a..a199341 100755 --- a/usr/local/www/services_captiveportal_hostname_edit.php +++ b/usr/local/www/services_captiveportal_hostname_edit.php @@ -133,19 +133,8 @@ if ($_POST) { write_config(); - if (isset($config['captiveportal']['enable']) && is_module_loaded("ipfw.ko")) { - $rules = ""; - $hostname = gethostbyname($oldip); - if($hostname) - for ($i = 3; $i < 10; $i++) - $rules .= "table {$i} delete {$hostname}\n"; - $hostname = gethostbyname($ip); - if(is_ipaddr($hostname)) - $rules .= captiveportal_allowedip_configure_entry($hostname); - file_put_contents("{$g['tmp_path']}/allowedhostname_tmp{$id}", $rules); - mwexec("/sbin/ipfw -q {$g['tmp_path']}/allowedhostname_tmp{$id}"); - @unlink("{$g['tmp_path']}/allowedhostname_tmp{$id}"); - } + if (isset($config['captiveportal']['enable']) && is_module_loaded("ipfw.ko")) + captiveportal_init_rules(); header("Location: services_captiveportal_hostname.php"); exit; diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php index ea0166b..ebb3a24 100755 --- a/usr/local/www/xmlrpc.php +++ b/usr/local/www/xmlrpc.php @@ -171,7 +171,7 @@ function restore_config_section_xmlrpc($raw_params) { // Then add ipalias and proxyarp types already defined on the backup if (is_array($vipbackup)) { foreach ($vipbackup as $vip) { - if (($vip['mode'] == 'ipalias') || ($vip['mode'] == 'proxyarp')) + if ((($vip['mode'] == 'ipalias') || ($vip['mode'] == 'proxyarp')) && substr($vip['interface'], 0, 3) != "vip") array_unshift($config['virtualip']['vip'], $vip); } } @@ -226,8 +226,16 @@ function merge_config_section_xmlrpc($raw_params) { foreach ($config['virtualip']['vip'] as $vip) interface_vip_bring_down($vip); } + $vipbackup = $config['virtualip']['vip']; } $config = array_merge_recursive_unique($config, $params[0]); + // Then add ipalias and proxyarp types already defined on the backup + if (is_array($vipbackup)) { + foreach ($vipbackup as $vip) { + if ((($vip['mode'] == 'ipalias') || ($vip['mode'] == 'proxyarp')) && substr($vip['interface'], 0, 3) != "vip") + array_unshift($config['virtualip']['vip'], $vip); + } + } $mergedkeys = implode(",", array_keys($params[0])); write_config("Merged in config ({$mergedkeys} sections) from XMLRPC client."); interfaces_vips_configure(); |