Skip to content

Commit 7398ff8

Browse files
authored
Update spreadsheet_tools.py
update function for private ip address check
1 parent a2ebf7f commit 7398ff8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/navv/spreadsheet_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,13 +302,13 @@ def handle_ip(ip_to_check, dns_data, inventory, segments, ext_IPs, unk_int_IPs):
302302
else:
303303
resolution = f"Unknown device in {segments[x].name} network"
304304
unk_int_IPs.add(ip_to_check)
305-
if not netaddr.IPAddress(ip_to_check).is_private():
305+
if not netaddr.IPAddress(ip_to_check).is_ipv4_private_use():
306306
resolution = resolution + " {Non-Priv IP}"
307307
desc_to_change = (
308308
resolution,
309309
segments[x].color,
310310
)
311-
elif netaddr.IPAddress(ip_to_check).is_private():
311+
elif netaddr.IPAddress(ip_to_check).is_ipv4_private_use():
312312
if ip_to_check in dns_data:
313313
desc_to_change = (dns_data[ip_to_check], INTERNAL_NETWORK_CELL_COLOR)
314314
elif ip_to_check in inventory:

0 commit comments

Comments
 (0)