]> git.puffer.fish Git - matthieu/frr.git/commitdiff
isisd: Add Node MSD Sub-TLV (SRv6) to the LSPs
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Mon, 13 Mar 2023 01:07:16 +0000 (02:07 +0100)
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Mon, 11 Sep 2023 15:34:51 +0000 (17:34 +0200)
Add Node MSD Sub-TLV containing the SRv6 MSDs to the Router Capabilities
TLV in the LSPs generated with the `lsp_build()` function.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
isisd/isis_lsp.c

index f667f30e4825871432f78677962d124309435e0a..07c1404a0ff749443c508be84dbad7025ba30bce 100644 (file)
@@ -1213,10 +1213,22 @@ static void lsp_build(struct isis_lsp *lsp, struct isis_area *area)
 
                /* Add SRv6 Sub-TLVs if SRv6 is enabled */
                if (area->srv6db.config.enabled) {
+                       struct isis_srv6_db *srv6db = &area->srv6db;
+
                        rcap->srv6_cap.is_srv6_capable = true;
 
                        /* SRv6 flags */
                        rcap->srv6_cap.flags = 0;
+
+                       /* And finally MSDs */
+                       rcap->srv6_msd.max_seg_left_msd =
+                               srv6db->config.max_seg_left_msd;
+                       rcap->srv6_msd.max_end_pop_msd =
+                               srv6db->config.max_end_pop_msd;
+                       rcap->srv6_msd.max_h_encaps_msd =
+                               srv6db->config.max_h_encaps_msd;
+                       rcap->srv6_msd.max_end_d_msd =
+                               srv6db->config.max_end_d_msd;
                }
        }