Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
awall
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
awall
Commits
4172f22f
Commit
4172f22f
authored
Jun 21, 2012
by
Kaarle Ritvanen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter out ICMPv4/6 rules per protocol family even when message type not defined
parent
17f81f10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
awall/model.lua
awall/model.lua
+11
-11
No files found.
awall/model.lua
View file @
4172f22f
...
...
@@ -176,18 +176,18 @@ function Rule:servoptfrags()
local
opts
=
'-p '
..
sdef
.
proto
local
family
=
nil
if
sdef
.
type
then
-- TODO multiple ICMP types per rule
local
oname
if
util
.
contains
({
1
,
'icmp'
},
sdef
.
proto
)
then
family
=
'inet'
oname
=
'icmp-type'
elseif
util
.
contains
({
58
,
'ipv6-icmp'
,
'icmpv6'
},
sdef
.
proto
)
then
family
=
'inet6'
oname
=
'icmpv6-type'
else
error
(
'Type specification not valid with '
..
sdef
.
proto
)
end
opts
=
opts
..
' --'
..
oname
..
' '
..
sdef
.
type
-- TODO multiple ICMP types per rule
local
oname
if
util
.
contains
({
1
,
'icmp'
},
sdef
.
proto
)
then
family
=
'inet'
oname
=
'icmp-type'
elseif
util
.
contains
({
58
,
'ipv6-icmp'
,
'icmpv6'
},
sdef
.
proto
)
then
family
=
'inet6'
oname
=
'icmpv6-type'
elseif
sdef
.
type
then
error
(
'Type specification not valid with '
..
sdef
.
proto
)
end
if
sdef
.
type
then
opts
=
opts
..
' --'
..
oname
..
' '
..
sdef
.
type
end
table.insert
(
res
,
{
family
=
family
,
opts
=
opts
})
end
...
...
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