summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2019-11-15 11:17:30 -0800
committerAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2019-11-15 12:00:29 -0800
commit9929a2a9af74fa96900d670e714e8fa613c44f45 (patch)
tree9830ce4f0cb497b61c1c4019a91cf6325a52da96
parent70c86421c9a2c74e2326b9e930c7a32addc8cd88 (diff)
pimd: display changes to indicate if a SG entry is still on the RPT
Sample output - root@leaf-12:~# net show pim state Codes: J -> Pim Join, I -> IGMP Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted Active Source Group RPT IIF OIL 1 * 239.1.1.111 y swp1 swp3( J ) 1 6.0.0.28 239.1.1.111 y swp1 1 * 239.1.1.112 y swp1 swp3( J ) 1 6.0.0.28 239.1.1.112 y swp1 1 * 239.1.1.113 y swp1 swp3( J ) 1 6.0.0.28 239.1.1.113 y swp1 1 * 239.1.1.114 y swp1 swp3( J ) 1 6.0.0.28 239.1.1.114 y swp1 root@leaf-12:~# Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
-rw-r--r--pimd/pim_cmd.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 8e7f46d42c..4bcb651067 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -1990,7 +1990,7 @@ static void pim_show_state(struct pim_instance *pim, struct vty *vty,
vty_out(vty,
"Codes: J -> Pim Join, I -> IGMP Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted");
vty_out(vty,
- "\nInstalled Source Group IIF OIL\n");
+ "\nActive Source Group RPT IIF OIL\n");
}
for (ALL_LIST_ELEMENTS_RO(pim->channel_oil_list, node, c_oil)) {
@@ -2000,8 +2000,16 @@ static void pim_show_state(struct pim_instance *pim, struct vty *vty,
char out_ifname[INTERFACE_NAMSIZ + 1];
int oif_vif_index;
struct interface *ifp_in;
+ bool isRpt;
first_oif = 1;
+ if ((c_oil->up &&
+ PIM_UPSTREAM_FLAG_TEST_USE_RPT(c_oil->up->flags)) ||
+ c_oil->oil.mfcc_origin.s_addr == INADDR_ANY)
+ isRpt = true;
+ else
+ isRpt = false;
+
pim_inet4_dump("<group?>", c_oil->oil.mfcc_mcastgrp, grp_str,
sizeof(grp_str));
pim_inet4_dump("<source?>", c_oil->oil.mfcc_origin, src_str,
@@ -2055,6 +2063,12 @@ static void pim_show_state(struct pim_instance *pim, struct vty *vty,
json_ifp_in);
json_object_int_add(json_source, "Installed",
c_oil->installed);
+ if (isRpt)
+ json_object_boolean_true_add(
+ json_source, "isRpt");
+ else
+ json_object_boolean_false_add(
+ json_source, "isRpt");
json_object_int_add(json_source, "RefCount",
c_oil->oil_ref_count);
json_object_int_add(json_source, "OilListSize",
@@ -2073,8 +2087,9 @@ static void pim_show_state(struct pim_instance *pim, struct vty *vty,
c_oil->cc.wrong_if);
}
} else {
- vty_out(vty, "%-9d %-15s %-15s %-16s ",
- c_oil->installed, src_str, grp_str, in_ifname);
+ vty_out(vty, "%-6d %-15s %-15s %-3s %-16s ",
+ c_oil->installed, src_str, grp_str,
+ isRpt? "y" : "n", in_ifname);
}
for (oif_vif_index = 0; oif_vif_index < MAXVIFS;