Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
alpine
awall
Commits
61f712fd
Commit
61f712fd
authored
Jan 24, 2017
by
Kaarle Ritvanen
Browse files
FilterLimit: rename variable
parent
4b838acf
Changes
1
Hide whitespace changes
Inline
Side-by-side
awall/modules/filter.lua
View file @
61f712fd
...
...
@@ -54,7 +54,7 @@ function FilterLimit:recentofrags(name)
if
count
>
RECENT_MAX_COUNT
then
return
end
local
u
ofs
=
{}
local
c
ofs
=
{}
local
sofs
=
{}
for
_
,
family
in
ipairs
{
'inet'
,
'inet6'
}
do
...
...
@@ -92,7 +92,7 @@ function FilterLimit:recentofrags(name)
}
extend
(
u
ofs
,
c
ofs
,
combinations
(
rec
,
{{
match
=
'--update --hitcount '
..
count
..
' --seconds '
..
interval
}}
...
...
@@ -101,7 +101,7 @@ function FilterLimit:recentofrags(name)
extend
(
sofs
,
combinations
(
rec
,
{{
match
=
'--set'
}}))
end
return
u
ofs
,
sofs
return
c
ofs
,
sofs
end
...
...
@@ -380,10 +380,10 @@ function Filter:mangleoptfrags(ofrags)
local
ct
=
conn
and
target
local
pl
=
not
target
and
self
.
log
local
u
ofs
,
sofs
=
limitobj
:
recentofrags
(
limitchain
)
local
c
ofs
,
sofs
=
limitobj
:
recentofrags
(
limitchain
)
if
u
ofs
then
ofs
=
self
:
combinelog
(
u
ofs
,
limitlog
,
'drop'
,
'DROP'
)
if
c
ofs
then
ofs
=
self
:
combinelog
(
c
ofs
,
limitlog
,
'drop'
,
'DROP'
)
local
nxt
if
ct
then
...
...
Write
Preview
Supports
Markdown
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