Bug #1504
closed
adding a nexthop with double "/" at the beginning of the prefix result in the creation of "/" entry
Added by Hila Ben Abraham about 10 years ago.
Updated about 10 years ago.
Description
I accidentally added a name with multiple '//' at the beginning, and a FIB entry was created for the '/' prefix:
$build/bin/nfdc add-nexthop ndn://bla 7 90
$build/bin/nfd-status
...
FIB:
/localhost/nfd nexthops={faceid=1 (cost=0)}
/ nexthops={faceid=7 (cost=90)}
is this the expected behavior?
- Status changed from New to Rejected
In ndn://bla
, "bla" is the authority part of the URI, which is ignored.
However, in practice, this kind of typo will probably happen to many users/apps, and they'll have a strange / FIB entry without their knowledge. I feel we should fix it, e.g., by returning an error code for ndn://blah .
Unfortunately this is not something NFD can do.
Protocol says:
The authority component (the part after the initial // in the familiar http and ftp URI schemes) is not relevant to NDN. It should not be present, and it is ignored if it is present.
Library's Name::set
follows this rule and ignores authority.
When the command reaches NFD, it's already in TLV format of ndn:/
.
Protocol should have defined "Authority MUST NOT be present"
This is an old "problem" originated in ccnx and people (at least me) are well aware of it.
Though the question is why can't we simply ignore URI definition and treat authority as just a name (i.e., why we would keep the protocol as is and don't change that)? What is the implication of that?
I knew what the protocol said. My question was: any reason not to change it?
Also available in: Atom
PDF