]> git.proxmox.com Git - mirror_frr.git/blobdiff - staticd/static_vrf.c
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
[mirror_frr.git] / staticd / static_vrf.c
index 6946f21271e455a602d83597e67683e880f96225..9dd25fbdd1316f19685e9f6a35a7cf66006514fc 100644 (file)
@@ -153,12 +153,18 @@ static int static_vrf_config_write(struct vty *vty)
        struct vrf *vrf;
 
        RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) {
+               if (vrf->vrf_id != VRF_DEFAULT)
+                       vty_frame(vty, "vrf %s\n", vrf->name);
+
                static_config(vty, vrf->info, AFI_IP,
                              SAFI_UNICAST, "ip route");
                static_config(vty, vrf->info, AFI_IP,
                              SAFI_MULTICAST, "ip mroute");
                static_config(vty, vrf->info, AFI_IP6,
                              SAFI_UNICAST, "ipv6 route");
+
+               if (vrf->vrf_id != VRF_DEFAULT)
+                       vty_endframe(vty, " exit-vrf\n!\n");
        }
 
        return 0;
@@ -190,7 +196,7 @@ int static_vrf_has_config(struct static_vrf *svrf)
 void static_vrf_init(void)
 {
        vrf_init(static_vrf_new, static_vrf_enable,
-                static_vrf_disable, static_vrf_delete);
+                static_vrf_disable, static_vrf_delete, NULL);
 
        vrf_cmd_init(static_vrf_config_write, &static_privs);
 }