Project

General

Profile

Actions

Bug #2031

closed

fib/add-nexthop: FaceId should be optional

Added by Tai-Lin Chu about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Management
Target version:
Start date:
10/06/2014
Due date:
% Done:

100%

Estimated time:
1.00 h

Description

Steps to reproduce:

  1. send a fib/add-nexthop command without FaceId field in the parameter.

Expected: FaceId is implied as the requesting Face.

Actual: 400 error

Actions #1

Updated by Junxiao Shi about 10 years ago

Please provide a code snippet to reproduce this issue.

Actions #2

Updated by Tai-Lin Chu about 10 years ago

fib add-nexthop?

I actually find the bug. It is pretty obvious.

https://github.com/named-data/NFD/blob/68bc1e0dce68c0a0ef98fe5e3fee15a4d8b21fc8/daemon/mgmt/fib-manager.cpp#L146

that !parameters.hasFaceId()

Actions #3

Updated by Junxiao Shi about 10 years ago

  • Subject changed from face id cannot be ignored to fib/add-nexthop: FaceId should be optional
  • Description updated (diff)
  • Category set to Management
  • Target version set to v0.3
  • Estimated time set to 1.00 h
Actions #4

Updated by Tai-Lin Chu about 10 years ago

https://github.com/named-data/NFD/commit/7564d97d135b3fc9bb1150cdfb7505177813f572

The origin commit that introduces the bug. I guess it is not a bug back then.

Actions #5

Updated by Junxiao Shi about 10 years ago

  • Assignee set to Tai-Lin Chu

Please cancel GitHub pull request, and submit the patch to Gerrit for review.

Actions #6

Updated by Junxiao Shi about 10 years ago

The face ID is optional only for self registrations, not for any other fib operations to add routes.

No. fib/add-nexthop command allows optional FaceId.

Actions #7

Updated by Lan Wang about 10 years ago

In what situation is the optional faceID needed? If there has not been any problems so far, I assume nrd always supplies the faceID.

Actions #8

Updated by Junxiao Shi about 10 years ago

The protocol allows omitting FaceId. The default value of FaceId is 0, which means "the requesting face".

nrd always setting FaceId doesn't mean FibManager can violate protocol.

Actions #9

Updated by Lan Wang about 10 years ago

I was asking why the protocol defines the FaceID as optional. If I understand correctly, the fib commands are issued only by nrd. Applications do not directly interact with nfd to register their prefixes, but the optional FaceID is useful only in this case.

Actions #10

Updated by Junxiao Shi about 10 years ago

The recommended way to represent "self" is omitting the FaceId field. This is consistent with other commands such as faces/enable-local-control and rib/register.

Allowing FaceId=0 is due to historical reason.

Actions #11

Updated by Alex Afanasyev about 10 years ago

  • Status changed from New to Code review
Actions #12

Updated by Junxiao Shi about 10 years ago

  • Status changed from Code review to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF