mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
unbound-dhcp-leases-bridge: Remove unused functions and module imports
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -37,7 +37,6 @@ import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import threading
|
||||
import time
|
||||
|
||||
LOCAL_TTL = 60
|
||||
|
||||
@@ -66,20 +65,6 @@ def setup_logging(daemon=True, loglevel=logging.INFO):
|
||||
|
||||
return log
|
||||
|
||||
def ip_address_to_reverse_pointer(address):
|
||||
parts = address.split(".")
|
||||
parts.reverse()
|
||||
|
||||
return "%s.in-addr.arpa" % ".".join(parts)
|
||||
|
||||
def reverse_pointer_to_ip_address(rr):
|
||||
parts = rr.split(".")
|
||||
|
||||
# Only take IP address part
|
||||
parts = reversed(parts[0:4])
|
||||
|
||||
return ".".join(parts)
|
||||
|
||||
class UnboundDHCPLeasesBridge(object):
|
||||
def __init__(self, dhcp_leases_file, fix_leases_file, unbound_leases_file, hosts_file, socket_path):
|
||||
self.leases_file = dhcp_leases_file
|
||||
|
||||
Reference in New Issue
Block a user