mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 11:01:48 +00:00
pimd: remove pim_str_sg_dump()
... and replace with `%pSG` printfrr specifier. This actually used a static buffer in the formatting function, so subsequent formatting would overwrite earlier uses. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
9bace5c2d3
commit
98a81d2bff
@ -8246,13 +8246,12 @@ DEFPY_HIDDEN (pim_test_sg_keepalive,
|
||||
|
||||
up = pim_upstream_find(pim, &sg);
|
||||
if (!up) {
|
||||
vty_out(vty, "%% Unable to find %s specified\n",
|
||||
pim_str_sg_dump(&sg));
|
||||
vty_out(vty, "%% Unable to find %pSG specified\n", &sg);
|
||||
return CMD_WARNING;
|
||||
}
|
||||
|
||||
vty_out(vty, "Setting %s to current keep alive time: %d\n",
|
||||
pim_str_sg_dump(&sg), pim->keep_alive_time);
|
||||
vty_out(vty, "Setting %pSG to current keep alive time: %d\n", &sg,
|
||||
pim->keep_alive_time);
|
||||
pim_upstream_keep_alive_timer_start(up, pim->keep_alive_time);
|
||||
|
||||
return CMD_SUCCESS;
|
||||
|
@ -455,8 +455,8 @@ struct pim_ifchannel *pim_ifchannel_find(struct interface *ifp, pim_sgaddr *sg)
|
||||
pim_ifp = ifp->info;
|
||||
|
||||
if (!pim_ifp) {
|
||||
zlog_warn("%s: (S,G)=%s: multicast not enabled on interface %s",
|
||||
__func__, pim_str_sg_dump(sg), ifp->name);
|
||||
zlog_warn("%s: (S,G)=%pSG: multicast not enabled on interface %s",
|
||||
__func__, sg, ifp->name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -558,8 +558,7 @@ struct pim_ifchannel *pim_ifchannel_add(struct interface *ifp, pim_sgaddr *sg,
|
||||
if (ch->upstream)
|
||||
ch->upstream->flags |= up_flags;
|
||||
else if (PIM_DEBUG_EVENTS)
|
||||
zlog_debug("%s:%s No Upstream found", __func__,
|
||||
pim_str_sg_dump(sg));
|
||||
zlog_debug("%s:%pSG No Upstream found", __func__, sg);
|
||||
|
||||
return ch;
|
||||
}
|
||||
@ -688,10 +687,9 @@ static int on_ifjoin_prune_pending_timer(struct thread *t)
|
||||
ch = THREAD_ARG(t);
|
||||
|
||||
if (PIM_DEBUG_PIM_TRACE)
|
||||
zlog_debug(
|
||||
"%s: IFCHANNEL%s %s Prune Pending Timer Popped",
|
||||
__func__, pim_str_sg_dump(&ch->sg),
|
||||
pim_ifchannel_ifjoin_name(ch->ifjoin_state, ch->flags));
|
||||
zlog_debug("%s: IFCHANNEL%pSG %s Prune Pending Timer Popped",
|
||||
__func__, &ch->sg,
|
||||
pim_ifchannel_ifjoin_name(ch->ifjoin_state, ch->flags));
|
||||
|
||||
if (ch->ifjoin_state == PIM_IFJOIN_PRUNE_PENDING) {
|
||||
ifp = ch->interface;
|
||||
@ -832,9 +830,9 @@ static int nonlocal_upstream(int is_join, struct interface *recv_ifp,
|
||||
if (PIM_DEBUG_PIM_TRACE_DETAIL) {
|
||||
char up_str[INET_ADDRSTRLEN];
|
||||
pim_inet4_dump("<upstream?>", upstream, up_str, sizeof(up_str));
|
||||
zlog_warn("%s: recv %s (S,G)=%s to non-local upstream=%s on %s",
|
||||
zlog_warn("%s: recv %s (S,G)=%pSG to non-local upstream=%s on %s",
|
||||
__func__, is_join ? "join" : "prune",
|
||||
pim_str_sg_dump(sg), up_str, recv_ifp->name);
|
||||
sg, up_str, recv_ifp->name);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1049,10 +1047,9 @@ 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_PIM_TRACE)
|
||||
zlog_debug(
|
||||
"%s: Received prune with no relevant ifchannel %s%s state: %d",
|
||||
__func__, ifp->name, pim_str_sg_dump(sg),
|
||||
source_flags);
|
||||
zlog_debug("%s: Received prune with no relevant ifchannel %s%pSG state: %d",
|
||||
__func__, ifp->name, sg,
|
||||
source_flags);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1182,16 +1179,15 @@ int pim_ifchannel_local_membership_add(struct interface *ifp, pim_sgaddr *sg,
|
||||
pim_ifp = ifp->info;
|
||||
if (!pim_ifp) {
|
||||
if (PIM_DEBUG_EVENTS)
|
||||
zlog_debug("%s:%s Expected pim interface setup for %s",
|
||||
__func__, pim_str_sg_dump(sg), ifp->name);
|
||||
zlog_debug("%s:%pSG Expected pim interface setup for %s",
|
||||
__func__, sg, ifp->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!PIM_IF_TEST_PIM(pim_ifp->options)) {
|
||||
if (PIM_DEBUG_EVENTS)
|
||||
zlog_debug(
|
||||
"%s:%s PIM is not configured on this interface %s",
|
||||
__func__, pim_str_sg_dump(sg), ifp->name);
|
||||
zlog_debug("%s:%pSG PIM is not configured on this interface %s",
|
||||
__func__, sg, ifp->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1201,9 +1197,8 @@ int pim_ifchannel_local_membership_add(struct interface *ifp, pim_sgaddr *sg,
|
||||
if (sg->src.s_addr == INADDR_ANY) {
|
||||
if (pim_is_grp_ssm(pim, sg->grp)) {
|
||||
if (PIM_DEBUG_PIM_EVENTS)
|
||||
zlog_debug(
|
||||
"%s: local membership (S,G)=%s ignored as group is SSM",
|
||||
__func__, pim_str_sg_dump(sg));
|
||||
zlog_debug("%s: local membership (S,G)=%pSG ignored as group is SSM",
|
||||
__func__, sg);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -65,12 +65,11 @@ static void recv_join(struct interface *ifp, struct pim_neighbor *neigh,
|
||||
pim_inet4_dump("<upstream?>", upstream, up_str, sizeof(up_str));
|
||||
pim_inet4_dump("<neigh?>", neigh->source_addr, neigh_str,
|
||||
sizeof(neigh_str));
|
||||
zlog_debug(
|
||||
"%s: join (S,G)=%s rpt=%d wc=%d upstream=%s holdtime=%d from %s on %s",
|
||||
__func__, pim_str_sg_dump(sg),
|
||||
!!(source_flags & PIM_RPT_BIT_MASK),
|
||||
!!(source_flags & PIM_WILDCARD_BIT_MASK), up_str,
|
||||
holdtime, neigh_str, ifp->name);
|
||||
zlog_debug("%s: join (S,G)=%pSG rpt=%d wc=%d upstream=%s holdtime=%d from %s on %s",
|
||||
__func__, sg,
|
||||
!!(source_flags & PIM_RPT_BIT_MASK),
|
||||
!!(source_flags & PIM_WILDCARD_BIT_MASK), up_str,
|
||||
holdtime, neigh_str, ifp->name);
|
||||
}
|
||||
|
||||
pim_ifp = ifp->info;
|
||||
@ -135,12 +134,12 @@ static void recv_prune(struct interface *ifp, struct pim_neighbor *neigh,
|
||||
pim_inet4_dump("<upstream?>", upstream, up_str, sizeof(up_str));
|
||||
pim_inet4_dump("<neigh?>", neigh->source_addr, neigh_str,
|
||||
sizeof(neigh_str));
|
||||
zlog_debug(
|
||||
"%s: prune (S,G)=%s rpt=%d wc=%d upstream=%s holdtime=%d from %s on %s",
|
||||
__func__, pim_str_sg_dump(sg),
|
||||
source_flags & PIM_RPT_BIT_MASK,
|
||||
source_flags & PIM_WILDCARD_BIT_MASK, up_str, holdtime,
|
||||
neigh_str, ifp->name);
|
||||
zlog_debug("%s: prune (S,G)=%pSG rpt=%d wc=%d upstream=%s holdtime=%d from %s on %s",
|
||||
__func__, sg,
|
||||
source_flags & PIM_RPT_BIT_MASK,
|
||||
source_flags & PIM_WILDCARD_BIT_MASK, up_str,
|
||||
holdtime,
|
||||
neigh_str, ifp->name);
|
||||
}
|
||||
|
||||
pim_ifp = ifp->info;
|
||||
|
@ -189,9 +189,8 @@ static int pim_mroute_msg_nocache(int fd, struct interface *ifp,
|
||||
|
||||
if (!(PIM_I_am_DR(pim_ifp))) {
|
||||
if (PIM_DEBUG_MROUTE_DETAIL)
|
||||
zlog_debug(
|
||||
"%s: Interface is not the DR blackholing incoming traffic for %s",
|
||||
__func__, pim_str_sg_dump(&sg));
|
||||
zlog_debug("%s: Interface is not the DR blackholing incoming traffic for %pSG",
|
||||
__func__, &sg);
|
||||
|
||||
/*
|
||||
* We are not the DR, but we are still receiving packets
|
||||
@ -268,9 +267,8 @@ static int pim_mroute_msg_wholepkt(int fd, struct interface *ifp,
|
||||
__func__, NULL);
|
||||
if (!up) {
|
||||
if (PIM_DEBUG_MROUTE)
|
||||
zlog_debug(
|
||||
"%s: Unable to create upstream information for %s",
|
||||
__func__, pim_str_sg_dump(&sg));
|
||||
zlog_debug("%s: Unable to create upstream information for %pSG",
|
||||
__func__, &sg);
|
||||
return 0;
|
||||
}
|
||||
pim_upstream_keep_alive_timer_start(
|
||||
@ -284,9 +282,8 @@ static int pim_mroute_msg_wholepkt(int fd, struct interface *ifp,
|
||||
return 0;
|
||||
}
|
||||
if (PIM_DEBUG_MROUTE_DETAIL) {
|
||||
zlog_debug(
|
||||
"%s: Unable to find upstream channel WHOLEPKT%s",
|
||||
__func__, pim_str_sg_dump(&sg));
|
||||
zlog_debug("%s: Unable to find upstream channel WHOLEPKT%pSG",
|
||||
__func__, &sg);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -316,9 +313,8 @@ static int pim_mroute_msg_wholepkt(int fd, struct interface *ifp,
|
||||
if (!up->t_rs_timer) {
|
||||
if (pim_is_grp_ssm(pim_ifp->pim, sg.grp)) {
|
||||
if (PIM_DEBUG_PIM_REG)
|
||||
zlog_debug(
|
||||
"%s register forward skipped as group is SSM",
|
||||
pim_str_sg_dump(&sg));
|
||||
zlog_debug("%pSG register forward skipped as group is SSM",
|
||||
&sg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -361,18 +357,16 @@ static int pim_mroute_msg_wrongvif(int fd, struct interface *ifp,
|
||||
|
||||
if (!ifp) {
|
||||
if (PIM_DEBUG_MROUTE)
|
||||
zlog_debug(
|
||||
"%s: WRONGVIF (S,G)=%s could not find input interface for input_vif_index=%d",
|
||||
__func__, pim_str_sg_dump(&sg), msg->im_vif);
|
||||
zlog_debug("%s: WRONGVIF (S,G)=%pSG could not find input interface for input_vif_index=%d",
|
||||
__func__, &sg, msg->im_vif);
|
||||
return -1;
|
||||
}
|
||||
|
||||
pim_ifp = ifp->info;
|
||||
if (!pim_ifp) {
|
||||
if (PIM_DEBUG_MROUTE)
|
||||
zlog_debug(
|
||||
"%s: WRONGVIF (S,G)=%s multicast not enabled on interface %s",
|
||||
__func__, pim_str_sg_dump(&sg), ifp->name);
|
||||
zlog_debug("%s: WRONGVIF (S,G)=%pSG multicast not enabled on interface %s",
|
||||
__func__, &sg, ifp->name);
|
||||
return -2;
|
||||
}
|
||||
|
||||
@ -380,18 +374,16 @@ static int pim_mroute_msg_wrongvif(int fd, struct interface *ifp,
|
||||
if (!ch) {
|
||||
pim_sgaddr star_g = sg;
|
||||
if (PIM_DEBUG_MROUTE)
|
||||
zlog_debug(
|
||||
"%s: WRONGVIF (S,G)=%s could not find channel on interface %s",
|
||||
__func__, pim_str_sg_dump(&sg), ifp->name);
|
||||
zlog_debug("%s: WRONGVIF (S,G)=%pSG could not find channel on interface %s",
|
||||
__func__, &sg, ifp->name);
|
||||
|
||||
star_g.src.s_addr = INADDR_ANY;
|
||||
ch = pim_ifchannel_find(ifp, &star_g);
|
||||
if (!ch) {
|
||||
if (PIM_DEBUG_MROUTE)
|
||||
zlog_debug(
|
||||
"%s: WRONGVIF (*,G)=%s could not find channel on interface %s",
|
||||
__func__, pim_str_sg_dump(&star_g),
|
||||
ifp->name);
|
||||
zlog_debug("%s: WRONGVIF (*,G)=%pSG could not find channel on interface %s",
|
||||
__func__, &star_g,
|
||||
ifp->name);
|
||||
return -3;
|
||||
}
|
||||
}
|
||||
@ -558,9 +550,8 @@ static int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp,
|
||||
NULL);
|
||||
if (!up) {
|
||||
if (PIM_DEBUG_MROUTE)
|
||||
zlog_debug(
|
||||
"%s: WRONGVIF%s unable to create upstream on interface",
|
||||
pim_str_sg_dump(&sg), ifp->name);
|
||||
zlog_debug("%pSG: WRONGVIF%s unable to create upstream on interface",
|
||||
&sg, ifp->name);
|
||||
return -2;
|
||||
}
|
||||
PIM_UPSTREAM_FLAG_SET_SRC_STREAM(up->flags);
|
||||
@ -1218,9 +1209,8 @@ void pim_mroute_update_counters(struct channel_oil *c_oil)
|
||||
|
||||
sg.src = c_oil->oil.mfcc_origin;
|
||||
sg.grp = c_oil->oil.mfcc_mcastgrp;
|
||||
zlog_debug(
|
||||
"Channel%s is not installed no need to collect data from kernel",
|
||||
pim_str_sg_dump(&sg));
|
||||
zlog_debug("Channel%pSG is not installed no need to collect data from kernel",
|
||||
&sg);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -1236,8 +1226,8 @@ void pim_mroute_update_counters(struct channel_oil *c_oil)
|
||||
sg.src = c_oil->oil.mfcc_origin;
|
||||
sg.grp = c_oil->oil.mfcc_mcastgrp;
|
||||
|
||||
zlog_warn("ioctl(SIOCGETSGCNT=%lu) failure for (S,G)=%s: errno=%d: %s",
|
||||
(unsigned long)SIOCGETSGCNT, pim_str_sg_dump(&sg),
|
||||
zlog_warn("ioctl(SIOCGETSGCNT=%lu) failure for (S,G)=%pSG: errno=%d: %s",
|
||||
(unsigned long)SIOCGETSGCNT, &sg,
|
||||
errno, safe_strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
@ -646,7 +646,7 @@ static void pim_msdp_up_xg_del(struct pim_instance *pim, pim_sgaddr *sg)
|
||||
struct pim_msdp_sa *sa;
|
||||
|
||||
if (PIM_DEBUG_MSDP_INTERNAL) {
|
||||
zlog_debug("MSDP %s del", pim_str_sg_dump(sg));
|
||||
zlog_debug("MSDP %pSG del", sg);
|
||||
}
|
||||
|
||||
/* If this is not really an XG entry just move on */
|
||||
@ -667,7 +667,7 @@ static void pim_msdp_up_xg_del(struct pim_instance *pim, pim_sgaddr *sg)
|
||||
void pim_msdp_up_del(struct pim_instance *pim, pim_sgaddr *sg)
|
||||
{
|
||||
if (PIM_DEBUG_MSDP_INTERNAL) {
|
||||
zlog_debug("MSDP up %s del", pim_str_sg_dump(sg));
|
||||
zlog_debug("MSDP up %pSG del", sg);
|
||||
}
|
||||
if (sg->src.s_addr == INADDR_ANY) {
|
||||
pim_msdp_up_xg_del(pim, sg);
|
||||
|
@ -77,7 +77,7 @@ static void pim_msdp_pkt_sa_dump_one(struct stream *s)
|
||||
sg.grp.s_addr = stream_get_ipv4(s);
|
||||
sg.src.s_addr = stream_get_ipv4(s);
|
||||
|
||||
zlog_debug(" sg %s", pim_str_sg_dump(&sg));
|
||||
zlog_debug(" sg %pSG", &sg);
|
||||
}
|
||||
|
||||
static void pim_msdp_pkt_sa_dump(struct stream *s)
|
||||
@ -513,7 +513,7 @@ static void pim_msdp_pkt_sa_rx_one(struct pim_msdp_peer *mp, struct in_addr rp)
|
||||
return;
|
||||
}
|
||||
if (PIM_DEBUG_MSDP_PACKETS) {
|
||||
zlog_debug(" sg %s", pim_str_sg_dump(&sg));
|
||||
zlog_debug(" sg %pSG", &sg);
|
||||
}
|
||||
pim_msdp_sa_ref(mp->pim, mp, &sg, rp);
|
||||
|
||||
|
@ -45,8 +45,8 @@ char *pim_channel_oil_dump(struct channel_oil *c_oil, char *buf, size_t size)
|
||||
sg.src = c_oil->oil.mfcc_origin;
|
||||
sg.grp = c_oil->oil.mfcc_mcastgrp;
|
||||
ifp = pim_if_find_by_vif_index(c_oil->pim, c_oil->oil.mfcc_parent);
|
||||
snprintf(buf, size, "%s IIF: %s, OIFS: ", pim_str_sg_dump(&sg),
|
||||
ifp ? ifp->name : "(?)");
|
||||
snprintfrr(buf, size, "%pSG IIF: %s, OIFS: ", &sg,
|
||||
ifp ? ifp->name : "(?)");
|
||||
|
||||
out = buf + strlen(buf);
|
||||
for (i = 0; i < MAXVIFS; i++) {
|
||||
@ -163,8 +163,7 @@ struct channel_oil *pim_channel_oil_add(struct pim_instance *pim,
|
||||
rb_pim_oil_add(&pim->channel_oil_head, c_oil);
|
||||
|
||||
if (PIM_DEBUG_MROUTE)
|
||||
zlog_debug("%s(%s): c_oil %s add",
|
||||
__func__, name, pim_str_sg_dump(sg));
|
||||
zlog_debug("%s(%s): c_oil %pSG add", __func__, name, sg);
|
||||
|
||||
return c_oil;
|
||||
}
|
||||
|
@ -75,9 +75,8 @@ void pim_register_stop_send(struct interface *ifp, pim_sgaddr *sg,
|
||||
struct prefix p;
|
||||
|
||||
if (PIM_DEBUG_PIM_REG) {
|
||||
zlog_debug("Sending Register stop for %s to %pI4 on %s",
|
||||
pim_str_sg_dump(sg), &originator,
|
||||
ifp->name);
|
||||
zlog_debug("Sending Register stop for %pSG to %pI4 on %s", sg,
|
||||
&originator, ifp->name);
|
||||
}
|
||||
|
||||
memset(buffer, 0, 10000);
|
||||
@ -377,8 +376,8 @@ int pim_register_recv(struct interface *ifp, struct in_addr dest_addr,
|
||||
char src_str[INET_ADDRSTRLEN];
|
||||
|
||||
pim_inet4_dump("<src?>", src_addr, src_str, sizeof(src_str));
|
||||
zlog_debug("Received Register message%s from %s on %s, rp: %d",
|
||||
pim_str_sg_dump(&sg), src_str, ifp->name, i_am_rp);
|
||||
zlog_debug("Received Register message%pSG from %s on %s, rp: %d",
|
||||
&sg, src_str, ifp->name, i_am_rp);
|
||||
}
|
||||
|
||||
if (pim_is_grp_ssm(pim_ifp->pim, sg.grp)) {
|
||||
@ -515,13 +514,11 @@ int pim_register_recv(struct interface *ifp, struct in_addr dest_addr,
|
||||
} else {
|
||||
if (PIM_DEBUG_PIM_REG) {
|
||||
if (!i_am_rp)
|
||||
zlog_debug(
|
||||
"Received Register packet for %s, Rejecting packet because I am not the RP configured for group",
|
||||
pim_str_sg_dump(&sg));
|
||||
zlog_debug("Received Register packet for %pSG, Rejecting packet because I am not the RP configured for group",
|
||||
&sg);
|
||||
else
|
||||
zlog_debug(
|
||||
"Received Register packet for %s, Rejecting packet because the dst ip address is not the actual RP",
|
||||
pim_str_sg_dump(&sg));
|
||||
zlog_debug("Received Register packet for %pSG, Rejecting packet because the dst ip address is not the actual RP",
|
||||
&sg);
|
||||
}
|
||||
pim_register_stop_send(ifp, &sg, dest_addr, src_addr);
|
||||
}
|
||||
|
@ -41,13 +41,3 @@ void pim_addr_dump(const char *onfail, struct prefix *p, char *buf,
|
||||
|
||||
errno = save_errno;
|
||||
}
|
||||
|
||||
char *pim_str_sg_dump(const pim_sgaddr *sg)
|
||||
{
|
||||
static char sg_str[PIM_SG_LEN];
|
||||
|
||||
snprintfrr(sg_str, sizeof(sg_str), "%pSG", sg);
|
||||
|
||||
return sg_str;
|
||||
}
|
||||
|
||||
|
@ -58,6 +58,5 @@ void pim_addr_dump(const char *onfail, struct prefix *p, char *buf,
|
||||
int buf_size);
|
||||
void pim_inet4_dump(const char *onfail, struct in_addr addr, char *buf,
|
||||
int buf_size);
|
||||
char *pim_str_sg_dump(const pim_sgaddr *sg);
|
||||
|
||||
#endif
|
||||
|
@ -1092,8 +1092,8 @@ struct pim_upstream *pim_upstream_add(struct pim_instance *pim, pim_sgaddr *sg,
|
||||
up->rpf.source_nexthop.interface->name : "Unknown" ,
|
||||
found, up->ref_count);
|
||||
else
|
||||
zlog_debug("%s(%s): (%s) failure to create", __func__,
|
||||
name, pim_str_sg_dump(sg));
|
||||
zlog_debug("%s(%s): (%pSG) failure to create", __func__,
|
||||
name, sg);
|
||||
}
|
||||
|
||||
return up;
|
||||
|
@ -515,9 +515,8 @@ static void igmp_source_forward_reevaluate_one(struct pim_instance *pim,
|
||||
if (ch
|
||||
&& (ch->local_ifmembership == PIM_IFMEMBERSHIP_INCLUDE)) {
|
||||
if (PIM_DEBUG_PIM_EVENTS)
|
||||
zlog_debug(
|
||||
"local membership del for %s as G is now SSM",
|
||||
pim_str_sg_dump(&sg));
|
||||
zlog_debug("local membership del for %pSG as G is now SSM",
|
||||
&sg);
|
||||
pim_ifchannel_local_membership_del(group->interface,
|
||||
&sg);
|
||||
}
|
||||
@ -526,9 +525,8 @@ static void igmp_source_forward_reevaluate_one(struct pim_instance *pim,
|
||||
if (!ch
|
||||
|| (ch->local_ifmembership == PIM_IFMEMBERSHIP_NOINFO)) {
|
||||
if (PIM_DEBUG_PIM_EVENTS)
|
||||
zlog_debug(
|
||||
"local membership add for %s as G is now ASM",
|
||||
pim_str_sg_dump(&sg));
|
||||
zlog_debug("local membership add for %pSG as G is now ASM",
|
||||
&sg);
|
||||
pim_ifchannel_local_membership_add(
|
||||
group->interface, &sg, false /*is_vxlan*/);
|
||||
}
|
||||
@ -585,8 +583,7 @@ void igmp_source_forward_start(struct pim_instance *pim,
|
||||
sg.grp = source->source_group->group_addr;
|
||||
|
||||
if (PIM_DEBUG_IGMP_TRACE) {
|
||||
zlog_debug("%s: (S,G)=%s oif=%s fwd=%d", __func__,
|
||||
pim_str_sg_dump(&sg),
|
||||
zlog_debug("%s: (S,G)=%pSG oif=%s fwd=%d", __func__, &sg,
|
||||
source->source_group->interface->name,
|
||||
IGMP_SOURCE_TEST_FORWARDING(source->source_flags));
|
||||
}
|
||||
@ -650,10 +647,9 @@ void igmp_source_forward_start(struct pim_instance *pim,
|
||||
|
||||
pim_inet4_dump("<source?>", vif_source, buf2,
|
||||
sizeof(buf2));
|
||||
zlog_debug(
|
||||
"%s: NHT %s vif_source %s vif_index:%d ",
|
||||
__func__, pim_str_sg_dump(&sg), buf2,
|
||||
input_iface_vif_index);
|
||||
zlog_debug("%s: NHT %pSG vif_source %s vif_index:%d ",
|
||||
__func__, &sg, buf2,
|
||||
input_iface_vif_index);
|
||||
}
|
||||
|
||||
if (input_iface_vif_index < 1) {
|
||||
@ -684,13 +680,12 @@ void igmp_source_forward_start(struct pim_instance *pim,
|
||||
/* ignore request for looped MFC entry
|
||||
*/
|
||||
if (PIM_DEBUG_IGMP_TRACE) {
|
||||
zlog_debug(
|
||||
"%s: ignoring request for looped MFC entry (S,G)=%s: oif=%s vif_index=%d",
|
||||
__func__,
|
||||
pim_str_sg_dump(&sg),
|
||||
source->source_group
|
||||
->interface->name,
|
||||
input_iface_vif_index);
|
||||
zlog_debug("%s: ignoring request for looped MFC entry (S,G)=%pSG: oif=%s vif_index=%d",
|
||||
__func__,
|
||||
&sg,
|
||||
source->source_group
|
||||
->interface->name,
|
||||
input_iface_vif_index);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -699,10 +694,9 @@ void igmp_source_forward_start(struct pim_instance *pim,
|
||||
pim_channel_oil_add(pim, &sg, __func__);
|
||||
if (!source->source_channel_oil) {
|
||||
if (PIM_DEBUG_IGMP_TRACE) {
|
||||
zlog_debug(
|
||||
"%s %s: could not create OIL for channel (S,G)=%s",
|
||||
__FILE__, __func__,
|
||||
pim_str_sg_dump(&sg));
|
||||
zlog_debug("%s %s: could not create OIL for channel (S,G)=%pSG",
|
||||
__FILE__, __func__,
|
||||
&sg);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -723,10 +717,9 @@ void igmp_source_forward_start(struct pim_instance *pim,
|
||||
}
|
||||
} else {
|
||||
if (PIM_DEBUG_IGMP_TRACE)
|
||||
zlog_debug(
|
||||
"%s: %s was received on %s interface but we are not DR for that interface",
|
||||
__func__, pim_str_sg_dump(&sg),
|
||||
group->interface->name);
|
||||
zlog_debug("%s: %pSG was received on %s interface but we are not DR for that interface",
|
||||
__func__, &sg,
|
||||
group->interface->name);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -737,8 +730,8 @@ void igmp_source_forward_start(struct pim_instance *pim,
|
||||
if (!pim_ifchannel_local_membership_add(group->interface, &sg,
|
||||
false /*is_vxlan*/)) {
|
||||
if (PIM_DEBUG_MROUTE)
|
||||
zlog_warn("%s: Failure to add local membership for %s",
|
||||
__func__, pim_str_sg_dump(&sg));
|
||||
zlog_warn("%s: Failure to add local membership for %pSG",
|
||||
__func__, &sg);
|
||||
|
||||
pim_channel_del_oif(source->source_channel_oil,
|
||||
group->interface, PIM_OIF_FLAG_PROTO_IGMP,
|
||||
@ -764,8 +757,7 @@ void igmp_source_forward_stop(struct gm_source *source)
|
||||
sg.grp = source->source_group->group_addr;
|
||||
|
||||
if (PIM_DEBUG_IGMP_TRACE) {
|
||||
zlog_debug("%s: (S,G)=%s oif=%s fwd=%d", __func__,
|
||||
pim_str_sg_dump(&sg),
|
||||
zlog_debug("%s: (S,G)=%pSG oif=%s fwd=%d", __func__, &sg,
|
||||
source->source_group->interface->name,
|
||||
IGMP_SOURCE_TEST_FORWARDING(source->source_flags));
|
||||
}
|
||||
|
@ -535,10 +535,9 @@ int pim_zlookup_sg_statistics(struct channel_oil *c_oil)
|
||||
|
||||
more.src = c_oil->oil.mfcc_origin;
|
||||
more.grp = c_oil->oil.mfcc_mcastgrp;
|
||||
zlog_debug(
|
||||
"Sending Request for New Channel Oil Information%s VIIF %d(%s)",
|
||||
pim_str_sg_dump(&more), c_oil->oil.mfcc_parent,
|
||||
c_oil->pim->vrf->name);
|
||||
zlog_debug("Sending Request for New Channel Oil Information%pSG VIIF %d(%s)",
|
||||
&more, c_oil->oil.mfcc_parent,
|
||||
c_oil->pim->vrf->name);
|
||||
}
|
||||
|
||||
if (!ifp)
|
||||
@ -593,9 +592,8 @@ int pim_zlookup_sg_statistics(struct channel_oil *c_oil)
|
||||
more.grp = c_oil->oil.mfcc_mcastgrp;
|
||||
flog_err(
|
||||
EC_LIB_ZAPI_MISSMATCH,
|
||||
"%s: Received wrong %s(%s) information requested",
|
||||
__func__, pim_str_sg_dump(&more),
|
||||
c_oil->pim->vrf->name);
|
||||
"%s: Received wrong %pSG(%s) information requested",
|
||||
__func__, &more, c_oil->pim->vrf->name);
|
||||
}
|
||||
zclient_lookup_failed(zlookup);
|
||||
return -3;
|
||||
|
Loading…
Reference in New Issue
Block a user