Commit b35a1ac2 authored by Ad Schellevis's avatar Ad Schellevis

(captiveportal, new) wrap delete session and accounting into one call

parent a9b57a31
...@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment