]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: add per-VRF SID to the bgpd configuration
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Sat, 23 Jul 2022 17:58:58 +0000 (19:58 +0200)
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Tue, 18 Oct 2022 14:08:24 +0000 (16:08 +0200)
This commit adds the per-VRF SID chosen to advertise L3VPN for IPv4 and IPv6 address families using a single SID to the bgpd configuration.

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

index 8566dba54ba750d63e24c775041e69fc2c383393..427ad1b3321a3cc65b8c32fae79e2c404dcdb1d5 100644 (file)
@@ -17667,6 +17667,7 @@ int bgp_config_write(struct vty *vty)
        struct listnode *mnode, *mnnode;
        afi_t afi;
        safi_t safi;
+       uint32_t tovpn_sid_index = 0;
 
        if (bm->rmap_update_timer != RMAP_DEFAULT_UPDATE_TIMER)
                vty_out(vty, "bgp route-map delay-timer %u\n",
@@ -18051,6 +18052,13 @@ int bgp_config_write(struct vty *vty)
                        vty_endframe(vty, " exit\n");
                }
 
+               tovpn_sid_index = bgp->tovpn_sid_index;
+               if (CHECK_FLAG(bgp->vrf_flags, BGP_VRF_TOVPN_SID_AUTO)) {
+                       vty_out(vty, " sid vpn per-vrf export auto\n");
+               } else if (tovpn_sid_index != 0) {
+                       vty_out(vty, " sid vpn per-vrf export %d\n",
+                               tovpn_sid_index);
+               }
 
                /* IPv4 unicast configuration.  */
                bgp_config_write_family(vty, bgp, AFI_IP, SAFI_UNICAST);