From c43043e618a36df8e833ff5b0f84c88a20adea3b Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Sat, 3 Jun 2023 13:30:32 +0200 Subject: [PATCH] isisd: Decode MTID when unpacking SRv6 Locator TLV The SRv6 Locator TLV (RFC 9352 section #7.1) starts with the MTID field. Let's expect the MTID as the first field when we are unpacking an SRv6 Locator TLV. Signed-off-by: Carmine Scarpitta --- isisd/isis_tlvs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/isisd/isis_tlvs.c b/isisd/isis_tlvs.c index 81fb93e4b4..35e970d1fe 100644 --- a/isisd/isis_tlvs.c +++ b/isisd/isis_tlvs.c @@ -5378,7 +5378,8 @@ static int unpack_tlv_with_items(enum isis_tlv_context context, tlv_start = stream_get_getp(s); tlv_pos = 0; - if (context == ISIS_CONTEXT_LSP && IS_COMPAT_MT_TLV(tlv_type)) { + if (context == ISIS_CONTEXT_LSP && + (IS_COMPAT_MT_TLV(tlv_type) || tlv_type == ISIS_TLV_SRV6_LOCATOR)) { if (tlv_len < 2) { sbuf_push(log, indent, "TLV is too short to contain MTID\n");