]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Fix crash on RP.
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 23 Aug 2016 16:25:55 +0000 (12:25 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:07 +0000 (20:26 -0500)
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>
pimd/pim_register.c

index bd41f1f4f07771464f9aa1ee4987def5390319e7..46601c0dcbdeca37979c28c8b4e11c6c790df280 100644 (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,