]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Cleanup pim_register_recv upstream create
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 16 Mar 2017 20:43:01 +0000 (16:43 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 16 Mar 2017 23:03:03 +0000 (19:03 -0400)
When we get a register packet from a FHR, we
were doing allot of work twice.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_register.c

index 46d8e3ec2e7ca55e1de8c5ecb8be9f86a6efdd11..cb9d7e3744d4439ccc283960b05b4d47182d5490 100644 (file)
@@ -332,34 +332,16 @@ pim_register_recv (struct interface *ifp,
      */
     if (!upstream)
       {
-       upstream = pim_upstream_add (&sg, ifp,
-                                    PIM_UPSTREAM_FLAG_MASK_SRC_STREAM,
-                                    __PRETTY_FUNCTION__);
+        upstream = pim_upstream_add (&sg, ifp,
+                                     PIM_UPSTREAM_FLAG_MASK_SRC_STREAM,
+                                     __PRETTY_FUNCTION__);
         if (!upstream)
           {
             zlog_warn ("Failure to create upstream state");
             return 1;
           }
-        PIM_UPSTREAM_FLAG_SET_SRC_STREAM(upstream->flags);
 
         upstream->upstream_register = src_addr;
-       pim_rp_set_upstream_addr (&upstream->upstream_addr, sg.src, sg.grp);
-       if (pim_nexthop_lookup (&upstream->rpf.source_nexthop,
-                               upstream->upstream_addr, 1) != 0)
-          {
-            if (PIM_DEBUG_PIM_REG)
-              {
-                zlog_debug ("Received Register(%s), for which I have no path back", upstream->sg_str);
-              }
-            PIM_UPSTREAM_FLAG_UNSET_SRC_STREAM(upstream->flags);
-            pim_upstream_del (upstream, __PRETTY_FUNCTION__);
-            return 1;
-          }
-       upstream->sg.src = sg.src;
-       upstream->rpf.rpf_addr = upstream->rpf.source_nexthop.mrib_nexthop_addr;
-
-       upstream->join_state = PIM_UPSTREAM_NOTJOINED;
-
       }
 
     if ((upstream->sptbit == PIM_UPSTREAM_SPTBIT_TRUE) ||