diff --git a/src/conf-file-processor.cpp b/src/conf-file-processor.cpp
index 1b5dc61..21940d6 100644
--- a/src/conf-file-processor.cpp
+++ b/src/conf-file-processor.cpp
@@ -256,7 +256,7 @@
   }
 
   // lsa-refresh-time
-  int32_t lsaRefreshTime = section.get<int32_t>("lsa-refresh-time", LSA_REFRESH_TIME_DEFAULT);
+  uint32_t lsaRefreshTime = section.get<uint32_t>("lsa-refresh-time", LSA_REFRESH_TIME_DEFAULT);
 
   if (lsaRefreshTime >= LSA_REFRESH_TIME_MIN && lsaRefreshTime <= LSA_REFRESH_TIME_MAX) {
     m_nlsr.getConfParameter().setLsaRefreshTime(lsaRefreshTime);
@@ -270,7 +270,7 @@
   }
 
   // router-dead-interval
-  int32_t routerDeadInterval = section.get<int32_t>("router-dead-interval", (2*lsaRefreshTime));
+  uint32_t routerDeadInterval = section.get<uint32_t>("router-dead-interval", (2*lsaRefreshTime));
 
   if (routerDeadInterval > m_nlsr.getConfParameter().getLsaRefreshTime()) {
     m_nlsr.getConfParameter().setRouterDeadInterval(routerDeadInterval);
@@ -422,7 +422,7 @@
   }
 
   // hello-timeout
-  int timeOut = section.get<int>("hello-timeout", HELLO_TIMEOUT_DEFAULT);
+  uint32_t timeOut = section.get<uint32_t>("hello-timeout", HELLO_TIMEOUT_DEFAULT);
 
   if (timeOut >= HELLO_TIMEOUT_MIN && timeOut <= HELLO_TIMEOUT_MAX) {
     m_nlsr.getConfParameter().setInterestResendTime(timeOut);
@@ -436,7 +436,7 @@
   }
 
   // hello-interval
-  int interval = section.get<int>("hello-interval", HELLO_INTERVAL_DEFAULT);
+  uint32_t interval = section.get<uint32_t>("hello-interval", HELLO_INTERVAL_DEFAULT);
 
   if (interval >= HELLO_INTERVAL_MIN && interval <= HELLO_INTERVAL_MAX) {
     m_nlsr.getConfParameter().setInfoInterestInterval(interval);
diff --git a/src/conf-parameter.hpp b/src/conf-parameter.hpp
index 4edf33e..9c227de 100644
--- a/src/conf-parameter.hpp
+++ b/src/conf-parameter.hpp
@@ -188,12 +188,12 @@
   }
 
   void
-  setLsaRefreshTime(int32_t lrt)
+  setLsaRefreshTime(uint32_t lrt)
   {
     m_lsaRefreshTime = lrt;
   }
 
-  int32_t
+  uint32_t
   getLsaRefreshTime() const
   {
     return m_lsaRefreshTime;
@@ -248,12 +248,12 @@
   }
 
   void
-  setRouterDeadInterval(int32_t rdt)
+  setRouterDeadInterval(uint32_t rdt)
   {
     m_routerDeadInterval = rdt;
   }
 
-  int32_t
+  uint32_t
   getRouterDeadInterval() const
   {
     return m_routerDeadInterval;
@@ -284,25 +284,25 @@
   }
 
   void
-  setInterestResendTime(int32_t irt)
+  setInterestResendTime(uint32_t irt)
   {
     m_interestResendTime = irt;
   }
 
-  int32_t
+  uint32_t
   getInterestResendTime() const
   {
     return m_interestResendTime;
   }
 
-  int32_t
+  uint32_t
   getInfoInterestInterval() const
   {
     return m_infoInterestInterval;
   }
 
   void
-  setInfoInterestInterval(int32_t iii)
+  setInfoInterestInterval(uint32_t iii)
   {
     m_infoInterestInterval = iii;
   }
@@ -416,20 +416,20 @@
   ndn::Name m_chronosyncPrefix;
   ndn::Name m_lsaPrefix;
 
-  int32_t  m_lsaRefreshTime;
+  uint32_t  m_lsaRefreshTime;
 
   uint32_t m_adjLsaBuildInterval;
   uint32_t m_firstHelloInterval;
   uint32_t m_routingCalcInterval;
 
   ndn::time::seconds m_lsaInterestLifetime;
-  int32_t  m_routerDeadInterval;
+  uint32_t  m_routerDeadInterval;
   std::string m_logLevel;
 
   uint32_t m_interestRetryNumber;
-  int32_t  m_interestResendTime;
+  uint32_t m_interestResendTime;
 
-  int32_t  m_infoInterestInterval;
+  uint32_t m_infoInterestInterval;
 
   int32_t m_hyperbolicState;
   double m_corR;
diff --git a/tests/test-conf-file-processor.cpp b/tests/test-conf-file-processor.cpp
index a86a965..817f149 100644
--- a/tests/test-conf-file-processor.cpp
+++ b/tests/test-conf-file-processor.cpp
@@ -382,7 +382,7 @@
 
   ConfParameter& conf = nlsr.getConfParameter();
 
-  BOOST_CHECK_EQUAL(conf.getLsaRefreshTime(), static_cast<int32_t>(LSA_REFRESH_TIME_DEFAULT));
+  BOOST_CHECK_EQUAL(conf.getLsaRefreshTime(), static_cast<uint32_t>(LSA_REFRESH_TIME_DEFAULT));
   BOOST_CHECK_EQUAL(conf.getLsaInterestLifetime(),
                     static_cast<ndn::time::seconds>(LSA_INTEREST_LIFETIME_DEFAULT));
   BOOST_CHECK_EQUAL(conf.getRouterDeadInterval(), (2*conf.getLsaRefreshTime()));
@@ -403,8 +403,8 @@
   ConfParameter& conf = nlsr.getConfParameter();
 
   BOOST_CHECK_EQUAL(conf.getInterestRetryNumber(), static_cast<uint32_t>(HELLO_RETRIES_DEFAULT));
-  BOOST_CHECK_EQUAL(conf.getInterestResendTime(), static_cast<int32_t>(HELLO_TIMEOUT_DEFAULT));
-  BOOST_CHECK_EQUAL(conf.getInfoInterestInterval(), static_cast<int32_t>(HELLO_INTERVAL_DEFAULT));
+  BOOST_CHECK_EQUAL(conf.getInterestResendTime(), static_cast<uint32_t>(HELLO_TIMEOUT_DEFAULT));
+  BOOST_CHECK_EQUAL(conf.getInfoInterestInterval(), static_cast<uint32_t>(HELLO_INTERVAL_DEFAULT));
   BOOST_CHECK_EQUAL(conf.getFirstHelloInterval(),
                     static_cast<uint32_t>(FIRST_HELLO_INTERVAL_DEFAULT));
   BOOST_CHECK_EQUAL(conf.getAdjLsaBuildInterval(),
@@ -454,6 +454,23 @@
   BOOST_CHECK_EQUAL(processConfigurationString(SECTION_FIB_OUT_OF_RANGE), false);
 }
 
+BOOST_AUTO_TEST_CASE(NegativeValue)
+{
+  const std::string SECTION_GENERAL_NEGATIVE_VALUE =
+  "general\n"
+  "{\n"
+  "  network /ndn/\n"
+  "  site /memphis.edu/\n"
+  "  router /cs/pollux/\n"
+  "  lsa-refresh-time -1800\n"
+  "  lsa-interest-lifetime -3\n"
+  "  router-dead-interval -86400\n"
+  "}\n\n";
+
+  // Processing should fail due to negative value
+  BOOST_CHECK_EQUAL(processConfigurationString(SECTION_GENERAL_NEGATIVE_VALUE), false);
+}
+
 BOOST_AUTO_TEST_SUITE_END()
 
 } //namespace test
