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 | |
parent | 396243e9b5dd4ea6a0eb0d59adaaf96782e1d5e2 (diff) | |
parent | 847e5e8257b58906a0d12ce48275cae7162aab47 (diff) | |
download | pfsense-6376913c3e85a923e32d5f4441cb768e28c3af8e.zip pfsense-6376913c3e85a923e32d5f4441cb768e28c3af8e.tar.gz |
Merge remote branch 'upstream/master'
-rw-r--r-- | etc/inc/captiveportal.inc | 9 | ||||
-rw-r--r-- | etc/inc/certs.inc | 4 | ||||
-rwxr-xr-x | etc/rc.filter_synchronize | 2 | ||||
-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 |
6 files changed, 24 insertions, 24 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index 3d4b61a..de1c09e 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -498,6 +498,7 @@ function captiveportal_init_webgui() { $res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-CaptivePortal-SSL.conf"); } +/* reinit will disconnect all users, be careful! */ function captiveportal_init_rules($reinit = false) { global $config, $g; @@ -1077,10 +1078,10 @@ function setup_dnsfilter_entries() { $cp_filterdns_conf = ""; if (is_array($config['captiveportal']['allowedhostname'])) { foreach ($config['captiveportal']['allowedhostname'] as $hostnameent) { - $cp_filterdns_conf .= "ipfw $hostnameent 3 '/etc/rc.captiveportal_configure'\n"; - $cp_filterdns_conf .= "ipfw $hostnameent 4 '/etc/rc.captiveportal_configure'\n"; - $cp_filterdns_conf .= "ipfw $hostnameent 7 '/etc/rc.captiveportal_configure'\n"; - $cp_filterdns_conf .= "ipfw $hostnameent 8 '/etc/rc.captiveportal_configure'\n"; + $cp_filterdns_conf .= "ipfw {$hostnameent['hostname']} 3 '/etc/rc.captiveportal_configure'\n"; + $cp_filterdns_conf .= "ipfw {$hostnameent['hostname']} 4 '/etc/rc.captiveportal_configure'\n"; + $cp_filterdns_conf .= "ipfw {$hostnameent['hostname']} 7 '/etc/rc.captiveportal_configure'\n"; + $cp_filterdns_conf .= "ipfw {$hostnameent['hostname']} 8 '/etc/rc.captiveportal_configure'\n"; } } file_put_contents($cp_filterdns_filename, $cp_filterdns_conf); diff --git a/etc/inc/certs.inc b/etc/inc/certs.inc index 7d19045..cc61d9b 100644 --- a/etc/inc/certs.inc +++ b/etc/inc/certs.inc @@ -90,12 +90,12 @@ function & lookup_crl($refid) { function ca_chain_array(& $cert) { if($cert['caref']) { $chain = array(); - $crt =& lookup_ca($cert['caref']); + $crt = lookup_ca($cert['caref']); $chain[] = $crt; while ($crt) { $caref = $crt['caref']; if($caref) - $crt =& lookup_ca($caref); + $crt = lookup_ca($caref); else $crt = false; if($crt) diff --git a/etc/rc.filter_synchronize b/etc/rc.filter_synchronize index 304d76c..6a282cc 100755 --- a/etc/rc.filter_synchronize +++ b/etc/rc.filter_synchronize @@ -55,7 +55,7 @@ function backup_vip_config_section() { $temp = array(); $temp['vip'] = array(); foreach($config['virtualip']['vip'] as $section) { - if($section['mode'] == "proxyarp" || $section['mode'] == "ipalias") + if(($section['mode'] == "proxyarp" || $section['mode'] == "ipalias") && substr($section['interface'],0,3) != "vip") continue; if($section['advskew'] <> "") { $section_val = intval($section['advskew']); 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(); |