Project

General

Profile

Bug #2312

CHILD_INHERIT does not work when run nfdc register

Added by Yanbiao Li almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
RIB
Target version:
Start date:
12/19/2014
Due date:
% Done:

90%

Estimated time:

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

Related to NFD - Feature #2401: Register RIB command prefixes using FibUpdaterNew

History

#1 Updated by Alex Afanasyev almost 5 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.

#2 Updated by Alex Afanasyev almost 5 years ago

  • Description updated (diff)
  • Assignee set to Yanbiao Li
  • Target version set to v0.3

#3 Updated by Alex Afanasyev almost 5 years ago

  • Assignee changed from Yanbiao Li to Vince Lehman

#4 Updated by Alex Afanasyev over 4 years ago

  • Priority changed from Normal to High

#5 Updated by Alex Afanasyev over 4 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.

#6 Updated by Vince Lehman over 4 years ago

  • Status changed from New to In Progress

So for the second approach:

  1. Request the FIB DataSet
  2. When the full DataSet is received, enumerate each FibEntry
  3. enumerate each NextHopRecord in FibEntry
  4. 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?

#7 Updated by Junxiao Shi over 4 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

#8 Updated by Alex Afanasyev over 4 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.

#9 Updated by Junxiao Shi over 4 years ago

I agree with note-8.

This Bug needs to wait after #1941. I won't agree with any hack.

#10 Updated by Alex Afanasyev over 4 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.

#11 Updated by Vince Lehman over 4 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.

#12 Updated by Junxiao Shi over 4 years ago

  • Related to Feature #2401: Register RIB command prefixes using FibUpdater added

#13 Updated by Junxiao Shi over 4 years ago

I agree with the temporary solution in commit 0ef60bcb10080904d4fc81767a76ea41512b5dd0.

The permanent solution is written as #2401.

#14 Updated by Junxiao Shi over 4 years ago

  • Status changed from Code review to Resolved

@Yanbiao, please verify the Bug is fixed.

#15 Updated by Vince Lehman over 4 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

#16 Updated by Yanbiao Li over 4 years ago

I test latest codes and confirm that this bug is resolved.

#17 Updated by Junxiao Shi over 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF