mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 07:15:33 +00:00
pimd: Prevent crash when receiving register message when the RP() is unknown
When receiving a register message for a Group, that the group has no
associated RP specified. Prevent a crash from happening.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 54aa0bf6f2
)
This commit is contained in:
parent
fda0db038d
commit
bbbe8b94c0
@ -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