Bug #2312
closedCHILD_INHERIT does not work when run nfdc register
90%
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$
Updated by Alex Afanasyev about 10 years ago
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.
Updated by Alex Afanasyev about 10 years ago
- Description updated (diff)
- Assignee set to Yanbiao Li
- Target version set to v0.3
Updated by Alex Afanasyev about 10 years ago
- Assignee changed from Yanbiao Li to Vince Lehman
Updated by Alex Afanasyev almost 10 years ago
- Priority changed from Normal to High
Updated by Alex Afanasyev almost 10 years ago
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.
Updated by Vince Lehman almost 10 years ago
- 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?
Updated by Junxiao Shi almost 10 years ago
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 |
Updated by Alex Afanasyev almost 10 years ago
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.
Updated by Junxiao Shi almost 10 years ago
I agree with note-8.
This Bug needs to wait after #1941. I won't agree with any hack.
Updated by Alex Afanasyev almost 10 years ago
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.
Updated by Vince Lehman almost 10 years ago
- 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.
Updated by Junxiao Shi almost 10 years ago
- Related to Feature #2401: Register RIB command prefixes using FibUpdater added
Updated by Junxiao Shi almost 10 years ago
I agree with the temporary solution in commit 0ef60bcb10080904d4fc81767a76ea41512b5dd0.
The permanent solution is written as #2401.
Updated by Junxiao Shi almost 10 years ago
- Status changed from Code review to Resolved
@Yanbiao, please verify the Bug is fixed.
Updated by Vince Lehman almost 10 years ago
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 |
Updated by Yanbiao Li almost 10 years ago
I test latest codes and confirm that this bug is resolved.
Updated by Junxiao Shi almost 10 years ago
- Status changed from Resolved to Closed