]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/pim_vty.c
lib: enforce vrf_name_to_id by returning default_vrf when name is null
[mirror_frr.git] / pimd / pim_vty.c
index 3da092541dd838f40799507e9050ea005752d060..a4aec710e9a6cb2e461c741bc7e0504ea96cf41d 100644 (file)
@@ -78,6 +78,11 @@ int pim_debug_config_write(struct vty *vty)
                ++writes;
        }
 
+       if (PIM_DEBUG_MTRACE) {
+               vty_out(vty, "debug mtrace\n");
+               ++writes;
+       }
+
        if (PIM_DEBUG_MROUTE_DETAIL) {
                vty_out(vty, "debug mroute detail\n");
                ++writes;
@@ -209,10 +214,10 @@ int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty)
                                spaces);
                ++writes;
        }
-       if (qpim_ecmp_rebalance_enable) {
+       if (pim->ecmp_rebalance_enable) {
                vty_out(vty, "%sip pim ecmp rebalance\n", spaces);
                ++writes;
-       } else if (qpim_ecmp_enable) {
+       } else if (pim->ecmp_enable) {
                vty_out(vty, "%sip pim ecmp\n", spaces);
                ++writes;
        }
@@ -232,15 +237,9 @@ int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty)
        return writes;
 }
 
-int pim_global_config_write(struct vty *vty)
-{
-       return pim_global_config_write_worker(pimg, vty);
-}
-
 int pim_interface_config_write(struct vty *vty)
 {
        struct pim_instance *pim;
-       struct listnode *node;
        struct interface *ifp;
        struct vrf *vrf;
        int writes = 0;
@@ -250,8 +249,7 @@ int pim_interface_config_write(struct vty *vty)
                if (!pim)
                        continue;
 
-               for (ALL_LIST_ELEMENTS_RO(vrf_iflist(pim->vrf_id), node, ifp)) {
-
+               FOR_ALL_INTERFACES (pim->vrf, ifp) {
                        /* IF name */
                        if (vrf->vrf_id == VRF_DEFAULT)
                                vty_frame(vty, "interface %s\n", ifp->name);
@@ -260,11 +258,16 @@ int pim_interface_config_write(struct vty *vty)
                                          ifp->name, vrf->name);
                        ++writes;
 
+                       if (ifp->desc) {
+                               vty_out(vty, " description %s\n", ifp->desc);
+                               ++writes;
+                       }
+
                        if (ifp->info) {
                                struct pim_interface *pim_ifp = ifp->info;
 
                                if (PIM_IF_TEST_PIM(pim_ifp->options)) {
-                                       vty_out(vty, " ip pim sm\n");
+                                       vty_out(vty, " ip pim\n");
                                        ++writes;
                                }
 
@@ -285,6 +288,7 @@ int pim_interface_config_write(struct vty *vty)
                                                vty_out(vty, " %d",
                                                        pim_ifp->pim_default_holdtime);
                                        vty_out(vty, "\n");
+                                       ++writes;
                                }
 
                                /* update source */
@@ -314,15 +318,6 @@ int pim_interface_config_write(struct vty *vty)
                                        ++writes;
                                }
 
-                               /* IF ip igmp query-interval */
-                               if (pim_ifp->igmp_default_query_interval
-                                   != IGMP_GENERAL_QUERY_INTERVAL) {
-                                       vty_out(vty,
-                                               " ip igmp query-interval %d\n",
-                                               pim_ifp->igmp_default_query_interval);
-                                       ++writes;
-                               }
-
                                /* IF ip igmp query-max-response-time */
                                if (pim_ifp->igmp_query_max_response_time_dsec
                                    != IGMP_QUERY_MAX_RESPONSE_TIME_DSEC) {
@@ -332,6 +327,15 @@ int pim_interface_config_write(struct vty *vty)
                                        ++writes;
                                }
 
+                               /* IF ip igmp query-interval */
+                               if (pim_ifp->igmp_default_query_interval
+                                   != IGMP_GENERAL_QUERY_INTERVAL) {
+                                       vty_out(vty,
+                                               " ip igmp query-interval %d\n",
+                                               pim_ifp->igmp_default_query_interval);
+                                       ++writes;
+                               }
+
                                /* IF ip igmp join */
                                if (pim_ifp->igmp_join_list) {
                                        struct listnode *node;
@@ -358,6 +362,14 @@ int pim_interface_config_write(struct vty *vty)
                                        }
                                }
 
+                               /* boundary */
+                               if (pim_ifp->boundary_oil_plist) {
+                                       vty_out(vty,
+                                               " ip multicast boundary oil %s\n",
+                                               pim_ifp->boundary_oil_plist);
+                                       ++writes;
+                               }
+
                                writes +=
                                        pim_static_write_mroute(pim, vty, ifp);
                                pim_bfd_write_config(vty, ifp);