Commit be6b4274 authored by Ad Schellevis's avatar Ad Schellevis

(firewall) remove 802.1p rules

parent efed952d
...@@ -2381,10 +2381,6 @@ function filter_generate_user_rule($rule) ...@@ -2381,10 +2381,6 @@ function filter_generate_user_rule($rule)
default: $aline['dscp'] = " dscp " . $rule['dscp'] . " "; break; default: $aline['dscp'] = " dscp " . $rule['dscp'] . " "; break;
} }
} }
if (!empty($rule['vlanprio']) && ($rule['vlanprio'] != "none"))
$aline['vlanprio'] = " ieee8021q-pcp " . $rule['vlanprio'] . " ";
if (!empty($rule['vlanprioset']) && ($rule['vlanprioset'] != "none"))
$aline['vlanprioset'] = " ieee8021q-setpcp " . $rule['vlanprioset'] . " ";
if ($type == "pass") { if ($type == "pass") {
if (isset($rule['allowopts'])) if (isset($rule['allowopts']))
$aline['allowopts'] = " allow-opts "; $aline['allowopts'] = " allow-opts ";
...@@ -2539,7 +2535,7 @@ function filter_generate_user_rule($rule) ...@@ -2539,7 +2535,7 @@ function filter_generate_user_rule($rule)
$line .= $aline['type'] . $aline['direction'] . $aline['log'] . $aline['quick'] . $line .= $aline['type'] . $aline['direction'] . $aline['log'] . $aline['quick'] .
$aline['interface'] . $aline['ipprotocol'] . $aline['prot'] . $aline['src'] . $aline['os'] . $aline['interface'] . $aline['ipprotocol'] . $aline['prot'] . $aline['src'] . $aline['os'] .
$negate_networks . $aline['icmp-type'] . $aline['icmp6-type'] . $aline['tag'] . $aline['tagged'] . $negate_networks . $aline['icmp-type'] . $aline['icmp6-type'] . $aline['tag'] . $aline['tagged'] .
$aline['vlanprio'] . $aline['vlanprioset'] . $aline['dscp'] . $aline['allowopts'] . $aline['flags'] . $aline['dscp'] . $aline['allowopts'] . $aline['flags'] .
$aline['queue'] . $aline['schedlabel'] . $aline['queue'] . $aline['schedlabel'] .
" label \"NEGATE_ROUTE: Negate policy routing for destination\"\n"; " label \"NEGATE_ROUTE: Negate policy routing for destination\"\n";
...@@ -2548,7 +2544,7 @@ function filter_generate_user_rule($rule) ...@@ -2548,7 +2544,7 @@ function filter_generate_user_rule($rule)
$line .= $aline['type'] . $aline['direction'] . $aline['log'] . $aline['quick'] . $aline['interface'] . $line .= $aline['type'] . $aline['direction'] . $aline['log'] . $aline['quick'] . $aline['interface'] .
$aline['reply'] . $aline['route'] . $aline['ipprotocol'] . $aline['prot'] . $aline['src'] . $aline['os'] . $aline['dst'] . $aline['reply'] . $aline['route'] . $aline['ipprotocol'] . $aline['prot'] . $aline['src'] . $aline['os'] . $aline['dst'] .
$aline['divert'] . $aline['icmp-type'] . $aline['icmp6-type'] . $aline['tag'] . $aline['tagged'] . $aline['dscp'] . $aline['divert'] . $aline['icmp-type'] . $aline['icmp6-type'] . $aline['tag'] . $aline['tagged'] . $aline['dscp'] .
$aline['vlanprio'] . $aline['vlanprioset'] . $aline['allowopts'] . $aline['flags'] . $aline['queue'] . $aline['schedlabel']; $aline['allowopts'] . $aline['flags'] . $aline['queue'] . $aline['schedlabel'];
unset($aline); unset($aline);
......
...@@ -211,8 +211,6 @@ if (isset($id) && $a_filter[$id]) { ...@@ -211,8 +211,6 @@ if (isset($id) && $a_filter[$id]) {
//schedule support //schedule support
$pconfig['sched'] = (($a_filter[$id]['sched'] == "none") ? '' : $a_filter[$id]['sched']); $pconfig['sched'] = (($a_filter[$id]['sched'] == "none") ? '' : $a_filter[$id]['sched']);
$pconfig['vlanprio'] = (($a_filter[$id]['vlanprio'] == "none") ? '' : $a_filter[$id]['vlanprio']);
$pconfig['vlanprioset'] = (($a_filter[$id]['vlanprioset'] == "none") ? '' : $a_filter[$id]['vlanprioset']);
if (!isset($_GET['dup']) || !is_numericint($_GET['dup'])) if (!isset($_GET['dup']) || !is_numericint($_GET['dup']))
$pconfig['associated-rule-id'] = $a_filter[$id]['associated-rule-id']; $pconfig['associated-rule-id'] = $a_filter[$id]['associated-rule-id'];
...@@ -682,13 +680,6 @@ if ($_POST) { ...@@ -682,13 +680,6 @@ if ($_POST) {
$filterent['sched'] = $_POST['sched']; $filterent['sched'] = $_POST['sched'];
} }
if ($_POST['vlanprio'] != "") {
$filterent['vlanprio'] = $_POST['vlanprio'];
}
if ($_POST['vlanprioset'] != "") {
$filterent['vlanprioset'] = $_POST['vlanprioset'];
}
// If we have an associated nat rule, make sure the source and destination doesn't change // If we have an associated nat rule, make sure the source and destination doesn't change
if( isset($a_filter[$id]['associated-rule-id']) ) { if( isset($a_filter[$id]['associated-rule-id']) ) {
$filterent['interface'] = $a_filter[$id]['interface']; $filterent['interface'] = $a_filter[$id]['interface'];
...@@ -1373,50 +1364,6 @@ include("head.inc"); ...@@ -1373,50 +1364,6 @@ include("head.inc");
</div> </div>
</td> </td>
</tr> </tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("802.1p");?></td>
<td width="78%" class="vtable">
<div id="showadvvlanpriobox" <?php if (!empty($pconfig['vlanprio'])) echo "style='display:none'"; ?>>
<input type="button" onclick="show_advanced_vlanprio()" class="btn btn-default" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
</div>
<div id="showvlanprioadv" <?php if (empty($pconfig['vlanprio'])) echo "style='display:none'"; ?>>
<?php $vlanprio = array("none", "be", "bk", "ee", "ca", "vi", "vo", "ic", "nc"); ?>
<?php
$opts = "";
foreach($vlanprio as $vprio) {
if ($vprio == $pconfig['vlanprio'])
$selected = " selected=\"selected\"";
else
$selected = "";
if ($vprio == "none")
$opts .= "<option value=\"\">{$vprio}</option>\n";
else
$opts .= "<option value=\"{$vprio}\" {$selected}>" . strtoupper($vprio) . "</option>\n";
}
$optsset = "";
foreach($vlanprio as $vprioset) {
if ($vprioset == $pconfig['vlanprioset'])
$selected = " selected=\"selected\"";
else
$selected = "";
if ($vprioset == "none")
$optsset .= "<option value=\"\">{$vprioset}</option>\n";
else
$optsset .= "<option value=\"{$vprioset}\" {$selected}>" . strtoupper($vprioset) . "</option>\n";
}
?>
<select name='vlanprio'>
<?php echo $opts; ?>
</select>
<p><?=gettext("Choose 802.1p priority to match on");?></p>
<select name='vlanprioset'>
<?php echo $optsset; ?>
</select>
<p><?=gettext("Choose 802.1p priority to apply");?></p>
</div>
</td>
</tr>
<?php <?php
//build list of schedules //build list of schedules
$schedules = array(); $schedules = array();
......
...@@ -453,10 +453,6 @@ function firewall_check_for_advanced_options(&$item) { ...@@ -453,10 +453,6 @@ function firewall_check_for_advanced_options(&$item) {
$item_set .= "max-src-conn-rate {$item['max-src-conn-rate']} "; $item_set .= "max-src-conn-rate {$item['max-src-conn-rate']} ";
if($item['max-src-conn-rates']) if($item['max-src-conn-rates'])
$item_set .= "max-src-conn-rates {$item['max-src-conn-rates']} "; $item_set .= "max-src-conn-rates {$item['max-src-conn-rates']} ";
if($item['vlanprio'])
$item_set .= "vlanprio {$item['vlanprio']} ";
if($item['vlanprioset'])
$item_set .= "vlanprioset {$item['vlanprioset']} ";
if($item['gateway']) if($item['gateway'])
$item_set .= "gateway {$item['gateway']} "; $item_set .= "gateway {$item['gateway']} ";
if($item['ackqueue']) if($item['ackqueue'])
......
...@@ -153,12 +153,6 @@ function show_advanced_noxmlrpc() { ...@@ -153,12 +153,6 @@ function show_advanced_noxmlrpc() {
aodiv.style.display = "block"; aodiv.style.display = "block";
} }
function show_advanced_vlanprio() {
document.getElementById("showadvvlanpriobox").innerHTML='';
aodiv = document.getElementById('showvlanprioadv');
aodiv.style.display = "block";
}
function show_advanced_schedule() { function show_advanced_schedule() {
document.getElementById("showadvschedulebox").innerHTML=''; document.getElementById("showadvschedulebox").innerHTML='';
aodiv = document.getElementById('showscheduleadv'); aodiv = document.getElementById('showscheduleadv');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment