face: EthernetFactory: skip non-Ethernet interfaces

Change-Id: Ifa42755b032cf23ea688e055477820d27e7dc8df
Refs: #4021
diff --git a/daemon/face/ethernet-factory.cpp b/daemon/face/ethernet-factory.cpp
index ce8e455..b00fa5f 100644
--- a/daemon/face/ethernet-factory.cpp
+++ b/daemon/face/ethernet-factory.cpp
@@ -264,13 +264,18 @@
     return nullptr;
   }
 
+  if (netif->getType() != ndn::net::InterfaceType::ETHERNET) {
+    NFD_LOG_DEBUG("Not creating channel on " << netif->getName() << ": incompatible netif type");
+    return nullptr;
+  }
+
   if (!netif->isUp()) {
     NFD_LOG_DEBUG("Not creating channel on " << netif->getName() << ": netif is down");
     return nullptr;
   }
 
-  if (netif->isLoopback()) {
-    NFD_LOG_DEBUG("Not creating channel on " << netif->getName() << ": netif is loopback");
+  if (netif->getEthernetAddress().isNull()) {
+    NFD_LOG_DEBUG("Not creating channel on " << netif->getName() << ": invalid Ethernet address");
     return nullptr;
   }
 
@@ -293,6 +298,11 @@
     return nullptr;
   }
 
+  if (netif.getType() != ndn::net::InterfaceType::ETHERNET) {
+    NFD_LOG_DEBUG("Not creating multicast face on " << netif.getName() << ": incompatible netif type");
+    return nullptr;
+  }
+
   if (!netif.isUp()) {
     NFD_LOG_DEBUG("Not creating multicast face on " << netif.getName() << ": netif is down");
     return nullptr;
@@ -303,6 +313,11 @@
     return nullptr;
   }
 
+  if (netif.getEthernetAddress().isNull()) {
+    NFD_LOG_DEBUG("Not creating multicast face on " << netif.getName() << ": invalid Ethernet address");
+    return nullptr;
+  }
+
   if (!m_mcastConfig.netifPredicate(netif)) {
     NFD_LOG_DEBUG("Not creating multicast face on " << netif.getName() << ": rejected by whitelist/blacklist");
     return nullptr;