tools: Make ndn-autoconfig register / instead of /ndn
Hosts in consumer region should use / instead of /ndn as default route. refs #4201 Change-Id: I6dd15c6657cfe9110c7a4dc3e9046370cbaf2733
This commit is contained in:
@@ -196,7 +196,7 @@ BOOST_FIXTURE_TEST_CASE(Normal, ProcedureFixture<ProcedureSuccessFailure>)
|
||||
BOOST_REQUIRE(req->hasOrigin());
|
||||
BOOST_CHECK_EQUAL(req->getOrigin(), nfd::ROUTE_ORIGIN_AUTOCONF);
|
||||
BOOST_REQUIRE(req->hasName());
|
||||
if (req->getName() == "/ndn") {
|
||||
if (req->getName() == "/") {
|
||||
++nRegisterNdn;
|
||||
}
|
||||
else if (req->getName() == "/localhop/nfd") {
|
||||
@@ -230,7 +230,7 @@ BOOST_FIXTURE_TEST_CASE(ExistingFace, ProcedureFixture<ProcedureFailureSuccess>)
|
||||
{
|
||||
this->initialize(Options{});
|
||||
|
||||
int nRegisterNdn = 0, nRegisterLocalhopNfd = 0;
|
||||
int nRegisterDefault = 0, nRegisterLocalhopNfd = 0;
|
||||
this->processInterest = [&] (const Interest& interest) {
|
||||
optional<ControlParameters> req = parseCommand(interest, "/localhost/nfd/faces/create");
|
||||
if (req) {
|
||||
@@ -247,8 +247,8 @@ BOOST_FIXTURE_TEST_CASE(ExistingFace, ProcedureFixture<ProcedureFailureSuccess>)
|
||||
req = parseCommand(interest, "/localhost/nfd/rib/register");
|
||||
if (req) {
|
||||
BOOST_REQUIRE(req->hasName());
|
||||
if (req->getName() == "/ndn") {
|
||||
++nRegisterNdn;
|
||||
if (req->getName() == "/") {
|
||||
++nRegisterDefault;
|
||||
}
|
||||
else if (req->getName() == "/localhop/nfd") {
|
||||
++nRegisterLocalhopNfd;
|
||||
@@ -273,7 +273,7 @@ BOOST_FIXTURE_TEST_CASE(ExistingFace, ProcedureFixture<ProcedureFailureSuccess>)
|
||||
BOOST_CHECK_EQUAL(this->runOnce(), true);
|
||||
BOOST_CHECK_EQUAL(procedure->nCalls1, 1);
|
||||
BOOST_CHECK_EQUAL(procedure->nCalls2, 1);
|
||||
BOOST_CHECK_EQUAL(nRegisterNdn, 1);
|
||||
BOOST_CHECK_EQUAL(nRegisterDefault, 1);
|
||||
BOOST_CHECK_EQUAL(nRegisterLocalhopNfd, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ using nfd::ControlParameters;
|
||||
using nfd::ControlResponse;
|
||||
|
||||
static const time::nanoseconds FACEURI_CANONIZE_TIMEOUT = time::seconds(4);
|
||||
static const std::vector<Name> HUB_PREFIXES{"/ndn", "/localhop/nfd"};
|
||||
static const std::vector<Name> HUB_PREFIXES{"/", "/localhop/nfd"};
|
||||
static const nfd::RouteOrigin HUB_ROUTE_ORIGIN = nfd::ROUTE_ORIGIN_AUTOCONF;
|
||||
static const uint64_t HUB_ROUTE_COST = 100;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user