From c4f41b8eb591df29f8372efe405052b34531a9fb Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Sun, 1 Jan 2017 03:38:29 -0600 Subject: [PATCH] fix: empty mac adds an entry to the arp table (#5270) --- includes/discovery/arp-table.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/discovery/arp-table.inc.php b/includes/discovery/arp-table.inc.php index 61c90e9881..ab5562e177 100644 --- a/includes/discovery/arp-table.inc.php +++ b/includes/discovery/arp-table.inc.php @@ -59,7 +59,7 @@ foreach ($vrfs_lite_cisco as $vrf) { $interface = get_port_by_index_cache($device['device_id'], $if); $port_id = $interface['port_id']; - if (!empty($ip) && $ipv === 'ipv4' && $raw_mac != '0:0:0:0:0:0' && !isset($arp_table[$port_id][$ip])) { + if (!empty($ip) && $ipv === 'ipv4' && !empty($raw_mac) && $raw_mac != '0:0:0:0:0:0' && !isset($arp_table[$port_id][$ip])) { $mac = implode(array_map('zeropad', explode(':', $raw_mac))); $arp_table[$port_id][$ip] = $mac;