diff --git a/lib/App/Netdisco/Util/Node.pm b/lib/App/Netdisco/Util/Node.pm index ca6d4eed..7cc832bc 100644 --- a/lib/App/Netdisco/Util/Node.pm +++ b/lib/App/Netdisco/Util/Node.pm @@ -65,6 +65,8 @@ MAC address does not belong to an interface on any known Device sub check_mac { my ($device, $node, $port_macs) = @_; + return 0 if !$device or !$node; + my $mac = NetAddr::MAC->new(mac => $node); my $devip = (ref $device ? $device->ip : ''); $port_macs ||= {};