mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-25 22:30:52 +00:00
Merge pull request #14338 from FRRouting/mergify/bp/stable/8.5/pr-14294
pimd: Prevent crash when receiving register message when the RP() is … (backport #14294)
This commit is contained in:
commit
b798bfefb4
@ -507,6 +507,7 @@ int pim_register_recv(struct interface *ifp, pim_addr dest_addr,
|
|||||||
struct pim_interface *pim_ifp = ifp->info;
|
struct pim_interface *pim_ifp = ifp->info;
|
||||||
struct pim_instance *pim = pim_ifp->pim;
|
struct pim_instance *pim = pim_ifp->pim;
|
||||||
pim_addr rp_addr;
|
pim_addr rp_addr;
|
||||||
|
struct pim_rpf *rpg;
|
||||||
|
|
||||||
if (pim_ifp->pim_passive_enable) {
|
if (pim_ifp->pim_passive_enable) {
|
||||||
if (PIM_DEBUG_PIM_PACKETS)
|
if (PIM_DEBUG_PIM_PACKETS)
|
||||||
@ -615,7 +616,14 @@ int pim_register_recv(struct interface *ifp, pim_addr dest_addr,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rp_addr = (RP(pim, sg.grp))->rpf_addr;
|
rpg = RP(pim, sg.grp);
|
||||||
|
if (!rpg) {
|
||||||
|
zlog_warn("%s: Received Register Message %pSG from %pPA on %s where the RP could not be looked up",
|
||||||
|
__func__, &sg, &src_addr, ifp->name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
rp_addr = rpg->rpf_addr;
|
||||||
if (i_am_rp && (!pim_addr_cmp(dest_addr, rp_addr))) {
|
if (i_am_rp && (!pim_addr_cmp(dest_addr, rp_addr))) {
|
||||||
sentRegisterStop = 0;
|
sentRegisterStop = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user