mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-29 16:24:55 +00:00
Merge pull request #2931 from donaldsharp/pim_zebra_crash
zebra: Fix crash in mroute debug
This commit is contained in:
commit
9c42f07ccb
@ -793,15 +793,17 @@ static int netlink_route_change_read_multicast(struct nlmsghdr *h,
|
|||||||
ifp = if_lookup_by_index(oif[count], vrf);
|
ifp = if_lookup_by_index(oif[count], vrf);
|
||||||
char temp[256];
|
char temp[256];
|
||||||
|
|
||||||
sprintf(temp, "%s ", ifp->name);
|
sprintf(temp, "%s(%d) ", ifp ? ifp->name : "Unknown",
|
||||||
|
oif[count]);
|
||||||
strcat(oif_list, temp);
|
strcat(oif_list, temp);
|
||||||
}
|
}
|
||||||
struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(vrf);
|
struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(vrf);
|
||||||
ifp = if_lookup_by_index(iif, vrf);
|
ifp = if_lookup_by_index(iif, vrf);
|
||||||
zlog_debug(
|
zlog_debug("MCAST VRF: %s(%d) %s (%s,%s) IIF: %s(%d) OIF: %s jiffies: %lld",
|
||||||
"MCAST VRF: %s(%d) %s (%s,%s) IIF: %s OIF: %s jiffies: %lld",
|
zvrf->vrf->name, vrf,
|
||||||
zvrf->vrf->name, vrf, nl_msg_type_to_str(h->nlmsg_type),
|
nl_msg_type_to_str(h->nlmsg_type),
|
||||||
sbuf, gbuf, ifp->name, oif_list, m->lastused);
|
sbuf, gbuf, ifp ? ifp->name : "Unknown", iif,
|
||||||
|
oif_list, m->lastused);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user