Skip to content

Commit

Permalink
pim6d: "show ipv6 pim state" not displaying when OIL is empty #13467
Browse files Browse the repository at this point in the history
  • Loading branch information
mobash-rasool committed Jun 28, 2023
1 parent f0061c9 commit 7db379e
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions pimd/pim_cmd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,13 +1148,18 @@ void pim_show_state(struct pim_instance *pim, struct vty *vty,
"wrongInterface",
c_oil->cc.wrong_if);
}
}
} else
#if PIM_IPV == 4
else
vty_out(vty, "%-6d %-15pPAs %-15pPAs %-3s %-16s ",
c_oil->installed, oil_origin(c_oil),
oil_mcastgrp(c_oil), isRpt ? "y" : "n",
in_ifname);
#else
/* Add a new row for c_oil with no OIF */
ttable_add_row(tt, "%d|%pPAs|%pPAs|%s|%s|%c",
c_oil->installed, oil_origin(c_oil),
oil_mcastgrp(c_oil), isRpt ? "y" : "n",
in_ifname, ' ');
#endif

for (oif_vif_index = 0; oif_vif_index < MAXVIFS;
Expand Down Expand Up @@ -1225,6 +1230,13 @@ void pim_show_state(struct pim_instance *pim, struct vty *vty,
#if PIM_IPV == 4
vty_out(vty, "%s%s", out_ifname, flag);
#else
/* OIF found.
* Delete the existing row for c_oil,
* with no OIF.
* Add a new row for c_oil with OIF and
* flag.
*/
ttable_del_row(tt, tt->nrows - 1);
ttable_add_row(
tt, "%d|%pPAs|%pPAs|%s|%s|%s%s",
c_oil->installed,
Expand Down

0 comments on commit 7db379e

Please sign in to comment.