pimd: Fix crash on RP.

When register stop was received but the upstream
creation fails we are not handling it properly.
Note and return.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2016-08-23 12:25:55 -04:00
parent 3565202d74
commit 4e85d20983

View File

@ -323,7 +323,11 @@ pim_register_recv (struct interface *ifp,
if (!upstream)
{
upstream = pim_upstream_add (&sg, ifp);
if (!upstream)
{
zlog_warn ("Failure to crate upstream state");
return 1;
}
upstream->upstream_register = src_addr;
pim_rp_set_upstream_addr (&upstream->upstream_addr, sg.src, sg.grp);
pim_nexthop_lookup (&upstream->rpf.source_nexthop,