logic: don't send oversized exclude interests
refs: #3990
Change-Id: I495f2e9950369bc8c53d71501969add5076a3fee
diff --git a/src/logic.cpp b/src/logic.cpp
index 4caa56e..fc4aa83 100644
--- a/src/logic.cpp
+++ b/src/logic.cpp
@@ -781,6 +781,10 @@
excludeInterest.setInterestLifetime(m_syncInterestLifetime);
+ if (excludeInterest.wireEncode().size() > ndn::MAX_NDN_PACKET_SIZE) {
+ return;
+ }
+
m_face.expressInterest(excludeInterest,
bind(&Logic::onSyncData, this, _1, _2),
bind(&Logic::onSyncTimeout, this, _1), // Nack