]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/pim_ifchannel.c
Merge pull request #5288 from SumitAgarwal123/bfd_docs
[mirror_frr.git] / pimd / pim_ifchannel.c
index 15bdf6ee6eedbdefaa228fec78988402b8799322..48bd031f1ee92b2f5e6e6869213be3d5fa90017a 100644 (file)
@@ -191,11 +191,13 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch)
                pim_upstream_del(pim_ifp->pim, ch->upstream,
                        __PRETTY_FUNCTION__);
 
-       else
-               zlog_warn("%s: Avoiding deletion of upstream with ref_count %d "
-                       "from ifchannel(%s): %s", __PRETTY_FUNCTION__,
-                       ch->upstream->ref_count, ch->interface->name,
-                       ch->sg_str);
+       else {
+               if (PIM_DEBUG_PIM_TRACE)
+                       zlog_debug("%s: Avoiding deletion of upstream with ref_count %d "
+                                  "from ifchannel(%s): %s", __PRETTY_FUNCTION__,
+                                  ch->upstream->ref_count, ch->interface->name,
+                                  ch->sg_str);
+       }
 
        ch->upstream = NULL;
 
@@ -617,7 +619,7 @@ static int on_ifjoin_expiry_timer(struct thread *t)
 
        ch = THREAD_ARG(t);
 
-       if (PIM_DEBUG_TRACE)
+       if (PIM_DEBUG_PIM_TRACE)
                zlog_debug("%s: ifchannel %s expiry timer", __PRETTY_FUNCTION__,
                           ch->sg_str);
 
@@ -636,7 +638,7 @@ static int on_ifjoin_prune_pending_timer(struct thread *t)
 
        ch = THREAD_ARG(t);
 
-       if (PIM_DEBUG_TRACE)
+       if (PIM_DEBUG_PIM_TRACE)
                zlog_debug(
                        "%s: IFCHANNEL%s %s Prune Pending Timer Popped",
                        __PRETTY_FUNCTION__, pim_str_sg_dump(&ch->sg),
@@ -795,8 +797,6 @@ void pim_ifchannel_join_add(struct interface *ifp, struct in_addr neigh_addr,
 
        ch = pim_ifchannel_add(ifp, sg, source_flags,
                               PIM_UPSTREAM_FLAG_MASK_SRC_PIM);
-       if (!ch)
-               return;
 
        /*
          RFC 4601: 4.6.1.  (S,G) Assert Message State Machine
@@ -947,7 +947,7 @@ void pim_ifchannel_prune(struct interface *ifp, struct in_addr upstream,
 
        ch = pim_ifchannel_find(ifp, sg);
        if (!ch && !(source_flags & PIM_ENCODE_RPT_BIT)) {
-               if (PIM_DEBUG_TRACE)
+               if (PIM_DEBUG_PIM_TRACE)
                        zlog_debug(
                                "%s: Received prune with no relevant ifchannel %s%s state: %d",
                                __PRETTY_FUNCTION__, ifp->name,
@@ -957,8 +957,6 @@ void pim_ifchannel_prune(struct interface *ifp, struct in_addr upstream,
 
        ch = pim_ifchannel_add(ifp, sg, source_flags,
                               PIM_UPSTREAM_FLAG_MASK_SRC_PIM);
-       if (!ch)
-               return;
 
        pim_ifp = ifp->info;
 
@@ -1086,13 +1084,6 @@ int pim_ifchannel_local_membership_add(struct interface *ifp,
        }
 
        ch = pim_ifchannel_add(ifp, sg, 0, PIM_UPSTREAM_FLAG_MASK_SRC_IGMP);
-       if (!ch) {
-               if (PIM_DEBUG_EVENTS)
-                       zlog_debug("%s:%s Unable to add ifchannel",
-                                  __PRETTY_FUNCTION__,
-                                  pim_str_sg_dump(sg));
-               return 0;
-       }
 
        ifmembership_set(ch, PIM_IFMEMBERSHIP_INCLUDE);
 
@@ -1229,10 +1220,10 @@ void pim_ifchannel_update_could_assert(struct pim_ifchannel *ch)
        }
 
        if (new_couldassert) {
-               /* CouldAssert(S,G,I) switched from FALSE to TRUE */
+               /* CouldAssert(S,G,I) switched from false to true */
                PIM_IF_FLAG_SET_COULD_ASSERT(ch->flags);
        } else {
-               /* CouldAssert(S,G,I) switched from TRUE to FALSE */
+               /* CouldAssert(S,G,I) switched from true to false */
                PIM_IF_FLAG_UNSET_COULD_ASSERT(ch->flags);
 
                if (ch->ifassert_state == PIM_IFASSERT_I_AM_WINNER) {
@@ -1312,10 +1303,10 @@ void pim_ifchannel_update_assert_tracking_desired(struct pim_ifchannel *ch)
        }
 
        if (new_atd) {
-               /* AssertTrackingDesired(S,G,I) switched from FALSE to TRUE */
+               /* AssertTrackingDesired(S,G,I) switched from false to true */
                PIM_IF_FLAG_SET_ASSERT_TRACKING_DESIRED(ch->flags);
        } else {
-               /* AssertTrackingDesired(S,G,I) switched from TRUE to FALSE */
+               /* AssertTrackingDesired(S,G,I) switched from true to false */
                PIM_IF_FLAG_UNSET_ASSERT_TRACKING_DESIRED(ch->flags);
 
                if (ch->ifassert_state == PIM_IFASSERT_I_AM_LOSER) {