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
51d2acf4
Commit
51d2acf4
authored
Mar 05, 2017
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(filter) extend new style FilterRule, adds icmptype, tag, tagged
parent
fc6ad652
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
FilterRule.php
...opnsense/mvc/app/library/OPNsense/Firewall/FilterRule.php
+11
-0
No files found.
src/opnsense/mvc/app/library/OPNsense/Firewall/FilterRule.php
View file @
51d2acf4
...
...
@@ -51,11 +51,14 @@ class FilterRule
'from_port'
=>
'parsePlain, port {,}'
,
'to'
=>
'parsePlain,to {,}'
,
'to_port'
=>
'parsePlain, port {,}'
,
'icmp-type'
=>
'parsePlain,icmp-type {,}'
,
'icmp6-type'
=>
'parsePlain,icmp6-type {,}'
,
'flags'
=>
'parsePlain, flags '
,
'state'
=>
'parseState'
,
'set-prio'
=>
'parsePlain, set prio '
,
'prio'
=>
'parsePlain, prio '
,
'tag'
=>
'parsePlain, tag '
,
'tagged'
=>
'parsePlain, tagged '
,
'allowopts'
=>
'parseBool,allow-opts'
,
'label'
=>
'parsePlain,label ",",63'
);
...
...
@@ -236,6 +239,14 @@ class FilterRule
"/"
.
$tmp
[
'max-src-conn-rates'
]
.
", overload <virusprot> flush global "
;
}
}
// icmp-type switch (ipv4/ipv6)
if
(
$tmp
[
'protocol'
]
==
"icmp"
&&
!
empty
(
$tmp
[
'icmptype'
]))
{
if
(
$ipproto
==
'inet'
)
{
$tmp
[
'icmp-type'
]
=
$tmp
[
'icmptype'
];
}
elseif
(
$ipproto
==
'inet6'
)
{
$tmp
[
'icmp6-type'
]
=
$tmp
[
'icmptype'
];
}
}
// icmpv6
if
(
$ipproto
==
'inet6'
&&
!
empty
(
$tmp
[
'protocol'
])
&&
$tmp
[
'protocol'
]
==
"icmp"
)
{
$tmp
[
'protocol'
]
=
'ipv6-icmp'
;
...
...
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