summaryrefslogtreecommitdiff
path: root/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'core.py')
-rw-r--r--core.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/core.py b/core.py
index a68d1e5..1ac7e4f 100644
--- a/core.py
+++ b/core.py
@@ -1,5 +1,5 @@
import socketserver
-import ipcalc
+import ipaddr
class Daemon():
def __init__(data):
@@ -26,7 +26,7 @@ class Daemon():
# Iterate over all IP block elements
for network in self.data.get_networks():
for block in network.ip_blocks:
- if ip in ipcalc.Network(block):
+ if ipaddr.IPAddress(ip) in ipaddr.IPNetwork(block):
result['name'] = network.name
for key in network.data:
result[key] = network.data[key]
nihil fit ex nihilo