summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/globals.inc2
-rw-r--r--etc/inc/gwlb.inc104
-rw-r--r--etc/inc/interfaces.inc6
-rw-r--r--etc/inc/openvpn.inc7
-rw-r--r--etc/inc/priv.defs.inc6
-rw-r--r--etc/inc/system.inc1
-rw-r--r--etc/inc/upgrade_config.inc17
-rw-r--r--etc/inc/vpn.inc27
-rw-r--r--etc/inc/vslb.inc16
-rwxr-xr-xsbin/dhclient-script29
-rwxr-xr-xusr/local/sbin/ppp-linkdown11
-rwxr-xr-xusr/local/sbin/ppp-linkup7
-rwxr-xr-xusr/local/www/head.inc2
-rwxr-xr-xusr/local/www/load_balancer_monitor.php4
-rwxr-xr-xusr/local/www/load_balancer_pool.php4
-rwxr-xr-xusr/local/www/load_balancer_pool_edit.php4
-rwxr-xr-xusr/local/www/load_balancer_relay_action.php4
-rwxr-xr-xusr/local/www/load_balancer_relay_protocol.php4
-rwxr-xr-xusr/local/www/load_balancer_virtual_server.php6
-rwxr-xr-xusr/local/www/load_balancer_virtual_server_edit.php6
-rwxr-xr-xusr/local/www/services_captiveportal.php10
-rw-r--r--usr/local/www/system_authservers.php104
-rwxr-xr-xusr/local/www/system_firmware_settings.php21
-rw-r--r--usr/local/www/system_groupmanager.php150
-rw-r--r--usr/local/www/system_usermanager.php154
-rwxr-xr-xusr/local/www/vpn_ipsec_mobile.php52
-rw-r--r--usr/local/www/vpn_openvpn_client.php6
-rw-r--r--usr/local/www/vpn_openvpn_server.php9
-rw-r--r--usr/local/www/widgets/widgets/system_information.widget.php19
29 files changed, 468 insertions, 324 deletions
diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc
index 23c3a92..51fbc22 100644
--- a/etc/inc/globals.inc
+++ b/etc/inc/globals.inc
@@ -77,7 +77,7 @@ $g = array(
"disablecrashreporter" => false,
"crashreporterurl" => "http://crashreporter.pfsense.org/crash_reporter.php",
"debug" => false,
- "latest_config" => "8.9",
+ "latest_config" => "9.0",
"nopkg_platforms" => array("cdrom"),
"minimum_ram_warning" => "101",
"minimum_ram_warning_text" => "128 MB",
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 20149b4..1068e48 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -657,6 +657,58 @@ function return_gateways_array($disabled = false, $localhost = false) {
return($gateways_arr);
}
+function fixup_default_gateway($ipprotocol, $gateways_status, $gateways_arr) {
+ global $config, $g;
+ /*
+ * NOTE: The code below is meant to replace the default gateway when it goes down.
+ * This facilitates services running on pfSense itself and are not handled by a PBR to continue working.
+ */
+ $upgw = "";
+ $dfltgwdown = false;
+ $dfltgwfound = false;
+ foreach ($gateways_arr as $gwname => $gwsttng) {
+ if (($gwsttng['ipprotocol'] == $ipprotocol) && isset($gwsttng['defaultgw'])) {
+ $dfltgwfound = true;
+ $dfltgwname = $gwname;
+ if (!isset($gwsttng['monitor_disable']) && stristr($gateways_status[$gwname]['status'], "down"))
+ $dfltgwdown = true;
+ }
+ /* Keep a record of the last up gateway */
+ /* XXX: Blacklist lan for now since it might cause issues to those who have a gateway set for it */
+ if (empty($upgw) && ($gwsttng['ipprotocol'] == $ipprotocol) && (isset($gwsttng['monitor_disable']) || !stristr($gateways_status[$gwname]['status'], "down")) && $gwsttng[$gwname]['friendlyiface'] != "lan")
+ $upgw = $gwname;
+ if ($dfltgwdown == true && !empty($upgw))
+ break;
+ }
+ if ($dfltgwfound == false) {
+ $gwname = convert_friendly_interface_to_friendly_descr("wan");
+ if (!empty($gateways_status[$gwname]) && stristr($gateways_status[$gwname]['status'], "down"))
+ $dfltgwdown = true;
+ }
+ if ($dfltgwdown == true && !empty($upgw)) {
+ if (preg_match("/dynamic/i", $gateways_arr[$upgw]['gateway']))
+ $gateways_arr[$upgw]['gateway'] = get_interface_gateway($gateways_arr[$upgw]['friendlyiface']);
+ if (is_ipaddr($gateways_arr[$upgw]['gateway'])) {
+ log_error("Default gateway down setting {$upgw} as default!");
+ if(is_ipaddrv6($gateways_arr[$upgw]['gateway'])) {
+ $inetfamily = "-inet6";
+ } else {
+ $inetfamily = "-inet";
+ }
+ mwexec("/sbin/route change {$inetfamily} default {$gateways_arr[$upgw]['gateway']}");
+ }
+ } else {
+ $defaultgw = trim(`/sbin/route -n get -{$ipprotocol} default | /usr/bin/grep gateway | /usr/bin/sed 's/gateway://g'`, " \n");
+ if(is_ipaddrv6($gateways_arr[$dfltgwname]['gateway'])) {
+ $inetfamily = "-inet6";
+ } else {
+ $inetfamily = "-inet";
+ }
+ if ($defaultgw != $gateways_arr[$dfltgwname]['gateway'])
+ mwexec("/sbin/route change {$inetfamily} default {$gateways_arr[$dfltgwname]['gateway']}");
+ }
+}
+
/*
* Return an array with all gateway groups with name as key
* All gateway groups will be processed before returning the array.
@@ -671,56 +723,8 @@ function return_gateway_groups_array() {
$carplist = get_configured_carp_interface_list();
if (isset($config['system']['gw_switch_default'])) {
- /*
- * NOTE: The code below is meant to replace the default gateway when it goes down.
- * This facilitates services running on pfSense itself and are not handled by a PBR to continue working.
- */
- $upgw = "";
- $dfltgwdown = false;
- $dfltgwfound = false;
- foreach ($gateways_arr as $gwname => $gwsttng) {
- if (isset($gwsttng['defaultgw'])) {
- $dfltgwfound = true;
- $dfltgwname = $gwname;
- if (!isset($gwsttng['monitor_disable']) && stristr($gateways_status[$gwname]['status'], "down"))
- $dfltgwdown = true;
- }
- /* Keep a record of the last up gateway */
- /* XXX: Blacklist lan for now since it might cause issues to those who have a gateway set for it */
- if (empty($upgw) && (isset($gwsttng['monitor_disable']) || !stristr($gateways_status[$gwname]['status'], "down")) && $gwsttng[$gwname]['friendlyiface'] != "lan")
- $upgw = $gwname;
- if ($dfltgwdown == true && !empty($upgw))
- break;
- }
- if ($dfltgwfound == false) {
- $gwname = convert_friendly_interface_to_friendly_descr("wan");
- if (!empty($gateways_status[$gwname]) && stristr($gateways_status[$gwname]['status'], "down"))
- $dfltgwdown = true;
- }
- if ($dfltgwdown == true && !empty($upgw)) {
- if (preg_match("/dynamic/i", $gateways_arr[$upgw]['gateway']))
- $gateways_arr[$upgw]['gateway'] = get_interface_gateway($gateways_arr[$upgw]['friendlyiface']);
- if (is_ipaddr($gateways_arr[$upgw]['gateway'])) {
- log_error("Default gateway down setting {$upgw} as default!");
- if(is_ipaddrv6($gateways_arr[$upgw]['gateway'])) {
- $inetfamily = "-inet6";
- } else {
- $inetfamily = "-inet";
- }
- mwexec("/sbin/route change {$inetfamily} default {$gateways_arr[$upgw]['gateway']}");
- }
- } else {
- $defaultgw = trim(`/sbin/route -n get -inet default | /usr/bin/grep gateway | /usr/bin/sed 's/gateway://g'`, " \n");
- if(is_ipaddrv6($gateways_arr[$dfltgwname]['gateway'])) {
- $inetfamily = "-inet6";
- } else {
- $inetfamily = "-inet";
- }
- if ($defaultgw != $gateways_arr[$dfltgwname]['gateway'])
- mwexec("/sbin/route change {$inetfamily} default {$gateways_arr[$dfltgwname]['gateway']}");
- }
-
- unset($upgw, $dfltgwfound, $dfltgwdown, $gwname, $gwsttng);
+ fixup_default_gateway("inet", $gateways_status, $gateways_arr);
+ fixup_default_gateway("inet6", $gateways_status, $gateways_arr);
}
if (is_array($config['gateways']['gateway_group'])) {
foreach($config['gateways']['gateway_group'] as $group) {
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index a7af3ce..551d833 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1153,6 +1153,12 @@ function interface_bring_down($interface = "wan", $destroy = false) {
break;
}
+ $old_router = trim(file_get_contents("{$g['tmp_path']}/{$realif}_router"));
+// log_error("Checking for old router states: {$g['tmp_path']}/{$realif}_router = {$old_router}");
+ if (!empty($old_router)) {
+ log_error("Clearing states to old gateway {$old_router}.");
+ mwexec("/sbin/pfctl -b 0.0.0.0/32 -b {$old_router}/32");
+ }
/* remove interface up file if it exists */
unlink_if_exists("{$g['tmp_path']}/{$realif}up");
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index 8416264..bddb5c8 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -710,12 +710,7 @@ function openvpn_delete($mode, & $settings) {
$vpnid = $settings['vpnid'];
$mode_id = $mode.$vpnid;
- if (isset($settings['dev_mode']))
- $tunname = "{$settings['dev_mode']}{$vpnid}";
- else { /* defaults to tun */
- $tunname = "tun{$vpnid}";
- }
-
+ $tunname = "tun{$vpnid}";
if ($mode == "server")
$devname = "ovpns{$vpnid}";
else
diff --git a/etc/inc/priv.defs.inc b/etc/inc/priv.defs.inc
index b747bfd..46181cf 100644
--- a/etc/inc/priv.defs.inc
+++ b/etc/inc/priv.defs.inc
@@ -60,6 +60,12 @@ $priv_list['page-diagnostics-showstates']['descr'] = gettext("Allow access to th
$priv_list['page-diagnostics-showstates']['match'] = array();
$priv_list['page-diagnostics-showstates']['match'][] = "diag_dump_states.php*";
+$priv_list['page-diagnostics-sockets'] = array();
+$priv_list['page-diagnostics-sockets']['name'] = gettext("WebCfg - Diagnostics: Sockets page");
+$priv_list['page-diagnostics-sockets']['descr'] = gettext("Allow access to the 'Diagnostics: Sockets' page.");
+$priv_list['page-diagnostics-sockets']['match'] = array();
+$priv_list['page-diagnostics-sockets']['match'][] = "diag_sockets.php*";
+
$priv_list['page-status-ipsec'] = array();
$priv_list['page-status-ipsec']['name'] = gettext("WebCfg - Status: IPsec page");
$priv_list['page-status-ipsec']['descr'] = gettext("Allow access to the 'Status: IPsec' page.");
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 0f3d263..6bf32f3 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -1287,6 +1287,7 @@ function system_ntp_configure($start_ntpd=true) {
$ntpcfg = "# \n";
$ntpcfg .= "# pfSense ntp configuration file \n";
$ntpcfg .= "# \n\n";
+ $ntpcfg .= "tinker panic 0 \n";
if (!empty($config['ntpd']['gpsport'])
&& file_exists('/dev/'.$config['ntpd']['gpsport'])
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc
index f7ae95d..4f66a8b 100644
--- a/etc/inc/upgrade_config.inc
+++ b/etc/inc/upgrade_config.inc
@@ -905,6 +905,8 @@ function upgrade_045_to_046() {
$pool['behaviour'] = 'balance';
$pool['name'] = "{$vs_a[$i]['name']}-sitedown";
$pool['descr'] = sprintf(gettext("Sitedown pool for VS: %s"), $vs_a[$i]['name']);
+ if (is_array($vs_a[$i]['pool']))
+ $vs_a[$i]['pool'] = $vs_a[$i]['pool'][0];
$pool['port'] = $pools[$vs_a[$i]['pool']]['port'];
$pool['servers'] = array();
$pool['servers'][] = $vs_a[$i]['sitedown'];
@@ -2930,4 +2932,19 @@ function upgrade_088_to_089() {
}
}
}
+function upgrade_089_to_090() {
+ global $config;
+ if (is_array($config['load_balancer']['virtual_server']) && count($config['load_balancer']['virtual_server'])) {
+ $vs_a = &$config['load_balancer']['virtual_server'];
+ for ($i = 0; isset($vs_a[$i]); $i++) {
+ if (is_array($vs_a[$i]['pool'])) {
+ $vs_a[$i]['poolname'] = $vs_a[$i]['pool'][0];
+ unset($vs_a[$i]['pool']);
+ } elseif (!empty($vs_a[$i]['pool'])) {
+ $vs_a[$i]['poolname'] = $vs_a[$i]['pool'];
+ unset($vs_a[$i]['pool']);
+ }
+ }
+ }
+}
?>
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 618dec3..03941bb 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -390,7 +390,14 @@ function vpn_ipsec_configure($ipchg = false)
if ($a_client['dns_domain']) {
$racoonconf .= "\tdefault_domain \"{$a_client['dns_domain']}\";\n";
- $racoonconf .= "\tsplit_dns \"{$a_client['dns_domain']}\";\n";
+ if (empty($a_client['dns_split']))
+ $racoonconf .= "\tsplit_dns \"{$a_client['dns_domain']}\";\n";
+ }
+
+ if ($a_client['dns_split']) {
+ $domain_array = preg_split("/[ ,]+/",$a_client['dns_split']);
+ $domain_string = implode('", "', $domain_array);
+ $racoonconf .= "\tsplit_dns \"{$domain_string}\";\n";
}
if ($a_client['pfs_group'])
@@ -1834,14 +1841,16 @@ function reload_tunnel_spd_policy($phase1, $phase2, $old_phase1, $old_phase2) {
}
}
/* add new SPD policies to replace them */
- $spdconf .= "spdadd {$family} {$local_subnet} " .
- "{$remote_subnet} any -P out ipsec " .
- "{$phase2['protocol']}/tunnel/{$ep}-" .
- "{$rgip}/unique;\n";
- $spdconf .= "spdadd {$family} {$remote_subnet} " .
- "{$local_subnet} any -P in ipsec " .
- "{$phase2['protocol']}/tunnel/{$rgip}-" .
- "{$ep}/unique;\n";
+ if (!isset($phase1['disabled'])) {
+ $spdconf .= "spdadd {$family} {$local_subnet} " .
+ "{$remote_subnet} any -P out ipsec " .
+ "{$phase2['protocol']}/tunnel/{$ep}-" .
+ "{$rgip}/unique;\n";
+ $spdconf .= "spdadd {$family} {$remote_subnet} " .
+ "{$local_subnet} any -P in ipsec " .
+ "{$phase2['protocol']}/tunnel/{$rgip}-" .
+ "{$ep}/unique;\n";
+ }
log_error(sprintf(gettext("Reloading IPsec tunnel '%1\$s'. Previous IP '%2\$s', current IP '%3\$s'. Reloading policy"), $phase1['descr'], $old_gw, $rgip));
diff --git a/etc/inc/vslb.inc b/etc/inc/vslb.inc
index 0a975f0..1aed862 100644
--- a/etc/inc/vslb.inc
+++ b/etc/inc/vslb.inc
@@ -267,12 +267,12 @@ function relayd_configure($kill_first=false) {
for ($i = 0; isset($vs_a[$i]); $i++) {
$append_port_to_name = false;
- if (is_alias($pools[$vs_a[$i]['pool']]['port'])) {
- $dest_port_array = filter_expand_alias_array($pools[$vs_a[$i]['pool']]['port']);
+ if (is_alias($pools[$vs_a[$i]['poolname']]['port'])) {
+ $dest_port_array = filter_expand_alias_array($pools[$vs_a[$i]['poolname']]['port']);
$append_port_to_name = true;
}
else {
- $dest_port_array = array($pools[$vs_a[$i]['pool']]['port']);
+ $dest_port_array = array($pools[$vs_a[$i]['poolname']]['port']);
}
if (is_alias($vs_a[$i]['port'])) {
$src_port_array = filter_expand_alias_array($vs_a[$i]['port']);
@@ -331,26 +331,26 @@ function relayd_configure($kill_first=false) {
$conf .= " protocol \"{$vs_a[$i]['relay_protocol']}\"\n";
}
$lbmode = "";
- if ( $pools[$vs_a[$i]['pool']]['mode'] == "loadbalance" ) {
+ if ( $pools[$vs_a[$i]['poolname']]['mode'] == "loadbalance" ) {
$lbmode = "mode loadbalance";
}
- $conf .= " forward to <{$vs_a[$i]['pool']}> port {$dest_port} {$lbmode} {$check_a[$pools[$vs_a[$i]['pool']]['monitor']]} \n";
+ $conf .= " forward to <{$vs_a[$i]['poolname']}> port {$dest_port} {$lbmode} {$check_a[$pools[$vs_a[$i]['poolname']]['monitor']]} \n";
if (isset($vs_a[$i]['sitedown']) && strlen($vs_a[$i]['sitedown']) > 0)
- $conf .= " forward to <{$vs_a[$i]['sitedown']}> port {$dest_port} {$lbmode} {$check_a[$pools[$vs_a[$i]['pool']]['monitor']]} \n";
+ $conf .= " forward to <{$vs_a[$i]['sitedown']}> port {$dest_port} {$lbmode} {$check_a[$pools[$vs_a[$i]['poolname']]['monitor']]} \n";
$conf .= "}\n";
} else {
$conf .= "redirect \"{$name}\" {\n";
$conf .= " listen on {$ip} port {$src_port}\n";
- $conf .= " forward to <{$vs_a[$i]['pool']}> port {$dest_port} {$check_a[$pools[$vs_a[$i]['pool']]['monitor']]} \n";
+ $conf .= " forward to <{$vs_a[$i]['poolname']}> port {$dest_port} {$check_a[$pools[$vs_a[$i]['poolname']]['monitor']]} \n";
if (isset($config['system']['lb_use_sticky']))
$conf .= " sticky-address\n";
/* sitedown MUST use the same port as the primary pool - sucks, but it's a relayd thing */
if (isset($vs_a[$i]['sitedown']) && strlen($vs_a[$i]['sitedown']) > 0)
- $conf .= " forward to <{$vs_a[$i]['sitedown']}> port {$dest_port} {$check_a[$pools[$vs_a[$i]['pool']]['monitor']]} \n";
+ $conf .= " forward to <{$vs_a[$i]['sitedown']}> port {$dest_port} {$check_a[$pools[$vs_a[$i]['poolname']]['monitor']]} \n";
$conf .= "}\n";
}
diff --git a/sbin/dhclient-script b/sbin/dhclient-script
index 5af4aa1..21bb473 100755
--- a/sbin/dhclient-script
+++ b/sbin/dhclient-script
@@ -59,21 +59,29 @@ arp_flush() {
}
delete_old_states() {
+ $LOGGER "Starting delete_old_states()"
# If the IP changed, remove states from the old one
if [ -f /var/db/${interface}_ip ]; then
- $OLD_IP = `cat /var/db/${interface}_ip`
- if [ "${OLD_IP}" != "${new_ip_address}" ]; then
- echo "Removing states from old IP '${OLD_IP}' (new IP '${new_ip_address}')" | logger -t dhclient
+ OLD_IP = `cat /var/db/${interface}_ip`
+ $LOGGER "Comparing IPs: Old: ${OLD_IP} New: ${new_ip_address}"
+ if [ -n "${OLD_IP}" ] && [ "${OLD_IP}" != "${new_ip_address}" ]; then
+ $LOGGER "Removing states from old IP '${OLD_IP}' (new IP '${new_ip_address}')"
/sbin/pfctl -k 0.0.0.0/0 -k ${OLD_IP}/32
/sbin/pfctl -k ${OLD_IP}/32
pfctl -K ${OLD_IP}/32
fi
fi
# Delete states through old gateway if it's not the same
- if [ -f /tmp/${interface}_router ]; then
- $OLD_ROUTER = `cat /tmp/${interface}_router`
+ if [ -n "${old_routers}" ]; then
+ OLD_ROUTER = $old_routers
+ fi
+ if [ -z "${OLD_ROUTER}" ] && [ -f /tmp/${interface}_router ]; then
+ OLD_ROUTER = `cat /tmp/${interface}_router`
+ fi
+ if [ -n $OLD_ROUTER ]; then
+ $LOGGER "Comparing Routers: Old: ${OLD_ROUTER} New: ${new_routers}"
if [ "${OLD_ROUTER}" != "${new_routers}" ]; then
- echo "Removing states through old gateway '${OLD_ROUTER}' (new gateway '${new_routers}')" | logger -t dhclient
+ $LOGGER "Removing states through old gateway '${OLD_ROUTER}' (new gateway '${new_routers}')"
/sbin/pfctl -b 0.0.0.0/32 -b ${OLD_ROUTER}/32
fi
fi
@@ -103,7 +111,7 @@ add_new_address() {
# This is necessary otherwise apinger will try to ping all 1s address
- if [ "$new_routers" != "255.255.255.255" ]; then
+ if [ -n "$new_routers" ] && [ "$new_routers" != "255.255.255.255" ]; then
echo $new_routers > /tmp/${interface}_router
fi
echo $new_ip_address > /var/db/${interface}_ip
@@ -311,6 +319,7 @@ MEDIUM)
PREINIT)
delete_old_alias
$IFCONFIG $interface inet 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.255 up
+ delete_old_states
/bin/rm -f /tmp/${interface}_router
;;
@@ -320,6 +329,9 @@ ARPCHECK|ARPSEND)
BOUND|RENEW|REBIND|REBOOT)
check_hostname
changes="no"
+ if [ "$old_ip_address" != "$new_ip_address" ]; then
+ delete_old_states
+ fi
if [ -n "$old_ip_address" ]; then
if [ -n "$alias_ip_address" ] && \
[ "$old_ip_address" != "$alias_ip_address" ]; then
@@ -328,7 +340,6 @@ BOUND|RENEW|REBIND|REBOOT)
fi
if [ "$old_ip_address" != "$new_ip_address" ]; then
delete_old_address
- delete_old_states
delete_old_routes
changes="yes"
fi
@@ -354,9 +365,9 @@ BOUND|RENEW|REBIND|REBOOT)
EXPIRE|FAIL)
delete_old_alias
+ delete_old_states
if [ -n "$old_ip_address" ]; then
delete_old_address
- delete_old_states
delete_old_routes
fi
;;
diff --git a/usr/local/sbin/ppp-linkdown b/usr/local/sbin/ppp-linkdown
index bd4f606..56a96d9 100755
--- a/usr/local/sbin/ppp-linkdown
+++ b/usr/local/sbin/ppp-linkdown
@@ -9,14 +9,15 @@ if [ "$3" != "" ]; then
/sbin/pfctl -k $3/32
pfctl -K $3/32
fi
-if [ "$4" != "" ]; then
- echo "Removing states to $4" | logger -t ppp-linkdown
- /sbin/pfctl -b 0.0.0.0/32 -b $4/32
+
+OLD_ROUTER=`/bin/cat /tmp/${1}_router`
+if [ "${OLD_ROUTER}" != "" ]; then
+ echo "Removing states to ${OLD_ROUTER}" | logger -t ppp-linkdown
+ /sbin/pfctl -b 0.0.0.0/32 -b ${OLD_ROUTER}/32
if [ -f "/tmp/${interface}_defaultgw" ]; then
- route delete default $4
+ route delete default ${OLD_ROUTER}
fi
-
fi
# delete the node just in case mpd cannot do that
/usr/sbin/ngctl shutdown $1:
diff --git a/usr/local/sbin/ppp-linkup b/usr/local/sbin/ppp-linkup
index dba4412..3a62fbb 100755
--- a/usr/local/sbin/ppp-linkup
+++ b/usr/local/sbin/ppp-linkup
@@ -1,6 +1,13 @@
#!/bin/sh
if [ "$2" == "inet" ]; then
+
+ OLD_ROUTER=`/bin/cat /tmp/${1}_router`
+ if [ "${OLD_ROUTER}" != "" ]; then
+ echo "Removing states to old router ${OLD_ROUTER}" | logger -t ppp-linkup
+ /sbin/pfctl -b 0.0.0.0/32 -b ${OLD_ROUTER}/32
+ fi
+
# let the configuration system know that the ipv4 has changed.
/bin/echo $4 > /tmp/$1_router
/bin/echo $3 > /tmp/$1_ip
diff --git a/usr/local/www/head.inc b/usr/local/www/head.inc
index e73ab0a..5063728 100755
--- a/usr/local/www/head.inc
+++ b/usr/local/www/head.inc
@@ -18,7 +18,7 @@ else
* If this device is an apple ipod/iphone
* switch the theme to one that works with it.
*/
-$lowres_ua = array("iPhone", "iPod", "iPad", "Android", "BlackBerry", "Opera Mini", "Opera Mobi");
+$lowres_ua = array("iPhone", "iPod", "iPad", "Android", "BlackBerry", "Opera Mini", "Opera Mobi", "PlayBook");
foreach($lowres_ua as $useragent)
if(strstr($_SERVER['HTTP_USER_AGENT'], $useragent))
$g['theme'] = empty($g['theme_lowres']) ? "pfsense" : $g['theme_lowres'];
diff --git a/usr/local/www/load_balancer_monitor.php b/usr/local/www/load_balancer_monitor.php
index 0f2bddb..b9ae1e2 100755
--- a/usr/local/www/load_balancer_monitor.php
+++ b/usr/local/www/load_balancer_monitor.php
@@ -64,10 +64,10 @@ if ($_POST) {
}
if ($_GET['act'] == "del") {
- if ($a_monitor[$_GET['id']]) {
+ if (array_key_exists($_GET['id'], $a_monitor)) {
/* make sure no pools reference this entry */
if (is_array($config['load_balancer']['lbpool'])) {
- foreach ($config['load_balancer']['pool'] as $pool) {
+ foreach ($config['load_balancer']['lbpool'] as $pool) {
if ($pool['monitor'] == $a_monitor[$_GET['id']]['name']) {
$input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one pool.");
break;
diff --git a/usr/local/www/load_balancer_pool.php b/usr/local/www/load_balancer_pool.php
index 584d184..9c5f179 100755
--- a/usr/local/www/load_balancer_pool.php
+++ b/usr/local/www/load_balancer_pool.php
@@ -64,11 +64,11 @@ if ($_POST) {
}
if ($_GET['act'] == "del") {
- if ($a_pool[$_GET['id']]) {
+ if (array_key_exists($_GET['id'], $a_pool)) {
/* make sure no virtual servers reference this entry */
if (is_array($config['load_balancer']['virtual_server'])) {
foreach ($config['load_balancer']['virtual_server'] as $vs) {
- if ($vs['pool'] == $a_pool[$_GET['id']]['name']) {
+ if ($vs['poolname'] == $a_pool[$_GET['id']]['name']) {
$input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one virtual server.");
break;
}
diff --git a/usr/local/www/load_balancer_pool_edit.php b/usr/local/www/load_balancer_pool_edit.php
index 252c13b..32b2e4f 100755
--- a/usr/local/www/load_balancer_pool_edit.php
+++ b/usr/local/www/load_balancer_pool_edit.php
@@ -138,8 +138,8 @@ if ($_POST) {
if (isset($id) && $a_pool[$id]) {
/* modify all virtual servers with this name */
for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) {
- if ($config['load_balancer']['virtual_server'][$i]['pool'] == $a_pool[$id]['name'])
- $config['load_balancer']['virtual_server'][$i]['pool'] = $poolent['name'];
+ if ($config['load_balancer']['virtual_server'][$i]['lbpool'] == $a_pool[$id]['name'])
+ $config['load_balancer']['virtual_server'][$i]['lbpool'] = $poolent['name'];
}
$a_pool[$id] = $poolent;
} else
diff --git a/usr/local/www/load_balancer_relay_action.php b/usr/local/www/load_balancer_relay_action.php
index ce853ca..6e0a112 100755
--- a/usr/local/www/load_balancer_relay_action.php
+++ b/usr/local/www/load_balancer_relay_action.php
@@ -65,7 +65,7 @@ if ($_POST) {
}
if ($_GET['act'] == "del") {
- if ($a_action[$_GET['id']]) {
+ if (array_key_exists($_GET['id'], $a_action)) {
/* make sure no relay protocols reference this entry */
if (is_array($config['load_balancer']['lbprotocol'])) {
foreach ($config['load_balancer']['lbprotocol'] as $lbp) {
@@ -92,7 +92,7 @@ if ($_GET['act'] == "del") {
/* for ($i = 0; isset($config['load_balancer']['lbprotocol'][$i]); $i++) {
for ($o = 0; isset($config['load_balancer']['lbprotocol'][$i]['options'][$o]); o++) {
$a_vs[$i]['options'][$o] = "
- $a_vs[$i]['pool'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['pool']]}\">{$a_vs[$i]['pool']}</a>";
+ $a_vs[$i]['poolname'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['poolname']]}\">{$a_vs[$i]['poolname']}</a>";
if ($a_vs[$i]['sitedown'] != '') {
$a_vs[$i]['sitedown'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['sitedown']]}\">{$a_vs[$i]['sitedown']}</a>";
} else {
diff --git a/usr/local/www/load_balancer_relay_protocol.php b/usr/local/www/load_balancer_relay_protocol.php
index b25c840..be812ce 100755
--- a/usr/local/www/load_balancer_relay_protocol.php
+++ b/usr/local/www/load_balancer_relay_protocol.php
@@ -63,7 +63,7 @@ if ($_POST) {
}
if ($_GET['act'] == "del") {
- if ($a_protocol[$_GET['id']]) {
+ if (array_key_exists($_GET['id'], $a_protocol)) {
/* make sure no virtual servers reference this entry */
if (is_array($config['load_balancer']['virtual_server'])) {
foreach ($config['load_balancer']['virtual_server'] as $vs) {
@@ -88,7 +88,7 @@ if ($_GET['act'] == "del") {
/* for ($i = 0; isset($config['load_balancer']['lbprotocol'][$i]); $i++) {
for ($o = 0; isset($config['load_balancer']['lbprotocol'][$i]['options'][$o]); o++) {
$a_vs[$i]['options'][$o] = "
- $a_vs[$i]['pool'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['pool']]}\">{$a_vs[$i]['pool']}</a>";
+ $a_vs[$i]['poolname'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['poolname']]}\">{$a_vs[$i]['poolname']}</a>";
if ($a_vs[$i]['sitedown'] != '') {
$a_vs[$i]['sitedown'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['sitedown']]}\">{$a_vs[$i]['sitedown']}</a>";
} else {
diff --git a/usr/local/www/load_balancer_virtual_server.php b/usr/local/www/load_balancer_virtual_server.php
index 6ed11d4..3ae600a 100755
--- a/usr/local/www/load_balancer_virtual_server.php
+++ b/usr/local/www/load_balancer_virtual_server.php
@@ -63,7 +63,7 @@ if ($_POST) {
}
if ($_GET['act'] == "del") {
- if ($a_vs[$_GET['id']]) {
+ if (array_key_exists($_GET['id'], $a_vs)) {
if (!$input_errors) {
unset($a_vs[$_GET['id']]);
@@ -82,7 +82,7 @@ for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
}
for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) {
if($a_vs[$i]) {
- $a_vs[$i]['pool'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['pool']]}\">{$a_vs[$i]['pool']}</a>";
+ $a_vs[$i]['poolname'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['poolname']]}\">{$a_vs[$i]['poolname']}</a>";
if ($a_vs[$i]['sitedown'] != '') {
$a_vs[$i]['sitedown'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['sitedown']]}\">{$a_vs[$i]['sitedown']}</a>";
} else {
@@ -128,7 +128,7 @@ include("head.inc");
$t->add_column(gettext('Protocol'),'relay_protocol',10);
$t->add_column(gettext('IP Address'),'ipaddr',15);
$t->add_column(gettext('Port'),'port',10);
- $t->add_column(gettext('Pool'),'pool',15);
+ $t->add_column(gettext('Pool'),'poolname',15);
$t->add_column(gettext('Fall Back Pool'),'sitedown',15);
$t->add_column(gettext('Description'),'descr',30);
$t->add_button('edit');
diff --git a/usr/local/www/load_balancer_virtual_server_edit.php b/usr/local/www/load_balancer_virtual_server_edit.php
index 01b0ef3..554bf36 100755
--- a/usr/local/www/load_balancer_virtual_server_edit.php
+++ b/usr/local/www/load_balancer_virtual_server_edit.php
@@ -107,7 +107,7 @@ if ($_POST) {
update_if_changed("name", $vsent['name'], $_POST['name']);
update_if_changed("descr", $vsent['descr'], $_POST['descr']);
- update_if_changed("pool", $vsent['pool'], $_POST['pool']);
+ update_if_changed("poolname", $vsent['poolname'], $_POST['poolname']);
update_if_changed("port", $vsent['port'], $_POST['port']);
update_if_changed("sitedown", $vsent['sitedown'], $_POST['sitedown']);
update_if_changed("ipaddr", $vsent['ipaddr'], $_POST['ipaddr']);
@@ -198,11 +198,11 @@ include("head.inc");
<?php if(count($config['load_balancer']['lbpool']) == 0): ?>
<b><?=gettext("NOTE:"); ?></b> <?=gettext("Please add a pool on the Pools tab to use this feature."); ?>
<?php else: ?>
- <select id="pool" name="pool">
+ <select id="poolname" name="poolname">
<?php
for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
$selected = "";
- if ( $config['load_balancer']['lbpool'][$i]['name'] == $pconfig['pool'] )
+ if ( $config['load_balancer']['lbpool'][$i]['name'] == $pconfig['poolname'] )
$selected = " SELECTED";
echo "<option value=\"{$config['load_balancer']['lbpool'][$i]['name']}\"{$selected}>{$config['load_balancer']['lbpool'][$i]['name']}</option>";
}
diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php
index f608191..c421e80 100755
--- a/usr/local/www/services_captiveportal.php
+++ b/usr/local/www/services_captiveportal.php
@@ -816,7 +816,7 @@ function enable_change(enable_change) {
<tr>
<td class="vncell" valign="top"><?=gettext("Type"); ?></td>
<td class="vtable"><select name="radiusvendor" id="radiusvendor">
- <option><?=gettext("default"); ?></option>
+ <option value="default"><?php echo gettext("default"); ?></option>
<?php
$radiusvendors = array("cisco");
foreach ($radiusvendors as $radiusvendor){
@@ -836,14 +836,14 @@ function enable_change(enable_change) {
<td class="vncell" valign="top"><?=gettext("MAC address format"); ?></td>
<td class="vtable">
<select name="radmac_format" id="radmac_format">
- <option><?=gettext("default"); ?></option>
+ <option value="default"><?php echo gettext("default"); ?></option>
<?php
- $macformats = array(gettext("singledash"),gettext("ietf"),gettext("cisco"),gettext("unformatted"));
+ $macformats = array("singledash","ietf","cisco","unformatted");
foreach ($macformats as $macformat) {
if ($pconfig['radmac_format'] == $macformat)
- echo "<option selected value=\"$macformat\">$macformat</option>\n";
+ echo "<option selected value=\"$macformat\">",gettext($macformat),"</option>\n";
else
- echo "<option value=\"$macformat\">$macformat</option>\n";
+ echo "<option value=\"$macformat\">",gettext($macformat),"</option>\n";
}
?>
</select></br>
diff --git a/usr/local/www/system_authservers.php b/usr/local/www/system_authservers.php
index 158e615..bc88f27 100644
--- a/usr/local/www/system_authservers.php
+++ b/usr/local/www/system_authservers.php
@@ -2,7 +2,7 @@
/*
system_authservers.php
- Copyright (C) 2010 Ermal Lu�i
+ Copyright (C) 2010 Ermal Luçi
Copyright (C) 2008 Shrew Soft Inc.
All rights reserved.
@@ -733,54 +733,60 @@ function select_clicked() {
<?php else: ?>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="25%" class="listhdrr"><?=gettext("Server Name");?></td>
- <td width="25%" class="listhdrr"><?=gettext("Type");?></td>
- <td width="35%" class="listhdrr"><?=gettext("Host Name");?></td>
- <td width="10%" class="list"></td>
- </tr>
- <?php
- $i = 0;
- foreach($a_server as $server):
- $name = htmlspecialchars($server['name']);
- $type = htmlspecialchars($auth_server_types[$server['type']]);
- $host = htmlspecialchars($server['host']);
- ?>
- <tr <?php if ($i < (count($a_server) - 1)): ?> ondblclick="document.location='system_authservers.php?act=edit&id=<?=$i;?>'" <?php endif; ?>>
- <td class="listlr"><?=$name?>&nbsp;</td>
- <td class="listr"><?=$type;?>&nbsp;</td>
- <td class="listr"><?=$host;?>&nbsp;</td>
- <td valign="middle" nowrap class="list">
- <?php if ($i < (count($a_server) - 1)): ?>
- <a href="system_authservers.php?act=edit&id=<?=$i;?>">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit server");?>" alt="<?=gettext("edit server");?>" width="17" height="17" border="0" />
- </a>
- &nbsp;
- <a href="system_authservers.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this Server?");?>')">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete server");?>" alt="<?=gettext("delete server");?>" width="17" height="17" border="0" />
- </a>
- <?php endif; ?>
- </td>
- </tr>
- <?php
- $i++; endforeach;
- ?>
- <tr>
- <td class="list" colspan="3"></td>
- <td class="list">
- <a href="system_authservers.php?act=new">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add server");?>" alt="<?=gettext("add server");?>" width="17" height="17" border="0" />
- </a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>
- <?=gettext("Additional authentication servers can be added here.");?>
- </p>
- </td>
- </tr>
+ <table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <th width="25%" class="listhdrr"><?=gettext("Server Name");?></th>
+ <th width="25%" class="listhdrr"><?=gettext("Type");?></th>
+ <th width="35%" class="listhdrr"><?=gettext("Host Name");?></th>
+ <th width="10%" class="list"></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php
+ $i = 0;
+ foreach($a_server as $server):
+ $name = htmlspecialchars($server['name']);
+ $type = htmlspecialchars($auth_server_types[$server['type']]);
+ $host = htmlspecialchars($server['host']);
+ ?>
+ <tr <?php if ($i < (count($a_server) - 1)): ?> ondblclick="document.location='system_authservers.php?act=edit&id=<?=$i;?>'" <?php endif; ?>>
+ <td class="listlr"><?=$name?>&nbsp;</td>
+ <td class="listr"><?=$type;?>&nbsp;</td>
+ <td class="listr"><?=$host;?>&nbsp;</td>
+ <td valign="middle" nowrap class="list">
+ <?php if ($i < (count($a_server) - 1)): ?>
+ <a href="system_authservers.php?act=edit&id=<?=$i;?>">
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit server");?>" alt="<?=gettext("edit server");?>" width="17" height="17" border="0" />
+ </a>
+ &nbsp;
+ <a href="system_authservers.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this Server?");?>')">
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete server");?>" alt="<?=gettext("delete server");?>" width="17" height="17" border="0" />
+ </a>
+ <?php endif; ?>
+ </td>
+ </tr>
+ <?php
+ $i++; endforeach;
+ ?>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td class="list" colspan="3"></td>
+ <td class="list">
+ <a href="system_authservers.php?act=new">
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add server");?>" alt="<?=gettext("add server");?>" width="17" height="17" border="0" />
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <p>
+ <?=gettext("Additional authentication servers can be added here.");?>
+ </p>
+ </td>
+ </tr>
+ </tfoot>
</table>
<?php endif; ?>
diff --git a/usr/local/www/system_firmware_settings.php b/usr/local/www/system_firmware_settings.php
index 5792a2e..34849d1 100755
--- a/usr/local/www/system_firmware_settings.php
+++ b/usr/local/www/system_firmware_settings.php
@@ -50,12 +50,17 @@ if ($_POST) {
unset($config['system']['firmware']['alturl']['enable']);
unset($config['system']['firmware']['alturl']['firmwareurl']);
unset($config['system']['firmware']['alturl']);
- unset($config['system']['firmware']);
+ unset($config['system']['firmware']);
}
if($_POST['allowinvalidsig'] == "yes")
- $config['system']['firmware']['allowinvalidsig'] = true;
- else
- unset($config['system']['firmware']['allowinvalidsig']);
+ $config['system']['firmware']['allowinvalidsig'] = true;
+ else
+ unset($config['system']['firmware']['allowinvalidsig']);
+
+ if($_POST['disablecheck'] == "yes")
+ $config['system']['firmware']['disablecheck'] = true;
+ else
+ unset($config['system']['firmware']['disablecheck']);
if($_POST['synconupgrade'] == "yes")
$config['system']['gitsync']['synconupgrade'] = true;
@@ -166,6 +171,14 @@ function enable_altfirmwareurl(enable_over) {
<?=gettext("Allow auto-update firmware images with a missing or invalid digital signature to be used."); ?>
</td>
</tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Dashboard check"); ?></td>
+ <td width="78%" class="vtable">
+ <input name="disablecheck" type="checkbox" id="disablecheck" value="yes" <?php if (isset($curcfg['disablecheck'])) echo "checked"; ?> />
+ <br />
+ <?=gettext("Disable the automatic dashboard auto-update check."); ?>
+ </td>
+ </tr>
<?php if(file_exists("/usr/local/bin/git") && $g['platform'] == "pfSense"): ?>
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
diff --git a/usr/local/www/system_groupmanager.php b/usr/local/www/system_groupmanager.php
index def20c7..d6ffe25 100644
--- a/usr/local/www/system_groupmanager.php
+++ b/usr/local/www/system_groupmanager.php
@@ -399,78 +399,84 @@ function presubmit() {
<?php else: ?>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="25%" class="listhdrr"><?=gettext("Group name");?></td>
- <td width="25%" class="listhdrr"><?=gettext("Description");?></td>
- <td width="30%" class="listhdrr"><?=gettext("Member Count");?></td>
- <td width="10%" class="list"></td>
- </tr>
- <?php
- $i = 0;
- foreach($a_group as $group):
-
- if($group['scope'] == "system")
- $grpimg = "/themes/{$g['theme']}/images/icons/icon_system-group-grey.png";
- else
- $grpimg = "/themes/{$g['theme']}/images/icons/icon_system-group.png";
- $groupcount = count($group['member']);
- if ($group["name"] == "all")
- $groupcount = count($config['system']['user']);
- ?>
- <tr ondblclick="document.location='system_groupmanager.php?act=edit&id=<?=$i;?>'">
- <td class="listlr">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td align="left" valign="center">
- <img src="<?=$grpimg;?>" alt="<?=gettext("User");?>" title="<?=gettext("User");?>" border="0" height="16" width="16" />
- </td>
- </td>
- <td align="left" valign="middle">
- <?=htmlspecialchars($group['name']); ?>&nbsp;
- </td>
- </tr>
- </table>
- </td>
- <td class="listr">
- <?=htmlspecialchars($group['description']);?>&nbsp;
- </td>
- <td class="listbg">
- <?=$groupcount;?>
- </td>
- <td valign="middle" nowrap class="list">
- <a href="system_groupmanager.php?act=edit&id=<?=$i;?>">
- <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit group");?>" width="17" height="17" border="0">
- </a>
- &nbsp;
- <?php if($group['scope'] != "system"): ?>
- <a href="system_groupmanager.php?act=delgroup&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this group?"); ?>')">
- <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete group"); ?>" width="17" height="17" border="0">
- </a>
- <?php endif; ?>
- </td>
- </tr>
- <?php
- $i++;
- endforeach;
- ?>
- <tr>
- <td class="list" colspan="3"></td>
- <td class="list">
- <a href="system_groupmanager.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add group");?>" width="17" height="17" border="0">
- </a>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <p>
- <?=gettext("Additional webConfigurator groups can be added here.
- Group permissions can be assigned which are inherited by users who are members of the group.
- An icon that appears grey indicates that it is a system defined object.
- Some system object properties can be modified but they cannot be deleted.");?>
- </p>
- </td>
- </tr>
+ <table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <th width="25%" class="listhdrr"><?=gettext("Group name");?></th>
+ <th width="25%" class="listhdrr"><?=gettext("Description");?></th>
+ <th width="30%" class="listhdrr"><?=gettext("Member Count");?></th>
+ <th width="10%" class="list"></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php
+ $i = 0;
+ foreach($a_group as $group):
+
+ if($group['scope'] == "system")
+ $grpimg = "/themes/{$g['theme']}/images/icons/icon_system-group-grey.png";
+ else
+ $grpimg = "/themes/{$g['theme']}/images/icons/icon_system-group.png";
+ $groupcount = count($group['member']);
+ if ($group["name"] == "all")
+ $groupcount = count($config['system']['user']);
+ ?>
+ <tr ondblclick="document.location='system_groupmanager.php?act=edit&id=<?=$i;?>'">
+ <td class="listlr">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td align="left" valign="center">
+ <img src="<?=$grpimg;?>" alt="<?=gettext("User");?>" title="<?=gettext("User");?>" border="0" height="16" width="16" />
+ </td>
+ </td>
+ <td align="left" valign="middle">
+ <?=htmlspecialchars($group['name']); ?>&nbsp;
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="listr">
+ <?=htmlspecialchars($group['description']);?>&nbsp;
+ </td>
+ <td class="listbg">
+ <?=$groupcount;?>
+ </td>
+ <td valign="middle" nowrap class="list">
+ <a href="system_groupmanager.php?act=edit&id=<?=$i;?>">
+ <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit group");?>" width="17" height="17" border="0">
+ </a>
+ &nbsp;
+ <?php if($group['scope'] != "system"): ?>
+ <a href="system_groupmanager.php?act=delgroup&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this group?"); ?>')">
+ <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete group"); ?>" width="17" height="17" border="0">
+ </a>
+ <?php endif; ?>
+ </td>
+ </tr>
+ <?php
+ $i++;
+ endforeach;
+ ?>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td class="list" colspan="3"></td>
+ <td class="list">
+ <a href="system_groupmanager.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add group");?>" width="17" height="17" border="0">
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+ <p>
+ <?=gettext("Additional webConfigurator groups can be added here.
+ Group permissions can be assigned which are inherited by users who are members of the group.
+ An icon that appears grey indicates that it is a system defined object.
+ Some system object properties can be modified but they cannot be deleted.");?>
+ </p>
+ </td>
+ </tr>
+ </tfoot>
</table>
<?php endif; ?>
diff --git a/usr/local/www/system_usermanager.php b/usr/local/www/system_usermanager.php
index 68ac908..ab69fe5 100644
--- a/usr/local/www/system_usermanager.php
+++ b/usr/local/www/system_usermanager.php
@@ -780,80 +780,86 @@ function sshkeyClicked(obj) {
<?php else: ?>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="25%" class="listhdrr"><?=gettext("Username"); ?></td>
- <td width="25%" class="listhdrr"><?=gettext("Full name"); ?></td>
- <td width="5%" class="listhdrr"><?=gettext("Disabled"); ?></td>
- <td width="25%" class="listhdrr"><?=gettext("Groups"); ?></td>
- <td width="10%" class="list"></td>
- </tr>
- <?php
- $i = 0;
- foreach($a_user as $userent):
- ?>
- <tr ondblclick="document.location='system_usermanager.php?act=edit&id=<?=$i;?>'">
- <td class="listlr">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td align="left" valign="center">
- <?php
- if($userent['scope'] != "user")
- $usrimg = "/themes/{$g['theme']}/images/icons/icon_system-user-grey.png";
- else
- $usrimg = "/themes/{$g['theme']}/images/icons/icon_system-user.png";
- ?>
- <img src="<?=$usrimg;?>" alt="<?=gettext("User"); ?>" title="<?=gettext("User"); ?>" border="0" height="16" width="16" />
- </td>
- <td align="left" valign="middle">
- <?=htmlspecialchars($userent['name']);?>
- </td>
- </tr>
- </table>
- </td>
- <td class="listr"><?=htmlspecialchars($userent['descr']);?>&nbsp;</td>
- <td class="listr"><?php if(isset($userent['disabled'])) echo "*"; ?></td>
- <td class="listbg">
- <?=implode(",",local_user_get_groups($userent));?>
- &nbsp;
- </td>
- <td valign="middle" nowrap class="list">
- <a href="system_usermanager.php?act=edit&id=<?=$i;?>">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit user"); ?>" alt="<?=gettext("edit user"); ?>" width="17" height="17" border="0" />
- </a>
- <?php if($userent['scope'] != "system"): ?>
- &nbsp;
- <a href="system_usermanager.php?act=deluser&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this User?");?>')">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete user"); ?>" alt="<?=gettext("delete user"); ?>" width="17" height="17" border="0" />
- </a>
- <?php endif; ?>
- </td>
- </tr>
- <?php
- $i++;
- endforeach;
- ?>
- <tr>
- <td class="list" colspan="4"></td>
- <td class="list">
- <a href="system_usermanager.php?act=new">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add user"); ?>" alt="<?=gettext("add user"); ?>" width="17" height="17" border="0" />
- </a>
- </td>
- </tr>
- <tr>
- <td colspan="4">
- <p>
- <?=gettext("Additional users can be added here. User permissions for accessing " .
- "the webConfigurator can be assigned directly or inherited from group memberships. " .
- "An icon that appears grey indicates that it is a system defined object. " .
- "Some system object properties can be modified but they cannot be deleted."); ?>
- <br/><br/>
- <?=gettext("Accounts created here are also used for other parts of the system " .
- "such as OpenVPN, IPsec, and Captive Portal.");?>
- </p>
- </td>
- </tr>
+ <table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <th width="25%" class="listhdrr"><?=gettext("Username"); ?></th>
+ <th width="25%" class="listhdrr"><?=gettext("Full name"); ?></th>
+ <th width="5%" class="listhdrr"><?=gettext("Disabled"); ?></th>
+ <th width="25%" class="listhdrr"><?=gettext("Groups"); ?></th>
+ <th width="10%" class="list"></td>
+ </tr>
+ </thead>
+ <tbody>
+ <?php
+ $i = 0;
+ foreach($a_user as $userent):
+ ?>
+ <tr ondblclick="document.location='system_usermanager.php?act=edit&id=<?=$i;?>'">
+ <td class="listlr">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td align="left" valign="center">
+ <?php
+ if($userent['scope'] != "user")
+ $usrimg = "/themes/{$g['theme']}/images/icons/icon_system-user-grey.png";
+ else
+ $usrimg = "/themes/{$g['theme']}/images/icons/icon_system-user.png";
+ ?>
+ <img src="<?=$usrimg;?>" alt="<?=gettext("User"); ?>" title="<?=gettext("User"); ?>" border="0" height="16" width="16" />
+ </td>
+ <td align="left" valign="middle">
+ <?=htmlspecialchars($userent['name']);?>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="listr"><?=htmlspecialchars($userent['descr']);?>&nbsp;</td>
+ <td class="listr"><?php if(isset($userent['disabled'])) echo "*"; ?></td>
+ <td class="listbg">
+ <?=implode(",",local_user_get_groups($userent));?>
+ &nbsp;
+ </td>
+ <td valign="middle" nowrap class="list">
+ <a href="system_usermanager.php?act=edit&id=<?=$i;?>">
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit user"); ?>" alt="<?=gettext("edit user"); ?>" width="17" height="17" border="0" />
+ </a>
+ <?php if($userent['scope'] != "system"): ?>
+ &nbsp;
+ <a href="system_usermanager.php?act=deluser&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this User?");?>')">
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete user"); ?>" alt="<?=gettext("delete user"); ?>" width="17" height="17" border="0" />
+ </a>
+ <?php endif; ?>
+ </td>
+ </tr>
+ <?php
+ $i++;
+ endforeach;
+ ?>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td class="list" colspan="4"></td>
+ <td class="list">
+ <a href="system_usermanager.php?act=new">
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add user"); ?>" alt="<?=gettext("add user"); ?>" width="17" height="17" border="0" />
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <p>
+ <?=gettext("Additional users can be added here. User permissions for accessing " .
+ "the webConfigurator can be assigned directly or inherited from group memberships. " .
+ "An icon that appears grey indicates that it is a system defined object. " .
+ "Some system object properties can be modified but they cannot be deleted."); ?>
+ <br/><br/>
+ <?=gettext("Accounts created here are also used for other parts of the system " .
+ "such as OpenVPN, IPsec, and Captive Portal.");?>
+ </p>
+ </td>
+ </tr>
+ </tfoot>
</table>
<?php endif; ?>
diff --git a/usr/local/www/vpn_ipsec_mobile.php b/usr/local/www/vpn_ipsec_mobile.php
index 34987d7..1da67e1 100755
--- a/usr/local/www/vpn_ipsec_mobile.php
+++ b/usr/local/www/vpn_ipsec_mobile.php
@@ -61,6 +61,7 @@ if (count($a_client)) {
$pconfig['net_list'] = $a_client['net_list'];
$pconfig['save_passwd'] = $a_client['save_passwd'];
$pconfig['dns_domain'] = $a_client['dns_domain'];
+ $pconfig['dns_split'] = $a_client['dns_split'];
$pconfig['dns_server1'] = $a_client['dns_server1'];
$pconfig['dns_server2'] = $a_client['dns_server2'];
$pconfig['dns_server3'] = $a_client['dns_server3'];
@@ -87,6 +88,9 @@ if (count($a_client)) {
if ($pconfig['dns_domain'])
$pconfig['dns_domain_enable'] = true;
+ if ($pconfig['dns_split'])
+ $pconfig['dns_split_enable'] = true;
+
if ($pconfig['dns_server1']||$pconfig['dns_server2']||$pconfig['dns_server3']||$pconfig['dns_server4'])
$pconfig['dns_server_enable'] = true;
@@ -137,6 +141,18 @@ if ($_POST['submit']) {
if (!is_domain($pconfig['dns_domain']))
$input_errors[] = gettext("A valid value for 'DNS Default Domain' must be specified.");
+ if ($pconfig['dns_split_enable']) {
+ if (!empty($pconfig['dns_split'])) {
+ $domain_array=preg_split("/[ ,]+/",$pconfig['dns_split']);
+ foreach ($domain_array as $curdomain) {
+ if (!is_domain($curdomain)) {
+ $input_errors[] = gettext("A valid split DNS domain list must be specified.");
+ break;
+ }
+ }
+ }
+ }
+
if ($pconfig['dns_server_enable']) {
if (!$pconfig['dns_server1'] && !$pconfig['dns_server2'] &&
!$pconfig['dns_server3'] && !$pconfig['dns_server4'] )
@@ -187,6 +203,9 @@ if ($_POST['submit']) {
if ($pconfig['dns_domain_enable'])
$client['dns_domain'] = $pconfig['dns_domain'];
+ if ($pconfig['dns_split_enable'])
+ $client['dns_split'] = $pconfig['dns_split'];
+
if ($pconfig['dns_server_enable']) {
$client['dns_server1'] = $pconfig['dns_server1'];
$client['dns_server2'] = $pconfig['dns_server2'];
@@ -248,6 +267,14 @@ function dns_domain_change() {
document.iform.dns_domain.disabled = 1;
}
+function dns_split_change() {
+
+ if (document.iform.dns_split_enable.checked)
+ document.iform.dns_split.disabled = 0;
+ else
+ document.iform.dns_split.disabled = 1;
+}
+
function dns_server_change() {
if (document.iform.dns_server_enable.checked) {
@@ -475,6 +502,30 @@ function login_banner_change() {
</table>
</td>
</tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Split DNS"); ?></td>
+ <td width="78%" class="vtable">
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr>
+ <td>
+ <?php set_checked($pconfig['dns_split_enable'],$chk); ?>
+ <input name="dns_split_enable" type="checkbox" id="dns_split_enable" value="yes" <?=$chk;?> onClick="dns_split_change()">
+ </td>
+ <td>
+ <?=gettext("Provide a list of split DNS domain names to clients. Enter a comma separated list."); ?><br>
+ <?=gettext("NOTE: If left blank, and a default domain is set, it will be used for this value."); ?>
+ </td>
+ </tr>
+ </table>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr>
+ <td>
+ <input name="dns_split" type="text" class="formfld unknown" id="dns_split" size="30" value="<?=htmlspecialchars($pconfig['dns_split']);?>">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("DNS Servers"); ?></td>
<td width="78%" class="vtable">
@@ -616,6 +667,7 @@ function login_banner_change() {
<script language="JavaScript">
pool_change();
dns_domain_change();
+dns_split_change();
dns_server_change();
wins_server_change();
pfs_group_change();
diff --git a/usr/local/www/vpn_openvpn_client.php b/usr/local/www/vpn_openvpn_client.php
index f2002ed..8b269f5 100644
--- a/usr/local/www/vpn_openvpn_client.php
+++ b/usr/local/www/vpn_openvpn_client.php
@@ -75,12 +75,12 @@ else
if ($_GET['act'] == "del") {
- if (!$a_client[$id]) {
+ if (!isset($a_client[$id])) {
pfSenseHeader("vpn_openvpn_client.php");
exit;
}
-
- openvpn_delete('client', $a_client[$id]);
+ if (!empty($a_client[$id]))
+ openvpn_delete('client', $a_client[$id]);
unset($a_client[$id]);
write_config();
$savemsg = gettext("Client successfully deleted")."<br/>";
diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php
index d098f43..c187878 100644
--- a/usr/local/www/vpn_openvpn_server.php
+++ b/usr/local/www/vpn_openvpn_server.php
@@ -76,12 +76,12 @@ else
if ($_GET['act'] == "del") {
- if (!$a_server[$id]) {
+ if (!isset($a_server[$id])) {
pfSenseHeader("vpn_openvpn_server.php");
exit;
}
-
- openvpn_delete('server', $a_server[$id]);
+ if (!empty($a_server[$id]))
+ openvpn_delete('server', $a_server[$id]);
unset($a_server[$id]);
write_config();
$savemsg = gettext("Server successfully deleted")."<br/>";
@@ -202,9 +202,6 @@ if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
- if ($pconfig['dev_mode'] <> $a_server[$id]['dev_mode'])
- openvpn_delete('server', $a_server[$id]);// delete(rename) interface so a new TUN or TAP interface can be created.
-
if (isset($id) && $a_server[$id])
$vpnid = $a_server[$id]['vpnid'];
else
diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php
index f057866..2a7055d 100644
--- a/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/usr/local/www/widgets/widgets/system_information.widget.php
@@ -38,6 +38,9 @@ require_once("guiconfig.inc");
require_once('notices.inc');
if($_REQUEST['getupdatestatus']) {
+ if(isset($config['system']['firmware']['disablecheck'])) {
+ exit;
+ }
if(isset($config['system']['firmware']['alturl']['enable']))
$updater_url = "{$config['system']['firmware']['alturl']['firmwareurl']}";
else
@@ -93,9 +96,11 @@ $curcfg = $config['system']['firmware'];
(<?php echo php_uname("m"); ?>)
<br />
built on <?php readfile("/etc/version.buildtime"); ?>
- <br />
- <div name="uname" id="uname"><a href="#" onClick='swapuname(); return false;'><?php echo php_uname("s") . " " . php_uname("r"); ?></a></div>
- <div id='updatestatus'><br/>Obtaining update status...</div>
+ <br />
+ <div name="uname" id="uname"><a href="#" onClick='swapuname(); return false;'><?php echo php_uname("s") . " " . php_uname("r"); ?></a></div>
+ <?php if(!isset($config['system']['firmware']['disablecheck'])): ?>
+ <div id='updatestatus'><br/><?php echo gettext("Obtaining update status"); ?> ...</div>
+ <?php endif; ?>
</td>
</tr>
<?php if(!$g['hideplatform']): ?>
@@ -248,6 +253,10 @@ $curcfg = $config['system']['firmware'];
</tbody>
</table>
<script type="text/javascript">
+ function swapuname() {
+ jQuery('#uname').html("<?php echo php_uname("a"); ?>");
+ }
+ <?php if(!isset($config['system']['firmware']['disablecheck'])): ?>
function getstatus() {
scroll(0,0);
var url = "/widgets/widgets/system_information.widget.php";
@@ -265,8 +274,6 @@ $curcfg = $config['system']['firmware'];
// to avoid this we set the innerHTML property
jQuery('#updatestatus').prop('innerHTML',transport.responseText);
}
- function swapuname() {
- jQuery('#uname').html("<?php echo php_uname("a"); ?>");
- }
setTimeout('getstatus()', 4000);
+ <?php endif; ?>
</script>
OpenPOWER on IntegriCloud