Bug #2312
closed
CHILD_INHERIT does not work when run nfdc register
Added by Yanbiao Li almost 10 years ago.
Updated almost 10 years ago.
Description
A route with prefix /localhop/nfd/rib
is already exists. (/localhop/nfd/rib nexthops={faceid=259 (cost=0)}
)
After register a prefix /localhop/nfd
(using nfdc register
), a new route is generated (/localhop/nfd nexthops={faceid=262 (cost=0)}
), in which CHILD_INHERIT
is default set.
However, the previous route doesn't inherit the face of the second route.
here follows the full screenshot:
LiYanBiaos-MacBook-Pro:NFD lybmath$ nfd-start
LiYanBiaos-MacBook-Pro:NFD lybmath$ nfd-status -b
FIB:
/localhost/nfd nexthops={faceid=1 (cost=0)}
/localhop/nfd/rib nexthops={faceid=259 (cost=0)}
/localhost/nfd/rib nexthops={faceid=259 (cost=0)}
LiYanBiaos-MacBook-Pro:NFD lybmath$ nfdc register /localhop/nfd udp://spurs.cs.ucla.edu
Successful in name registration: ControlParameters(Name: /localhop/nfd, FaceId: 262, Origin: 255, Cost: 0, Flags: 1, )
LiYanBiaos-MacBook-Pro:NFD lybmath$ nfd-status -b
FIB:
/localhost/nfd nexthops={faceid=1 (cost=0)}
/localhop/nfd/rib nexthops={faceid=259 (cost=0)}
/localhop/nfd nexthops={faceid=262 (cost=0)}
/localhost/nfd/rib nexthops={faceid=259 (cost=0)}
LiYanBiaos-MacBook-Pro:NFD lybmath$
Related issues
1 (1 open — 0 closed)
I think the only problem is that /localhop/nfd prefix is registered by NRD directly to FIB. I believe NRD should register it in its own FIB, so the child inherit flag can take effect.
- Description updated (diff)
- Assignee set to Yanbiao Li
- Target version set to v0.3
- Assignee changed from Yanbiao Li to Vince Lehman
- Priority changed from Normal to High
I'm raising the priority as it is relatively critical issue that needs to be resolved asap.
However, I'm not quite sure about how exactly this should be solved. Options:
- hard-code that when NRD starts it adds RIB entry for
/localhost/nfd
, /localhost/nfd/rib
, and /localhop/nfd
- when NRD starts, read current NFD FaceDataset and add all the existing routes to RIB.
I prefer the second approach, though it is more complicated.
- Status changed from New to In Progress
So for the second approach:
- Request the FIB DataSet
- When the full DataSet is received, enumerate each FibEntry
- enumerate each NextHopRecord in FibEntry
- Register a route in the RIB with FibEntry.name, NextHopRecord.FaceId, and NextHopRecord.Cost
Is this correct? What route flags should each entry have, if any?
I disagree with the second approach in note-5. It's unnecessarily complex, causes additional delay, and may cause inconsistency.
To solve this particular Bug, RIB daemon just need to insert these Routes (hard coded), or even just the last Route:
Name |
FaceId |
Origin |
Cost |
ChildInherit |
Capture |
/localhost/nfd |
internal |
app |
0 |
no |
yes |
/localhost/nfd/rib |
nrd |
app |
0 |
yes |
no |
/localhop/nfd/rib |
nrd |
app |
0 |
yes |
yes |
Hmm. I think both options are actually wrong and unnecessary.
The only real problem is with "localhop" prefix, which is actually registered by NRD itself. I think, right now it uses FIB management protocol directly. Instead, it should add record to RIB and use FIB updater to add actual record to NFD's FIB.
I agree with note-8.
This Bug needs to wait after #1941. I won't agree with any hack.
This issue is (partially) independent of #1941 and does not require any hacking. It is just instead of calling registerPrefix, it should call something internal and then the overload setInterestFilter.
I could be ok waiting, if everything in #1941 can be finished this week. If there are more things, then I would push for some fix asap.
- Status changed from In Progress to Code review
- % Done changed from 0 to 90
I think finishing #1941 this week would be very optimistic; I have pushed a patch to Gerrit which uses the current codebase to do what note-8 suggests.
- Related to Feature #2401: Register RIB command prefixes using FibUpdater added
I agree with the temporary solution in commit 0ef60bcb10080904d4fc81767a76ea41512b5dd0.
The permanent solution is written as #2401.
- Status changed from Code review to Resolved
@Yanbiao, please verify the Bug is fixed.
Just as a record, these are the prefixes inserted by the fix:
Name |
FaceId |
Origin |
Cost |
ChildInherit |
Capture |
/localhost/nfd/rib |
nrd |
app |
0 |
yes |
no |
/localhop/nfd/rib |
nrd |
app |
0 |
yes |
no |
I test latest codes and confirm that this bug is resolved.
- Status changed from Resolved to Closed
Also available in: Atom
PDF