mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 13:13:08 +00:00
pim6d: Don't display MLD disabled or down interfaces in "show ipv6 mld interface" cmd
We should not display down interfaces or MLD disabled interfaces in "show ipv6 mld interface" command. Before fix: ========== frr# show ipv6 mld interface Interface State V Querier Timer Uptime ens192 up 2 fe80::250:56ff:feb7:d04 query 00:00:25.432 00:00:07.038 ens224 up 1 fe80::250:56ff:feb7:a7e3 query 00:00:24.219 00:00:07.031 pim6reg down After fix: ========= frr# show ipv6 mld interface Interface State V Querier Timer Uptime ens192 up 2 fe80::250:56ff:feb7:d04 query 00:00:25.432 00:00:07.038 ens224 up 1 fe80::250:56ff:feb7:a7e3 query 00:00:24.219 00:00:07.031 Issue: #11241 Signed-off-by: Sarita Patra <saritap@vmware.com>
This commit is contained in:
parent
ba995a720b
commit
fe4db62c3d
@ -2386,14 +2386,6 @@ static void gm_show_if_one(struct vty *vty, struct interface *ifp,
|
|||||||
struct gm_if *gm_ifp = pim_ifp->mld;
|
struct gm_if *gm_ifp = pim_ifp->mld;
|
||||||
bool querier;
|
bool querier;
|
||||||
|
|
||||||
if (!gm_ifp) {
|
|
||||||
if (js_if)
|
|
||||||
json_object_string_add(js_if, "state", "down");
|
|
||||||
else
|
|
||||||
vty_out(vty, "%-16s %5s\n", ifp->name, "down");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
querier = IPV6_ADDR_SAME(&gm_ifp->querier, &pim_ifp->ll_lowest);
|
querier = IPV6_ADDR_SAME(&gm_ifp->querier, &pim_ifp->ll_lowest);
|
||||||
|
|
||||||
if (js_if) {
|
if (js_if) {
|
||||||
@ -2437,6 +2429,7 @@ static void gm_show_if_vrf(struct vty *vty, struct vrf *vrf, const char *ifname,
|
|||||||
{
|
{
|
||||||
struct interface *ifp;
|
struct interface *ifp;
|
||||||
json_object *js_vrf;
|
json_object *js_vrf;
|
||||||
|
struct pim_interface *pim_ifp;
|
||||||
|
|
||||||
if (js) {
|
if (js) {
|
||||||
js_vrf = json_object_new_object();
|
js_vrf = json_object_new_object();
|
||||||
@ -2453,8 +2446,11 @@ static void gm_show_if_vrf(struct vty *vty, struct vrf *vrf, const char *ifname,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ifp->info)
|
pim_ifp = ifp ->info;
|
||||||
|
|
||||||
|
if (!pim_ifp || !pim_ifp->mld)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (js) {
|
if (js) {
|
||||||
js_if = json_object_new_object();
|
js_if = json_object_new_object();
|
||||||
json_object_object_add(js_vrf, ifp->name, js_if);
|
json_object_object_add(js_vrf, ifp->name, js_if);
|
||||||
|
Loading…
Reference in New Issue
Block a user