mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-03 21:25:05 +00:00
zebra: cleanup inet_ntoa usage in zebra_evpn_mh.c logs
Replaced inet_ntoa with %pI4 in the zebra debugs logs. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
This commit is contained in:
parent
732a1ac926
commit
2747f6f786
@ -1931,9 +1931,10 @@ static int zebra_evpn_remote_es_add(esi_t *esi, struct in_addr vtep_ip,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (df_alg != EVPN_MH_DF_ALG_PREF)
|
if (df_alg != EVPN_MH_DF_ALG_PREF)
|
||||||
zlog_warn("remote es %s vtep %s add %s with unsupported df_alg %d",
|
zlog_warn(
|
||||||
esi_to_str(esi, buf, sizeof(buf)),
|
"remote es %s vtep %pI4 add %s with unsupported df_alg %d",
|
||||||
inet_ntoa(vtep_ip), esr_rxed ? "esr" : "", df_alg);
|
esi_to_str(esi, buf, sizeof(buf)), &vtep_ip,
|
||||||
|
esr_rxed ? "esr" : "", df_alg);
|
||||||
|
|
||||||
zebra_evpn_es_vtep_add(es, vtep_ip, esr_rxed, df_alg, df_pref);
|
zebra_evpn_es_vtep_add(es, vtep_ip, esr_rxed, df_alg, df_pref);
|
||||||
zebra_evpn_es_remote_info_re_eval(&es);
|
zebra_evpn_es_remote_info_re_eval(&es);
|
||||||
@ -2180,20 +2181,22 @@ static char *zebra_evpn_es_vtep_str(char *vtep_str, struct zebra_evpn_es *es,
|
|||||||
{
|
{
|
||||||
struct zebra_evpn_es_vtep *zvtep;
|
struct zebra_evpn_es_vtep *zvtep;
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
char buf[PREFIX_STRLEN];
|
|
||||||
bool first = true;
|
bool first = true;
|
||||||
|
char ip_buf[INET6_ADDRSTRLEN];
|
||||||
|
|
||||||
vtep_str[0] = '\0';
|
vtep_str[0] = '\0';
|
||||||
for (ALL_LIST_ELEMENTS_RO(es->es_vtep_list, node, zvtep)) {
|
for (ALL_LIST_ELEMENTS_RO(es->es_vtep_list, node, zvtep)) {
|
||||||
if (first) {
|
if (first) {
|
||||||
first = false;
|
first = false;
|
||||||
strlcat(vtep_str, inet_ntop(AF_INET, &zvtep->vtep_ip,
|
strlcat(vtep_str,
|
||||||
buf, sizeof(buf)),
|
inet_ntop(AF_INET, &zvtep->vtep_ip, ip_buf,
|
||||||
|
sizeof(ip_buf)),
|
||||||
vtep_str_size);
|
vtep_str_size);
|
||||||
} else {
|
} else {
|
||||||
strlcat(vtep_str, ",", vtep_str_size);
|
strlcat(vtep_str, ",", vtep_str_size);
|
||||||
strlcat(vtep_str, inet_ntop(AF_INET, &zvtep->vtep_ip,
|
strlcat(vtep_str,
|
||||||
buf, sizeof(buf)),
|
inet_ntop(AF_INET, &zvtep->vtep_ip, ip_buf,
|
||||||
|
sizeof(ip_buf)),
|
||||||
vtep_str_size);
|
vtep_str_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2207,11 +2210,13 @@ static void zebra_evpn_es_json_vtep_fill(struct zebra_evpn_es *es,
|
|||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
json_object *json_vtep_entry;
|
json_object *json_vtep_entry;
|
||||||
char alg_buf[EVPN_DF_ALG_STR_LEN];
|
char alg_buf[EVPN_DF_ALG_STR_LEN];
|
||||||
|
char ip_buf[INET6_ADDRSTRLEN];
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS_RO(es->es_vtep_list, node, es_vtep)) {
|
for (ALL_LIST_ELEMENTS_RO(es->es_vtep_list, node, es_vtep)) {
|
||||||
json_vtep_entry = json_object_new_object();
|
json_vtep_entry = json_object_new_object();
|
||||||
json_object_string_add(json_vtep_entry, "vtep",
|
json_object_string_add(json_vtep_entry, "vtep",
|
||||||
inet_ntoa(es_vtep->vtep_ip));
|
inet_ntop(AF_INET, &es_vtep->vtep_ip,
|
||||||
|
ip_buf, sizeof(ip_buf)));
|
||||||
if (es_vtep->flags & ZEBRA_EVPNES_VTEP_RXED_ESR) {
|
if (es_vtep->flags & ZEBRA_EVPNES_VTEP_RXED_ESR) {
|
||||||
json_object_string_add(
|
json_object_string_add(
|
||||||
json_vtep_entry, "dfAlgorithm",
|
json_vtep_entry, "dfAlgorithm",
|
||||||
|
Loading…
Reference in New Issue
Block a user