diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-03-16 16:43:01 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-03-16 19:03:03 -0400 |
| commit | 4a57e76af4235267aabd145fea198720bc8ac8f8 (patch) | |
| tree | e4a7ead1e13e1d21a620da5171540a42f8c762fc | |
| parent | 7eb9068901571e0dcd23ce887bdc3e018683f298 (diff) | |
pimd: Cleanup pim_register_recv upstream create
When we get a register packet from a FHR, we
were doing allot of work twice.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| -rw-r--r-- | pimd/pim_register.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/pimd/pim_register.c b/pimd/pim_register.c index 46d8e3ec2e..cb9d7e3744 100644 --- a/pimd/pim_register.c +++ b/pimd/pim_register.c @@ -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) || |
