diff options
Diffstat (limited to 'core.py')
-rw-r--r-- | core.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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] |