summaryrefslogtreecommitdiffstats
path: root/pimd/pim_static.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-12-06 16:08:09 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-12-22 02:26:18 +0100
commit6a78764e468bd002d795309e17b3fd01a40ea707 (patch)
tree5de58c7d401e0fae88fb78b859aa2b212ae3e422 /pimd/pim_static.c
parentpimd: Cleanup debugs for pim_upstream_sg_running (diff)
downloadfrr-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_static.c')
-rw-r--r--pimd/pim_static.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/pimd/pim_static.c b/pimd/pim_static.c
index 443e7caca..c3c40ff21 100644
--- a/pimd/pim_static.c
+++ b/pimd/pim_static.c
@@ -175,7 +175,7 @@ int pim_static_add(struct interface *iif, struct interface *oif, struct in_addr
listnode_add(qpim_static_route_list, s_route);
}
- if (pim_mroute_add(&s_route->c_oil))
+ if (pim_mroute_add(&s_route->c_oil, __PRETTY_FUNCTION__))
{
char gifaddr_str[INET_ADDRSTRLEN];
char sifaddr_str[INET_ADDRSTRLEN];
@@ -254,23 +254,23 @@ int pim_static_del(struct interface *iif, struct interface *oif, struct in_addr
/* If there are no more outputs then delete the whole route, otherwise set the route with the new outputs */
if (s_route->c_oil.oil_ref_count <= 0 ?
- pim_mroute_del(&s_route->c_oil) : pim_mroute_add(&s_route->c_oil)) {
- char gifaddr_str[INET_ADDRSTRLEN];
- char sifaddr_str[INET_ADDRSTRLEN];
- pim_inet4_dump("<ifaddr?>", group, gifaddr_str, sizeof(gifaddr_str));
- pim_inet4_dump("<ifaddr?>", source, sifaddr_str, sizeof(sifaddr_str));
- zlog_warn("%s %s: Unable to remove static route(iif=%d,oif=%d,group=%s,source=%s)",
+ pim_mroute_del(&s_route->c_oil, __PRETTY_FUNCTION__) : pim_mroute_add(&s_route->c_oil, __PRETTY_FUNCTION__)) {
+ char gifaddr_str[INET_ADDRSTRLEN];
+ char sifaddr_str[INET_ADDRSTRLEN];
+ pim_inet4_dump("<ifaddr?>", group, gifaddr_str, sizeof(gifaddr_str));
+ pim_inet4_dump("<ifaddr?>", source, sifaddr_str, sizeof(sifaddr_str));
+ zlog_warn("%s %s: Unable to remove static route(iif=%d,oif=%d,group=%s,source=%s)",
__FILE__, __PRETTY_FUNCTION__,
iif_index,
oif_index,
gifaddr_str,
sifaddr_str);
- s_route->oif_ttls[oif_index] = 1;
- s_route->c_oil.oil.mfcc_ttls[oif_index] = 1;
- ++s_route->c_oil.oil_ref_count;
+ s_route->oif_ttls[oif_index] = 1;
+ s_route->c_oil.oil.mfcc_ttls[oif_index] = 1;
+ ++s_route->c_oil.oil_ref_count;
- return -1;
+ return -1;
}
s_route->c_oil.oif_creation[oif_index] = 0;