diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-06 16:08:09 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-22 02:26:18 +0100 |
commit | 6a78764e468bd002d795309e17b3fd01a40ea707 (patch) | |
tree | 5de58c7d401e0fae88fb78b859aa2b212ae3e422 /pimd/pim_mroute.c | |
parent | pimd: Cleanup debugs for pim_upstream_sg_running (diff) | |
download | frr-6a78764e468bd002d795309e17b3fd01a40ea707.tar.xz frr-6a78764e468bd002d795309e17b3fd01a40ea707.zip |
pimd: Clarify pim_mroute_[add|del] function debugging
When debugging is turned on for 'debug mroute' we
are unable to tell when a mroute has been added
or deleted from the mrib. Notice when we
do it and who called it.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_mroute.c')
-rw-r--r-- | pimd/pim_mroute.c | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index 01fa52952..fdae0b9a2 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -402,7 +402,7 @@ pim_mroute_msg_wrvifwhole (int fd, struct interface *ifp, const char *buf) up->channel_oil = pim_channel_oil_add (&sg, pim_ifp->mroute_vif_index); pim_upstream_inherited_olist (up); if (!up->channel_oil->installed) - pim_mroute_add (up->channel_oil); + pim_mroute_add (up->channel_oil, __PRETTY_FUNCTION__); pim_upstream_set_sptbit (up, ifp); } else @@ -423,7 +423,7 @@ pim_mroute_msg_wrvifwhole (int fd, struct interface *ifp, const char *buf) pim_ifp = ifp->info; oil = pim_channel_oil_add (&sg, pim_ifp->mroute_vif_index); if (!oil->installed) - pim_mroute_add (oil); + pim_mroute_add (oil, __PRETTY_FUNCTION__); if (pim_if_connected_to_source (ifp, sg.src)) { up = pim_upstream_add (&sg, ifp, PIM_UPSTREAM_FLAG_MASK_FHR, __PRETTY_FUNCTION__); @@ -745,7 +745,7 @@ int pim_mroute_del_vif(int vif_index) return 0; } -int pim_mroute_add(struct channel_oil *c_oil) +int pim_mroute_add(struct channel_oil *c_oil, const char *name) { int err; int orig = 0; @@ -805,11 +805,22 @@ int pim_mroute_add(struct channel_oil *c_oil) return -2; } + if (PIM_DEBUG_MROUTE) + { + struct prefix_sg sg; + + sg.src = c_oil->oil.mfcc_origin; + sg.grp = c_oil->oil.mfcc_mcastgrp; + + zlog_debug("%s(%s), Added Route: %s to mroute table", + __PRETTY_FUNCTION__, name, pim_str_sg_dump(&sg)); + } + c_oil->installed = 1; return 0; } -int pim_mroute_del (struct channel_oil *c_oil) +int pim_mroute_del (struct channel_oil *c_oil, const char *name) { int err; @@ -832,6 +843,16 @@ int pim_mroute_del (struct channel_oil *c_oil) return -2; } + if (PIM_DEBUG_MROUTE) + { + struct prefix_sg sg; + + sg.src = c_oil->oil.mfcc_origin; + sg.grp = c_oil->oil.mfcc_mcastgrp; + + zlog_debug("%s(%s), Deleted Route: %s from mroute table", + __PRETTY_FUNCTION__, name, pim_str_sg_dump(&sg)); + } c_oil->installed = 0; return 0; |