Bug #2031
closedfib/add-nexthop: FaceId should be optional
100%
Description
Steps to reproduce:
- send a
fib/add-nexthop
command without FaceId field in the parameter.
Expected: FaceId is implied as the requesting Face.
Actual: 400 error
Updated by Junxiao Shi about 10 years ago
Please provide a code snippet to reproduce this issue.
Updated by Tai-Lin Chu about 10 years ago
fib add-nexthop?
I actually find the bug. It is pretty obvious.
that !parameters.hasFaceId()
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
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.
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.
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.
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.
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.
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.
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.
Updated by Alex Afanasyev about 10 years ago
- Status changed from New to Code review
Updated by Junxiao Shi about 10 years ago
- Status changed from Code review to Closed
- % Done changed from 0 to 100