Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
be6b4274
Commit
be6b4274
authored
May 18, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(firewall) remove 802.1p rules
parent
efed952d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
69 deletions
+2
-69
filter.inc
src/etc/inc/filter.inc
+2
-6
firewall_rules_edit.php
src/www/firewall_rules_edit.php
+0
-53
guiconfig.inc
src/www/guiconfig.inc
+0
-4
firewall_rules_edit.js
...www/javascript/firewall_rules_edit/firewall_rules_edit.js
+0
-6
No files found.
src/etc/inc/filter.inc
View file @
be6b4274
...
...
@@ -2381,10 +2381,6 @@ function filter_generate_user_rule($rule)
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
(
isset
(
$rule
[
'allowopts'
]))
$aline
[
'allowopts'
]
=
" allow-opts "
;
...
...
@@ -2539,7 +2535,7 @@ function filter_generate_user_rule($rule)
$line
.=
$aline
[
'type'
]
.
$aline
[
'direction'
]
.
$aline
[
'log'
]
.
$aline
[
'quick'
]
.
$aline
[
'interface'
]
.
$aline
[
'ipprotocol'
]
.
$aline
[
'prot'
]
.
$aline
[
'src'
]
.
$aline
[
'os'
]
.
$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'
]
.
" label
\"
NEGATE_ROUTE: Negate policy routing for destination
\"\n
"
;
...
...
@@ -2548,7 +2544,7 @@ function filter_generate_user_rule($rule)
$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
[
'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
);
...
...
src/www/firewall_rules_edit.php
View file @
be6b4274
...
...
@@ -211,8 +211,6 @@ if (isset($id) && $a_filter[$id]) {
//schedule support
$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'
]))
$pconfig
[
'associated-rule-id'
]
=
$a_filter
[
$id
][
'associated-rule-id'
];
...
...
@@ -682,13 +680,6 @@ if ($_POST) {
$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
(
isset
(
$a_filter
[
$id
][
'associated-rule-id'
])
)
{
$filterent
[
'interface'
]
=
$a_filter
[
$id
][
'interface'
];
...
...
@@ -1373,50 +1364,6 @@ include("head.inc");
</div>
</td>
</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
//build list of schedules
$schedules
=
array
();
...
...
src/www/guiconfig.inc
View file @
be6b4274
...
...
@@ -453,10 +453,6 @@ function firewall_check_for_advanced_options(&$item) {
$item_set
.=
"max-src-conn-rate
{
$item
[
'max-src-conn-rate'
]
}
"
;
if
(
$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'
])
$item_set
.=
"gateway
{
$item
[
'gateway'
]
}
"
;
if
(
$item
[
'ackqueue'
])
...
...
src/www/javascript/firewall_rules_edit/firewall_rules_edit.js
View file @
be6b4274
...
...
@@ -153,12 +153,6 @@ function show_advanced_noxmlrpc() {
aodiv
.
style
.
display
=
"
block
"
;
}
function
show_advanced_vlanprio
()
{
document
.
getElementById
(
"
showadvvlanpriobox
"
).
innerHTML
=
''
;
aodiv
=
document
.
getElementById
(
'
showvlanprioadv
'
);
aodiv
.
style
.
display
=
"
block
"
;
}
function
show_advanced_schedule
()
{
document
.
getElementById
(
"
showadvschedulebox
"
).
innerHTML
=
''
;
aodiv
=
document
.
getElementById
(
'
showscheduleadv
'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment