diff --git a/src/communication/sync-logic-handler.cpp b/src/communication/sync-logic-handler.cpp index 153773a..7c00d37 100644 --- a/src/communication/sync-logic-handler.cpp +++ b/src/communication/sync-logic-handler.cpp @@ -72,7 +72,7 @@ public: throw Error("Cannot parse update name because expected components are missing"); } - ndn::Name networkName = m_name.getSubName(0, nlsrPosition); + ndn::Name networkName = m_name.getSubName(1, nlsrPosition-1); ndn::Name routerName = m_name.getSubName(lsaPosition + 1); ndn::Name originRouter = networkName; diff --git a/src/conf-parameter.hpp b/src/conf-parameter.hpp index d1aabd9..5718b12 100644 --- a/src/conf-parameter.hpp +++ b/src/conf-parameter.hpp @@ -125,7 +125,8 @@ public: m_chronosyncPrefix.append("NLSR"); m_chronosyncPrefix.append("sync"); - m_lsaPrefix = m_network; + m_lsaPrefix.append("localhop"); + m_lsaPrefix.append(m_network); m_lsaPrefix.append("NLSR"); m_lsaPrefix.append("LSA"); } diff --git a/tests/test-conf-file-processor.cpp b/tests/test-conf-file-processor.cpp index 19a3d27..c36892b 100644 --- a/tests/test-conf-file-processor.cpp +++ b/tests/test-conf-file-processor.cpp @@ -223,7 +223,7 @@ BOOST_AUTO_TEST_CASE(LinkState) BOOST_CHECK_EQUAL(conf.getRouterName(), "/cs/pollux/"); BOOST_CHECK_EQUAL(conf.getRouterPrefix(), "/ndn/memphis.edu/cs/pollux/"); BOOST_CHECK_EQUAL(conf.getChronosyncPrefix(), "/localhop/NLSR/sync"); - BOOST_CHECK_EQUAL(conf.getLsaPrefix(), "/ndn/NLSR/LSA"); + BOOST_CHECK_EQUAL(conf.getLsaPrefix(), "/localhop/ndn/NLSR/LSA"); BOOST_CHECK_EQUAL(conf.getLsaRefreshTime(), 1800); BOOST_CHECK_EQUAL(conf.getLsaInterestLifetime(), ndn::time::seconds(3)); BOOST_CHECK_EQUAL(conf.getRouterDeadInterval(), 86400);