pimd: replace some zlog_warn with zlog_debug

A pim module had a number of warnings being used instead of
debugs - use debugs.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
Mark Stapp 2020-10-23 08:35:57 -04:00
parent e9f934853c
commit e7be2bd719

View File

@ -82,10 +82,10 @@ static bool mtrace_fwd_info_weak(struct pim_instance *pim,
zlog_debug("mtrace pim_nexthop_lookup OK");
if (PIM_DEBUG_MTRACE)
zlog_warn("mtrace next_hop=%s",
inet_ntop(nexthop.mrib_nexthop_addr.family,
&nexthop.mrib_nexthop_addr.u.prefix,
nexthop_str, sizeof(nexthop_str)));
zlog_debug("mtrace next_hop=%s",
inet_ntop(nexthop.mrib_nexthop_addr.family,
&nexthop.mrib_nexthop_addr.u.prefix,
nexthop_str, sizeof(nexthop_str)));
if (nexthop.mrib_nexthop_addr.family == AF_INET)
nh_addr = nexthop.mrib_nexthop_addr.u.prefix4;
@ -270,8 +270,8 @@ static uint32_t query_arrival_time(void)
if (gettimeofday(&tv, NULL) < 0) {
if (PIM_DEBUG_MTRACE)
zlog_warn("Query arrival time lookup failed: errno=%d: %s",
errno, safe_strerror(errno));
zlog_debug("Query arrival time lookup failed: errno=%d: %s",
errno, safe_strerror(errno));
return 0;
}
/* not sure second offset correct, as I get different value */
@ -336,7 +336,7 @@ static int mtrace_send_packet(struct interface *ifp,
if (ret < 0) {
if (PIM_DEBUG_MTRACE)
zlog_warn("Failed to set socket multicast TTL");
zlog_debug("Failed to set socket multicast TTL");
ret = -1;
goto close_fd;
}
@ -354,14 +354,14 @@ static int mtrace_send_packet(struct interface *ifp,
sizeof(group_str));
if (sent < 0) {
if (PIM_DEBUG_MTRACE)
zlog_warn(
zlog_debug(
"Send mtrace request failed for %s on%s: group=%s msg_size=%zd: errno=%d: %s",
dst_str, ifp->name, group_str,
mtrace_buf_len, errno,
safe_strerror(errno));
} else {
if (PIM_DEBUG_MTRACE)
zlog_warn(
zlog_debug(
"Send mtrace request failed for %s on %s: group=%s msg_size=%zd: sent=%zd",
dst_str, ifp->name, group_str,
mtrace_buf_len, sent);
@ -411,7 +411,7 @@ static int mtrace_un_forward_packet(struct pim_instance *pim, struct ip *ip_hdr,
if (!pim_nexthop_lookup(pim, &nexthop, ip_hdr->ip_dst, 0)) {
close(fd);
if (PIM_DEBUG_MTRACE)
zlog_warn(
zlog_debug(
"Dropping mtrace packet, no route to destination");
return -1;
}
@ -440,7 +440,7 @@ static int mtrace_un_forward_packet(struct pim_instance *pim, struct ip *ip_hdr,
if (sent < 0) {
if (PIM_DEBUG_MTRACE)
zlog_warn(
zlog_debug(
"Failed to forward mtrace packet: sendto errno=%d, %s",
errno, safe_strerror(errno));
return -1;
@ -572,10 +572,10 @@ static int mtrace_send_response(struct pim_instance *pim,
if (p_rpf == NULL) {
if (PIM_DEBUG_MTRACE)
zlog_warn("mtrace no RP for %s",
inet_ntop(AF_INET,
&(mtracep->rsp_addr),
grp_str, sizeof(grp_str)));
zlog_debug("mtrace no RP for %s",
inet_ntop(AF_INET,
&(mtracep->rsp_addr),
grp_str, sizeof(grp_str)));
return -1;
}
nexthop = p_rpf->source_nexthop;
@ -586,7 +586,7 @@ static int mtrace_send_response(struct pim_instance *pim,
/* TODO: should use unicast rib lookup */
if (!pim_nexthop_lookup(pim, &nexthop, mtracep->rsp_addr, 1)) {
if (PIM_DEBUG_MTRACE)
zlog_warn(
zlog_debug(
"Dropped response qid=%ud, no route to response address",
mtracep->qry_id);
return -1;
@ -635,7 +635,7 @@ int igmp_mtrace_recv_qry_req(struct igmp_sock *igmp, struct ip *ip_hdr,
if (igmp_msg_len < (int)sizeof(struct igmp_mtrace)) {
if (PIM_DEBUG_MTRACE)
zlog_warn(
zlog_debug(
"Recv mtrace packet from %s on %s: too short, len=%d, min=%zu",
from_str, ifp->name, igmp_msg_len,
sizeof(struct igmp_mtrace));
@ -652,7 +652,7 @@ int igmp_mtrace_recv_qry_req(struct igmp_sock *igmp, struct ip *ip_hdr,
if (recv_checksum != checksum) {
if (PIM_DEBUG_MTRACE)
zlog_warn(
zlog_debug(
"Recv mtrace packet from %s on %s: checksum mismatch: received=%x computed=%x",
from_str, ifp->name, recv_checksum, checksum);
return -1;
@ -702,12 +702,12 @@ int igmp_mtrace_recv_qry_req(struct igmp_sock *igmp, struct ip *ip_hdr,
last_rsp_ind = r_len / sizeof(struct igmp_mtrace_rsp);
if (last_rsp_ind > MTRACE_MAX_HOPS) {
if (PIM_DEBUG_MTRACE)
zlog_warn("Mtrace request of excessive size");
zlog_debug("Mtrace request of excessive size");
return -1;
}
} else {
if (PIM_DEBUG_MTRACE)
zlog_warn(
zlog_debug(
"Recv mtrace packet from %s on %s: invalid length %d",
from_str, ifp->name, igmp_msg_len);
return -1;
@ -717,7 +717,7 @@ int igmp_mtrace_recv_qry_req(struct igmp_sock *igmp, struct ip *ip_hdr,
if (IPV4_CLASS_DE(ntohl(ip_hdr->ip_dst.s_addr))
&& !IPV4_MC_LINKLOCAL(ntohl(ip_hdr->ip_dst.s_addr))) {
if (PIM_DEBUG_MTRACE)
zlog_warn(
zlog_debug(
"Recv mtrace packet from %s on %s: not link-local multicast %pI4",
from_str, ifp->name, &ip_hdr->ip_dst);
return -1;
@ -850,7 +850,7 @@ int igmp_mtrace_recv_response(struct igmp_sock *igmp, struct ip *ip_hdr,
if (igmp_msg_len < (int)sizeof(struct igmp_mtrace)) {
if (PIM_DEBUG_MTRACE)
zlog_warn(
zlog_debug(
"Recv mtrace packet from %s on %s: too short, len=%d, min=%zu",
from_str, ifp->name, igmp_msg_len,
sizeof(struct igmp_mtrace));
@ -867,7 +867,7 @@ int igmp_mtrace_recv_response(struct igmp_sock *igmp, struct ip *ip_hdr,
if (recv_checksum != checksum) {
if (PIM_DEBUG_MTRACE)
zlog_warn(
zlog_debug(
"Recv mtrace response from %s on %s: checksum mismatch: received=%x computed=%x",
from_str, ifp->name, recv_checksum, checksum);
return -1;