> On Jul 13, 2023, at 17:23, Acee Lindem <[email protected]> wrote:
> 
> Hi Renato,
> 
>> 
>> Lastly, this might just be a small nitpick of mine, but I don't think
>> having a "length" leaf for all TLVs and Sub-TLVs adds much value. In
>> my opinion, it's only relevant for unknown TLVs that couldn't be
>> decoded; otherwise, it just adds unnecessary noise. If we take a look
>> at the IS-IS model, for instance, we can see that it doesn't have a
>> "length" leaf for the LSP TLVs and Sub-TLVs.
> 
> I’ve removed the three "length" leaves that were fixed length. I left the 
> ones that were variable due to contained sub-TLVS.
> Are you saying that these TLVs would be malformed if the length weren’t 
> correct?

I wonder what one would do with these length values? Only "unknown" things have 
a value leaf

  `+--ro value? yang:hex-string`

And in that case the length is given by the length of the hex-string.

I definitely think there could be value with having the length field when 
things are malformed i.e., where the `length` field in the [sub-]TLV disagrees 
with the actual length of the `yang:hex-string` value. In this case though we 
might want to call it out as `malformed-length` or something.

Thanks,
Chris.

Attachment: signature.asc
Description: Message signed with OpenPGP

_______________________________________________
Lsr mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/lsr

Reply via email to