face: GenericLinkService drops IDLE packets

refs #3249

Change-Id: I3d16bcf29f4858049d1040a3e421e1c7151b3fed
diff --git a/daemon/face/generic-link-service.cpp b/daemon/face/generic-link-service.cpp
index 4fa4c1c..23e2ce2 100644
--- a/daemon/face/generic-link-service.cpp
+++ b/daemon/face/generic-link-service.cpp
@@ -119,14 +119,19 @@
 void
 GenericLinkService::doReceivePacket(Transport::Packet&& packet)
 {
-  lp::Packet pkt(packet.packet);
-
-  if (pkt.has<lp::FragIndexField>() || pkt.has<lp::FragCountField>()) {
-    NFD_LOG_FACE_WARN("received fragment, but reassembly not implemented: DROP");
-    return;
-  }
-
   try {
+    lp::Packet pkt(packet.packet);
+
+    if (!pkt.has<lp::FragmentField>()) {
+      NFD_LOG_FACE_TRACE("received IDLE packet: DROP");
+      return;
+    }
+
+    if (pkt.has<lp::FragIndexField>() || pkt.has<lp::FragCountField>()) {
+      NFD_LOG_FACE_WARN("received fragment, but reassembly not implemented: DROP");
+      return;
+    }
+
     ndn::Buffer::const_iterator fragBegin, fragEnd;
     std::tie(fragBegin, fragEnd) = pkt.get<lp::FragmentField>();
     Block netPkt(&*fragBegin, std::distance(fragBegin, fragEnd));