]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: Decode MTID when unpacking SRv6 Locator TLV
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Sat, 3 Jun 2023 11:30:32 +0000 (13:30 +0200)
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Mon, 11 Sep 2023 15:35:15 +0000 (17:35 +0200)
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 <carmine.scarpitta@uniroma2.it>
isisd/isis_tlvs.c

index 81fb93e4b4c5413dbf536c1e2fa223a100428413..35e970d1fec331fedfd8adfb6387c83352352662 100644 (file)
@@ -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");