Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
nexdpi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
sysadmin
nexdpi
Commits
093d3799
Commit
093d3799
authored
Apr 24, 2021
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better use of ipset to manage timeouts reset
parent
8dbf0e02
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
dpi
dpi
+1
-1
No files found.
dpi
View file @
093d3799
...
@@ -172,7 +172,7 @@ class NexDPI():
...
@@ -172,7 +172,7 @@ class NexDPI():
ipset_list
=
Cats
[
cname
][
'ipset'
]
ipset_list
=
Cats
[
cname
][
'ipset'
]
log
.
info
(
"CHECKCATEGORY: "
+
str
(
tuple
(
Cats
[
cname
][
'nostart'
])))
log
.
info
(
"CHECKCATEGORY: "
+
str
(
tuple
(
Cats
[
cname
][
'nostart'
])))
if
not
aname
.
startswith
(
tuple
(
Cats
[
cname
][
'nostart'
]))
and
not
sername
in
list
(
Cats
[
cname
][
'noapps'
]):
if
not
aname
.
startswith
(
tuple
(
Cats
[
cname
][
'nostart'
]))
and
not
sername
in
list
(
Cats
[
cname
][
'noapps'
]):
sh
(
"ipset
test "
+
ipset_list
+
" "
+
triplet
+
" >/dev/null 2>&1 || ipset add "
+
ipset_list
+
" "
+
triplet
+
" timeout "
+
Cats
[
cname
][
'timeout'
]
+
"
> /dev/null 2>&1"
)
sh
(
"ipset
add "
+
ipset_list
+
" "
+
triplet
+
" timeout "
+
Cats
[
cname
][
'timeout'
]
+
" --exist
> /dev/null 2>&1"
)
log
.
info
(
"ADD: "
+
ipset_list
+
" "
+
triplet
+
" "
+
self
.
fullname
)
log
.
info
(
"ADD: "
+
ipset_list
+
" "
+
triplet
+
" "
+
self
.
fullname
)
if
sername
in
list
(
Cats
[
cname
][
'knownapps'
]):
if
sername
in
list
(
Cats
[
cname
][
'knownapps'
]):
self
.
isknown
=
True
self
.
isknown
=
True
...
...
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