mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-30 04:31:02 +00:00
pimd: Fix crash when looking up incoming interface
It is possible that the incoming interface lookup will fail because we are in transition from one vrf to another. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
b5f3a428f2
commit
05d8470ff5
@ -327,11 +327,11 @@ static int pim_sock_read(struct thread *t)
|
||||
* it's the right interface because we bind to it
|
||||
*/
|
||||
ifp = if_lookup_by_index(ifindex, pim_ifp->pim->vrf_id);
|
||||
if (!ifp->info) {
|
||||
if (!ifp || !ifp->info) {
|
||||
if (PIM_DEBUG_PIM_PACKETS)
|
||||
zlog_debug(
|
||||
"%s: Received incoming pim packet on interface not yet configured for pim %s",
|
||||
__PRETTY_FUNCTION__, ifp->name);
|
||||
"%s: Received incoming pim packet on interface not yet configured for pim",
|
||||
__PRETTY_FUNCTION__);
|
||||
goto done;
|
||||
}
|
||||
int fail = pim_pim_packet(ifp, buf, len);
|
||||
|
Loading…
Reference in New Issue
Block a user