Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
Bugzilla Migration
-
None
-
Operating System: All
Platform: All
-
2534
Description
As per the PCEP drafts(https://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-03#page-9), SID value represents an MPLS label stack entry as specified as RFC5462.
M: When this bit is set, the SID value represents an MPLS label
stack entry as specified in [RFC5462] where only the label
value is specified by the PCE. Other fields (TC, S, and TTL)
fields MUST be considered invalid, and PCC MUST set these
fields according to its local policy and MPLS forwarding rules
This means MPLS label stack entry has the following 32 bit format where first 20 bits are the label and other 12 bits are the TC, S and TTL values.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ Label
| Label | TC | S | TTL | Stack |
Label: Label Value, 20 bits
TC: Traffic Class field, 3 bits
S: Bottom of Stack, 1 bit
TTL: Time to Live, 8 bits
But the code(SrEroSubobjectParser.java) does not process the M flag correctly.
I correct it as following, please review.
public void serializeSubobject(Subobject subobject, final ByteBuf buffer) {
if (srEroSubobject.getSid() != null && !flags.isS())
}
public Subobject parseSubobject(ByteBuf buffer, boolean loose) throws PCEPDeserializerException {
if (!flags.isS())
}