Skip to content

Commit

Permalink
fix shared ip space filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
noursaidi committed Dec 18, 2024
1 parent 52762e4 commit 1d23741
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions misc/discoverynode/src/udmi/discovery/passive.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,14 @@ def queue_worker(self):
and ip is not None
and ip not in self.addresses_seen
):
if ipaddress.ip_address(ip).is_private:
self.addresses_seen.add(ip)
self.device_records.add(
PassiveScanRecord(
addr=ip,
hostname=self.get_host(ip),
mac=getattr(item[scapy.layers.inet.Ether], x),
)
)
self.addresses_seen.add(ip)
self.device_records.add(
PassiveScanRecord(
addr=ip,
hostname=self.get_host(ip),
mac=getattr(item[scapy.layers.inet.Ether], x),
)
)
except queue.Empty:
if self.cancel_threads.is_set():
return

0 comments on commit 1d23741

Please sign in to comment.