fib/add-nexthop: FaceId should be optional
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
Please provide a code snippet to reproduce this issue.
- 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
- Assignee set to Tai-Lin Chu
Please cancel GitHub pull request, and submit the patch to Gerrit for review.
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.
In what situation is the optional faceID needed? If there has not been any problems so far, I assume nrd always supplies the faceID.
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.
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.
The recommended way to represent "self" is omitting the FaceId field. This is consistent with other commands such as
Allowing FaceId=0 is due to historical reason.
- Status changed from New to Code review
- Status changed from Code review to Closed
- % Done changed from 0 to 100
Also available in: Atom