Project

General

Profile

« Previous | Next » 

Revision 997ec02a

Added by Scott Ullrich over 19 years ago

Add p2p catch all rules AFTER sorting rules by priority

View differences:

usr/local/www/wizards/traffic_shaper_wizard.xml
2018 2018
			    $config['shaper']['rule'][] = $rule;
2019 2019
		    }
2020 2020
		}
2021
    }		
2022
	</stepsubmitphpaction>
2023
</step>
2024
<step>
2025
        <id>7</id>
2026
        <title>pfSense Traffic Shaper Wizard</title>
2027
        <field>
2028
		<name>Reload profile notice</name>
2029
		<type>listtopic</type>
2030
        </field>	
2031
        <description>
2032
	    After pressing Finish the system will load the new profile.&lt;br/&gt;
2033
	    Please note that this may take a moment.&lt;br/&gt;
2034
	    Also note that the traffic shaper is stateful meaning that only new connections will be shaped.&lt;br/&gt;
2035
	    If this is an issue please reset the state table after loading the profile.&lt;br/&gt;
2036
	</description>
2037
	<fields>
2038
                <field>
2039
                        <name>Finish</name>
2040
                        <type>submit</type>
2041
                </field>
2042
	</fields>
2043
	<stepbeforeformdisplay>
2044
		if($config['shaper']['itemsshaped'] == "0") {
2045
		    /*    no shaper items have been selected 
2046
		     *    wipe previous
2047
		     */
2048
		    unset($config['shaper']['queue']);
2049
		    unset($config['shaper']['rule']);
2050
		    unset($config['shaper']);
2051
		    $config['shaper']['enable'] = FALSE;
2052
		    $message = "No items have been selected to shape.  Exiting traffic shaper wizard.";
2053
		    write_config("No shaper items picked, unsetting shaper configuration");
2054
		    header("Location: /wizard.php?xml=traffic_shaper_wizard.xml&amp;stepid=7&amp;message={$message}");
2055
		    exit;
2056
		}	    
2057
	</stepbeforeformdisplay>
2058
	<stepsubmitphpaction>
2059
		/* Sort rules by queue priority */
2060
		 sort_rule_by_queue_priority(); 
2021 2061

  
2022 2062
		/* install default p2p catch all rule if user has enabled option (MUST BE LAST!) */
2023 2063
		if($config['ezshaper']['step4']['p2pcatchall'] == "on") {
......
2063 2103
			    $config['shaper']['rule'][] = $rule;
2064 2104
		    }
2065 2105
		}
2066
		
2067
    }		
2068
	</stepsubmitphpaction>
2069
</step>
2070
<step>
2071
        <id>7</id>
2072
        <title>pfSense Traffic Shaper Wizard</title>
2073
        <field>
2074
		<name>Reload profile notice</name>
2075
		<type>listtopic</type>
2076
        </field>	
2077
        <description>
2078
	    After pressing Finish the system will load the new profile.&lt;br/&gt;
2079
	    Please note that this may take a moment.&lt;br/&gt;
2080
	    Also note that the traffic shaper is stateful meaning that only new connections will be shaped.&lt;br/&gt;
2081
	    If this is an issue please reset the state table after loading the profile.&lt;br/&gt;
2082
	</description>
2083
	<fields>
2084
                <field>
2085
                        <name>Finish</name>
2086
                        <type>submit</type>
2087
                </field>
2088
	</fields>
2089
	<stepbeforeformdisplay>
2090
		if($config['shaper']['itemsshaped'] == "0") {
2091
		    /*    no shaper items have been selected 
2092
		     *    wipe previous
2093
		     */
2094
		    unset($config['shaper']['queue']);
2095
		    unset($config['shaper']['rule']);
2096
		    unset($config['shaper']);
2097
		    $config['shaper']['enable'] = FALSE;
2098
		    $message = "No items have been selected to shape.  Exiting traffic shaper wizard.";
2099
		    write_config("No shaper items picked, unsetting shaper configuration");
2100
		    header("Location: /wizard.php?xml=traffic_shaper_wizard.xml&amp;stepid=7&amp;message={$message}");
2101
		    exit;
2102
		}	    
2103
	</stepbeforeformdisplay>
2104
	<stepsubmitphpaction>
2105
		/* Sort rules by queue priority */
2106
		 sort_rule_by_queue_priority(); 
2107 2106

  
2108 2107
		/* Enable shaper */
2109 2108
		$config['shaper']['enable'] = TRUE;

Also available in: Unified diff