diff options
author | Sarita Patra <saritap@vmware.com> | 2023-06-07 14:44:19 +0200 |
---|---|---|
committer | Sarita Patra <saritap@vmware.com> | 2023-06-08 08:57:56 +0200 |
commit | 49a6c85563c55ce44237b0db532471267b6d1da3 (patch) | |
tree | b8c7e15e6a70682ef1657bcf61a40315b63471a5 /pimd | |
parent | Merge pull request #11560 from patrasar/fix_pim6_state_on_prune (diff) | |
download | frr-49a6c85563c55ce44237b0db532471267b6d1da3.tar.xz frr-49a6c85563c55ce44237b0db532471267b6d1da3.zip |
pim6d: "show ipv6 pim state" not displaying when OIL is empty
Problem:
-------
The cli "show ipv6 pim state" is not displaying when outgoing
interface list is empty.
This is fixed now.
Before Fix:
----------
frr# show ipv6 pim state json
{
"ffaa::5":{
"1100::10":{
"ens224":{
},
"installed":1,
"isRpt":false,
"refCount":1,
"oilListSize":0,
"oilRescan":0,
"lastUsed":0,
"packetCount":40,
"byteCount":3080,
"wrongInterface":1
}
}
}
frr# show ipv6 pim state
Codes: J -> Pim Join, I -> MLD Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted
Active Source Group RPT IIF OIL
After fix:
---------
Case 1:
- "show ipv6 pim state" output for 1 mroute with 1 oil.
frr# show ipv6 pim state
Codes: J -> Pim Join, I -> MLD Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted
Active Source Group RPT IIF OIL
1 1100::10 ffaa::5 n ens224 ens256( J )
Case 2:
- "show ipv6 pim state" output for 1 mroute with multiple oil.
frr# show ipv6 pim state
Codes: J -> Pim Join, I -> MLD Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted
Active Source Group RPT IIF OIL
1 1100::10 ffaa::5 n ens224 ens192( J )
ens256( J )
Case 3:
- "show ipv6 pim state" output for 1 mroute with no oil
frr# show ipv6 pim state
Codes: J -> Pim Join, I -> MLD Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted
Active Source Group RPT IIF OIL
1 1100::10 ffaa::5 n ens224
Case 4:
- "show ipv6 pim state" output for multiple mroute with multiple oil
frr# show ipv6 pim state
Codes: J -> Pim Join, I -> MLD Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted
Active Source Group RPT IIF OIL
1 * ff05::2 y ens224 pim6reg(I )
ens192(I )
1 * ffaa::5 y ens224 pim6reg(I )
ens192(I )
Issue: #13070
Signed-off-by: Sarita Patra <saritap@vmware.com>
Diffstat (limited to 'pimd')
-rw-r--r-- | pimd/pim_cmd_common.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/pimd/pim_cmd_common.c b/pimd/pim_cmd_common.c index 5b905a953..6af19cadd 100644 --- a/pimd/pim_cmd_common.c +++ b/pimd/pim_cmd_common.c @@ -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; @@ -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, |