]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: fix pim interface traffic & pim rp-info json command 5882/head
authorSarita Patra <saritap@vmware.com>
Mon, 2 Mar 2020 09:10:22 +0000 (01:10 -0800)
committerSarita Patra <saritap@vmware.com>
Tue, 17 Mar 2020 04:44:38 +0000 (21:44 -0700)
Issue 1: "show ip pim interface traffic" not show prune TX/RX
Rootcause : not added the variable in the json
Fix : add prune TX/RX in show ip pim interface traffic json

Issue 2: "show ip pim rp-info" not shows the key iAmRp when it is false
Rootcause: Only display the key when the value is true.
Fix: add iAmRp as false in show ip pim rp-info json

Issue 3: "show ip pim rp-info" not showing outbound interface if it is empty
Rootcause: Only display when there is any OIL

Fix: When RP is not reachable then, the outbound interface is Unknown
The command "show ip pim rp-info json" not displaying the outbound
interafce if it is unknown

Signed-off-by: Sarita Patra <saritap@vmware.com>
libyang [new submodule]
pimd/pim_cmd.c
pimd/pim_rp.c

diff --git a/libyang b/libyang
new file mode 160000 (submodule)
index 0000000..4241fbb
--- /dev/null
+++ b/libyang
@@ -0,0 +1 @@
+Subproject commit 4241fbbe72216ae2b84f10d25acb1bc84eb967e4
index abc154896731b8375790144ae1eb99b0ab219821..12382b8e3d3c77e9ebcf0fa0a4582584a661fa3e 100644 (file)
@@ -1520,6 +1520,10 @@ static void pim_show_interface_traffic(struct pim_instance *pim,
                                            pim_ifp->pim_ifstat_join_recv);
                        json_object_int_add(json_row, "joinTx",
                                            pim_ifp->pim_ifstat_join_send);
+                       json_object_int_add(json_row, "pruneTx",
+                                           pim_ifp->pim_ifstat_prune_send);
+                       json_object_int_add(json_row, "pruneRx",
+                                           pim_ifp->pim_ifstat_prune_recv);
                        json_object_int_add(json_row, "registerRx",
                                            pim_ifp->pim_ifstat_reg_recv);
                        json_object_int_add(json_row, "registerTx",
index 8799134edd6054100234f443769cab97cfb88272..6fcb6e37153a8302990aec4635c99cea58035e12 100644 (file)
@@ -1293,10 +1293,16 @@ void pim_rp_show_information(struct pim_instance *pim, struct vty *vty, bool uj)
                                                json_row, "outboundInterface",
                                                rp_info->rp.source_nexthop
                                                        .interface->name);
-
+                               else
+                                       json_object_string_add(
+                                               json_row, "outboundInterface",
+                                               "Unknown");
                                if (rp_info->i_am_rp)
                                        json_object_boolean_true_add(json_row,
                                                                     "iAmRP");
+                               else
+                                       json_object_boolean_false_add(json_row,
+                                                                     "iAmRP");
 
                                if (rp_info->plist)
                                        json_object_string_add(json_row,