[BGPCEP-681] Termination Reason not set/ unspecified Created: 06/Aug/17  Updated: 24/Jan/24

Status: Confirmed
Project: bgpcep
Component/s: PCEP
Affects Version/s: None
Fix Version/s: 0.20.7

Type: Bug
Reporter: Dana Kutenicsova Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 8935

 Description   

RFC5440 suggests that setting Termination Reason in Close object is optional. This means we also can get 0, which is undefined in current enumeration object.

Also consider possibility of getting a value that is not listed in IANA (6 and up).



 Comments   
Comment by Robert Varga [ 06/Aug/17 ]

I am not sure this is a problem as such, unless there is reason value out there outside of IANA allocation.

For values 1-5, we do the right thing. We map '0' to 'null' TerminationReason, which really is to say 'not provided' – which I think is consistent.

For values 6-255, we return null, too. This may be a problem if we need to interpret those reasons and treat it differently from 'not provided'. If that indeed is the case, we must turn TerminationReason into an abstract class and provide a variadic 'UNRECOGNIZED' subclass in addition to the ones already present, which will cover 6-255.

Generated at Wed Feb 07 19:13:49 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.