NameLsa: fix Lsdb update bug by sorting the NPLs before difference
Change-Id: Ib3d5bbf546de3356e0594732ca09671d7c32dbf1
diff --git a/src/lsa/name-lsa.cpp b/src/lsa/name-lsa.cpp
index 266649a..53281e1 100644
--- a/src/lsa/name-lsa.cpp
+++ b/src/lsa/name-lsa.cpp
@@ -138,6 +138,9 @@
auto nlsa = std::static_pointer_cast<NameLsa>(lsa);
bool updated = false;
+ m_npl.sort();
+ nlsa->getNpl().sort();
+
// Obtain the set difference of the current and the incoming
// name prefix sets, and add those.
std::list<ndn::Name> newNames = nlsa->getNpl().getNames();