if (sll != NULL && sll->sll_family == AF_PACKET) {
char macAddress[NICINFO_MAC_LEN];
+ /*
+ * Ignore loopback and downed devices.
+ */
+ if (!(pkt->ifa_flags & IFF_UP) || pkt->ifa_flags & IFF_LOOPBACK) {
+ continue;
+ }
+
Str_Sprintf(macAddress, sizeof macAddress,
"%02x:%02x:%02x:%02x:%02x:%02x",
sll->sll_addr[0], sll->sll_addr[1], sll->sll_addr[2],
unsigned nBits = 0;
/*
* Ignore any loopback addresses.
+ * A loopback address would indicate a misconfiguration, since
+ * this is not a loopback device (we checked for that above).
*/
if (family == AF_INET) {
struct sockaddr_in *sin = (struct sockaddr_in *)sa;