p, &path->attr->nexthop);
}
if (p->family == AF_INET6) {
- char buf[2][INET6_ADDRSTRLEN];
ifindex_t ifindex;
struct in6_addr *nexthop;
nexthop = bgp_path_info_to_ipv6_nexthop(path, &ifindex);
zlog_debug(
- "Zebra rmap deny: IPv6 route %pFX nexthop %s",
- p,
- nexthop ? inet_ntop(AF_INET6, nexthop, buf[1],
- sizeof(buf[1]))
- : inet_ntop(AF_INET,
- &path->attr->nexthop,
- buf[1], sizeof(buf[1])));
+ "Zebra rmap deny: IPv6 route %pFX nexthop %pI6",
+ p, nexthop);
}
}
return false;
&& (errno == EADDRINUSE)) {
/* see above: handle possible problem when interface comes back
* up */
- char buf[1][INET_ADDRSTRLEN];
zlog_info(
- "setsockopt_ipv4_multicast attempting to drop and re-add (fd %d, mcast %s, ifindex %u)",
- sock, inet_ntop(AF_INET, &mreqn.imr_multiaddr, buf[0],
- sizeof(buf[0])),
- ifindex);
+ "setsockopt_ipv4_multicast attempting to drop and re-add (fd %d, mcast %pI4, ifindex %u)",
+ sock, &mreqn.imr_multiaddr, ifindex);
setsockopt(sock, IPPROTO_IP, IP_DROP_MEMBERSHIP, (void *)&mreqn,
sizeof(mreqn));
ret = setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP,
struct ospf_lsa *lsa;
struct router_lsa *rlsa;
struct in_addr *best = NULL;
- char buf[PREFIX_STRLEN];
LSDB_LOOP (ROUTER_LSDB(area), rn, lsa) {
/* sanity checks */
if (IS_DEBUG_OSPF_NSSA)
zlog_debug(
- "ospf_abr_nssa_am_elected: best electable ABR is: %s",
- (best) ? inet_ntop(AF_INET, best, buf, sizeof(buf)) :
- "<none>");
+ "ospf_abr_nssa_am_elected: best electable ABR is: %pI4",
+ best);
if (best == NULL)
return 1;
struct ospf_neighbor *onbr;
struct route_node *rn;
int retx_flag;
- char buf[PREFIX_STRLEN];
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
- "%s: considering int %s (%s), INBR(%s), LSA[%s] AGE %u",
+ "%s: considering int %s (%s), INBR(%pI4), LSA[%s] AGE %u",
__func__, IF_NAME(oi), ospf_get_name(oi->ospf),
- inbr ? inet_ntop(AF_INET, &inbr->router_id, buf,
- sizeof(buf))
- : "NULL",
- dump_lsa_key(lsa), ntohs(lsa->data->ls_age));
+ inbr ? &inbr->router_id : NULL, dump_lsa_key(lsa),
+ ntohs(lsa->data->ls_age));
if (!ospf_if_is_enable(oi))
return 0;
ifp = if_lookup_by_name(ifap->ifa_name, VRF_DEFAULT);
if (ifp == NULL) {
flog_err(EC_LIB_INTERFACE,
- "if_getaddrs(): Can't lookup interface %s\n",
+ "if_getaddrs(): Can't lookup interface %s",
ifap->ifa_name);
continue;
}