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
b35a1ac2
Commit
b35a1ac2
authored
Oct 14, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(captiveportal, new) wrap delete session and accounting into one call
parent
a9b57a31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
ipfw.py
src/opnsense/scripts/OPNsense/CaptivePortal/lib/ipfw.py
+9
-0
No files found.
src/opnsense/scripts/OPNsense/CaptivePortal/lib/ipfw.py
View file @
b35a1ac2
...
@@ -173,3 +173,12 @@ class IPFW(object):
...
@@ -173,3 +173,12 @@ class IPFW(object):
devnull
=
open
(
os
.
devnull
,
'w'
)
devnull
=
open
(
os
.
devnull
,
'w'
)
subprocess
.
call
([
'/sbin/ipfw'
,
'delete'
,
str
(
acc_info
[
address
][
'rule'
])],
subprocess
.
call
([
'/sbin/ipfw'
,
'delete'
,
str
(
acc_info
[
address
][
'rule'
])],
stdout
=
devnull
,
stderr
=
devnull
)
stdout
=
devnull
,
stderr
=
devnull
)
def
delete
(
self
,
table_number
,
address
):
""" remove entry from both ipfw table and accounting rules
:param table_number: ipfw table number
:param address: ip address or net to add to table
:return:
"""
self
.
delete_from_table
(
table_number
,
address
)
self
.
del_accounting
(
address
)
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