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
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
cb0c7dce
Commit
cb0c7dce
authored
Jan 30, 2013
by
Kaarle Ritvanen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support for all NFLOG and ULOG options
fixes
#1586
parent
ff7c8fc0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
+27
-4
awall/model.lua
awall/model.lua
+1
-1
awall/modules/filter.lua
awall/modules/filter.lua
+26
-3
No files found.
awall/model.lua
View file @
cb0c7dce
...
...
@@ -23,7 +23,7 @@ class = awall.object.class
require
'stringy'
local
ConfigObject
=
class
()
ConfigObject
=
class
()
function
ConfigObject
:
init
(
context
,
location
)
if
context
then
...
...
awall/modules/filter.lua
View file @
cb0c7dce
...
...
@@ -17,14 +17,37 @@ local extend = util.extend
local
RECENT_MAX_COUNT
=
20
local
Log
=
model
.
class
()
local
Log
=
model
.
class
(
model
.
ConfigObject
)
function
Log
:
optfrag
()
local
optmap
=
{
log
=
{
level
=
'level'
,
prefix
=
'prefix'
},
nflog
=
{
group
=
'group'
,
prefix
=
'prefix'
,
range
=
'range'
,
threshold
=
'threshold'
},
ulog
=
{
group
=
'nlgroup'
,
prefix
=
'prefix'
,
range
=
'cprange'
,
threshold
=
'qthreshold'
}
}
local
mode
=
self
.
mode
or
'log'
local
prefix
=
self
.
prefix
and
' --'
..
mode
..
'-prefix '
..
self
.
prefix
or
''
if
not
optmap
[
mode
]
then
self
:
error
(
'Invalid logging mode: '
..
mode
)
end
local
target
=
string.upper
(
mode
)
for
s
,
t
in
pairs
(
optmap
[
mode
])
do
if
self
[
s
]
then
target
=
target
..
' --'
..
mode
..
'-'
..
t
..
' '
..
self
[
s
]
end
end
return
{
opts
=
self
.
limit
and
'-m limit --limit '
..
self
.
limit
..
'/second'
,
target
=
string.upper
(
mode
)
..
prefix
target
=
target
}
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