From 6b421a0fb42a50d1e87ac63c64a5b8b8d2157577 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 1 Jun 2011 10:46:55 +0000 Subject: [PATCH 1/7] Fixes #944. Use the correct interface name to destroy the previous vlan if the parent is changed. --- usr/local/www/interfaces_vlan_edit.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/usr/local/www/interfaces_vlan_edit.php b/usr/local/www/interfaces_vlan_edit.php index 145fe0a201..078fc3bb85 100755 --- a/usr/local/www/interfaces_vlan_edit.php +++ b/usr/local/www/interfaces_vlan_edit.php @@ -97,9 +97,13 @@ if ($_POST) { if (!$input_errors) { if (isset($id) && $a_vlans[$id]) { - if ($a_vlans[$id]['if'] != $_POST['if']) - // Destroy previous vlan - pfSense_interface_destroy($a_vlans[$id]['if']); + if ($a_vlans[$id]['if'] != $_POST['if']) { + if (!empty($a_vlans[$id]['vlanif'])) + // Destroy previous vlan + pfSense_interface_destroy($a_vlans[$id]['vlanif']); + else + pfSense_interface_destroy("{$a_vlans[$id]['if']}_vlan{$a_vlans[$id]['tag']}"); + } } $vlan = array(); $vlan['if'] = $_POST['if']; From 695a35aecdf3eefc4d529b57dabb1b5c0018e9c9 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 1 Jun 2011 10:49:02 +0000 Subject: [PATCH 2/7] Ticket #944. Also destory the previous interface if the user changing the vlan tag of an existing vlan entry. --- usr/local/www/interfaces_vlan_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/local/www/interfaces_vlan_edit.php b/usr/local/www/interfaces_vlan_edit.php index 078fc3bb85..08f1a534ca 100755 --- a/usr/local/www/interfaces_vlan_edit.php +++ b/usr/local/www/interfaces_vlan_edit.php @@ -97,7 +97,7 @@ if ($_POST) { if (!$input_errors) { if (isset($id) && $a_vlans[$id]) { - if ($a_vlans[$id]['if'] != $_POST['if']) { + if (($a_vlans[$id]['if'] != $_POST['if']) || ($a_vlans[$id]['tag'] != $_POST['tag'])) { if (!empty($a_vlans[$id]['vlanif'])) // Destroy previous vlan pfSense_interface_destroy($a_vlans[$id]['vlanif']); From 97c1f2684c5dd225075fec08148f084ff190af0a Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 1 Jun 2011 11:14:51 +0000 Subject: [PATCH 3/7] Fixes #1412. Properly pass the page to match so users are not always presented with the change password screen. --- usr/local/www/system_usermanager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/local/www/system_usermanager.php b/usr/local/www/system_usermanager.php index d810cb9239..597aefd070 100644 --- a/usr/local/www/system_usermanager.php +++ b/usr/local/www/system_usermanager.php @@ -49,7 +49,7 @@ require("certs.inc"); require("guiconfig.inc"); -if (isAllowedPage("system_usermanager")) { +if (isAllowedPage("system_usermanager*")) { // start admin user code $pgtitle = array(gettext("System"),gettext("User Manager")); From 9584d162d29c6c692eac0dc58292c1071e24992e Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 1 Jun 2011 12:23:52 +0000 Subject: [PATCH 4/7] Fixes #1412. Properly pass the page to match so users are not always presented with the change password screen. Proper fix. --- usr/local/www/system_usermanager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/local/www/system_usermanager.php b/usr/local/www/system_usermanager.php index 597aefd070..cc6c4f13b1 100644 --- a/usr/local/www/system_usermanager.php +++ b/usr/local/www/system_usermanager.php @@ -49,7 +49,7 @@ require("certs.inc"); require("guiconfig.inc"); -if (isAllowedPage("system_usermanager*")) { +if (isAllowedPage("system_usermanager.php*")) { // start admin user code $pgtitle = array(gettext("System"),gettext("User Manager")); From f4645d7f48536903d9426137c99438fd0c25a080 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 1 Jun 2011 14:03:57 +0000 Subject: [PATCH 5/7] Add tunable, by default disabled, to enable the default gateway switching feature when the default one 'disappears'. --- etc/inc/gwlb.inc | 2 +- usr/local/www/system_advanced_misc.php | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 9b4c32be77..66a0af3895 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -367,7 +367,7 @@ function return_gateway_groups_array() { $gateways_arr = return_gateways_array(); $gateway_groups_array = array(); - if (0) { + 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. diff --git a/usr/local/www/system_advanced_misc.php b/usr/local/www/system_advanced_misc.php index 51857abb65..21bff54eef 100644 --- a/usr/local/www/system_advanced_misc.php +++ b/usr/local/www/system_advanced_misc.php @@ -56,6 +56,7 @@ $pconfig['proxyuser'] = $config['system']['proxyuser']; $pconfig['proxypass'] = $config['system']['proxypass']; $pconfig['harddiskstandby'] = $config['system']['harddiskstandby']; $pconfig['lb_use_sticky'] = isset($config['system']['lb_use_sticky']); +$pconfig['gw_switch_default'] = isset($config['system']['gw_switch_default']); $pconfig['preferoldsa_enable'] = isset($config['ipsec']['preferoldsa']); $pconfig['racoondebug_enable'] = isset($config['ipsec']['racoondebug']); $pconfig['maxmss_enable'] = isset($config['system']['maxmss_enable']); @@ -106,6 +107,11 @@ if ($_POST) { else unset($config['system']['lb_use_sticky']); + if($_POST['gw_switch_default'] == "yes") + $config['system']['gw_switch_default'] = true; + else + unset($config['system']['gw_switch_default']); + if($_POST['preferoldsa_enable'] == "yes") $config['ipsec']['preferoldsa'] = true; else @@ -271,6 +277,15 @@ function maxmss_checked(obj) { "robin."); ?> + + + + /> +
+ + +   From a01ce4c764cbdbfe4a83f9b79bf0a4394e6be016 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 1 Jun 2011 16:53:18 -0400 Subject: [PATCH 6/7] Make the ICMP echo request type less ambiguous, and since it's likely the main one to get used, move it to the top. --- usr/local/www/firewall_rules.php | 2 +- usr/local/www/firewall_rules_edit.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php index daf577a850..82d03236ad 100755 --- a/usr/local/www/firewall_rules.php +++ b/usr/local/www/firewall_rules.php @@ -126,12 +126,12 @@ if($_REQUEST['dragdroporder']) { $icmptypes = array( "" => gettext("any"), + "echoreq" => gettext("Echo request"), "echorep" => gettext("Echo reply"), "unreach" => gettext("Destination unreachable"), "squench" => gettext("Source quench"), "redir" => gettext("Redirect"), "althost" => gettext("Alternate Host"), - "echoreq" => gettext("Echo"), "routeradv" => gettext("Router advertisement"), "routersol" => gettext("Router solicitation"), "timex" => gettext("Time exceeded"), diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index bd8f48d521..acebe3c7a4 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -746,12 +746,12 @@ include("head.inc"); gettext("any"), + "echoreq" => gettext("Echo request"), "echorep" => gettext("Echo reply"), "unreach" => gettext("Destination unreachable"), "squench" => gettext("Source quench"), "redir" => gettext("Redirect"), "althost" => gettext("Alternate Host"), - "echoreq" => gettext("Echo"), "routeradv" => gettext("Router advertisement"), "routersol" => gettext("Router solicitation"), "timex" => gettext("Time exceeded"), From 2e88102db07966b24dabb559e300ba88ed849da3 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 1 Jun 2011 17:39:27 -0400 Subject: [PATCH 7/7] Disable this until it can be properly fixed. --- etc/inc/system.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 72b2e0df69..7e105ab7c6 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -1256,7 +1256,7 @@ function system_reboot_cleanup() { captiveportal_radius_stop_all(); require_once("voucher.inc"); voucher_save_db_to_config(); - mwexec("/etc/rc.stop_packages"); + // mwexec("/etc/rc.stop_packages"); } function system_do_shell_commands($early = 0) {