src: use /localhop component in LSA prefix

refs: #3899

Change-Id: Ibbb42adf3cc34e4a09e267bd73ffb248aad715d5
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 @@
       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 @@
     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_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);