Merge pull request #8254 from donaldsharp/various_fixes

This commit is contained in:
David Lamparter 2021-03-16 07:41:35 +01:00 committed by GitHub
commit c634f5da24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 13 deletions

View File

@ -995,7 +995,7 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new,
if (newm < existm) { if (newm < existm) {
if (debug) if (debug)
zlog_debug( zlog_debug(
"%s: %s wins over %s due to IGP metric %d < %d", "%s: %s wins over %s due to IGP metric %u < %u",
pfx_buf, new_buf, exist_buf, newm, existm); pfx_buf, new_buf, exist_buf, newm, existm);
ret = 1; ret = 1;
} }
@ -1003,7 +1003,7 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new,
if (newm > existm) { if (newm > existm) {
if (debug) if (debug)
zlog_debug( zlog_debug(
"%s: %s loses to %s due to IGP metric %d > %d", "%s: %s loses to %s due to IGP metric %u > %u",
pfx_buf, new_buf, exist_buf, newm, existm); pfx_buf, new_buf, exist_buf, newm, existm);
ret = 0; ret = 0;
} }
@ -1025,7 +1025,7 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new,
if (newm < existm) { if (newm < existm) {
if (debug) if (debug)
zlog_debug( zlog_debug(
"%s: %s wins over %s due to CLUSTER_LIST length %d < %d", "%s: %s wins over %s due to CLUSTER_LIST length %u < %u",
pfx_buf, new_buf, exist_buf, pfx_buf, new_buf, exist_buf,
newm, existm); newm, existm);
ret = 1; ret = 1;
@ -1034,7 +1034,7 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new,
if (newm > existm) { if (newm > existm) {
if (debug) if (debug)
zlog_debug( zlog_debug(
"%s: %s loses to %s due to CLUSTER_LIST length %d > %d", "%s: %s loses to %s due to CLUSTER_LIST length %u > %u",
pfx_buf, new_buf, exist_buf, pfx_buf, new_buf, exist_buf,
newm, existm); newm, existm);
ret = 0; ret = 0;

View File

@ -192,11 +192,14 @@ static void mtrace_rsp_init(struct igmp_mtrace_rsp *mtrace_rspp)
static void mtrace_rsp_debug(uint32_t qry_id, int rsp, static void mtrace_rsp_debug(uint32_t qry_id, int rsp,
struct igmp_mtrace_rsp *mrspp) struct igmp_mtrace_rsp *mrspp)
{ {
struct in_addr incoming = mrspp->incoming;
struct in_addr outgoing = mrspp->outgoing;
struct in_addr prev_hop = mrspp->prev_hop;
zlog_debug( zlog_debug(
"Rx mt(%d) qid=%ud arr=%x in=%pI4 out=%pI4 prev=%pI4 proto=%d fwd=%d", "Rx mt(%d) qid=%ud arr=%x in=%pI4 out=%pI4 prev=%pI4 proto=%d fwd=%d",
rsp, ntohl(qry_id), mrspp->arrival, &mrspp->incoming, rsp, ntohl(qry_id), mrspp->arrival, &incoming, &outgoing,
&mrspp->outgoing, &mrspp->prev_hop, mrspp->rtg_proto, &prev_hop, mrspp->rtg_proto, mrspp->fwd_code);
mrspp->fwd_code);
} }
static void mtrace_debug(struct pim_interface *pim_ifp, static void mtrace_debug(struct pim_interface *pim_ifp,
@ -269,10 +272,11 @@ static int mtrace_send_packet(struct interface *ifp,
if (PIM_DEBUG_MTRACE) { if (PIM_DEBUG_MTRACE) {
struct in_addr if_addr; struct in_addr if_addr;
struct in_addr rsp_addr = mtracep->rsp_addr;
if_addr = mtrace_primary_address(ifp); if_addr = mtrace_primary_address(ifp);
zlog_debug("Sending mtrace packet to %pI4 on %pI4", zlog_debug("Sending mtrace packet to %pI4 on %pI4", &rsp_addr,
&mtracep->rsp_addr, &if_addr); &if_addr);
} }
fd = pim_socket_raw(IPPROTO_IGMP); fd = pim_socket_raw(IPPROTO_IGMP);
@ -487,9 +491,11 @@ static int mtrace_send_mc_response(struct pim_instance *pim,
if (c_oil == NULL) { if (c_oil == NULL) {
if (PIM_DEBUG_MTRACE) { if (PIM_DEBUG_MTRACE) {
struct in_addr rsp_addr = mtracep->rsp_addr;
zlog_debug( zlog_debug(
"Dropping mtrace multicast response packet len=%u to %pI4", "Dropping mtrace multicast response packet len=%u to %pI4",
(unsigned int)mtrace_len, &mtracep->rsp_addr); (unsigned int)mtrace_len, &rsp_addr);
} }
return -1; return -1;
} }
@ -532,9 +538,11 @@ static int mtrace_send_response(struct pim_instance *pim,
p_rpf = pim_rp_g(pim, mtracep->rsp_addr); p_rpf = pim_rp_g(pim, mtracep->rsp_addr);
if (p_rpf == NULL) { if (p_rpf == NULL) {
if (PIM_DEBUG_MTRACE) if (PIM_DEBUG_MTRACE) {
zlog_debug("mtrace no RP for %pI4", struct in_addr rsp_addr = mtracep->rsp_addr;
&mtracep->rsp_addr);
zlog_debug("mtrace no RP for %pI4", &rsp_addr);
}
return -1; return -1;
} }
nexthop = p_rpf->source_nexthop; nexthop = p_rpf->source_nexthop;