diff options
Diffstat (limited to 'zebra/zebra_evpn_neigh.c')
| -rw-r--r-- | zebra/zebra_evpn_neigh.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/zebra/zebra_evpn_neigh.c b/zebra/zebra_evpn_neigh.c index af46ea6d7a..5fb4e07665 100644 --- a/zebra/zebra_evpn_neigh.c +++ b/zebra/zebra_evpn_neigh.c @@ -923,7 +923,7 @@ void zebra_evpn_process_neigh_on_local_mac_change(struct zebra_evpn *zevpn, struct listnode *node = NULL; struct zebra_vrf *zvrf = NULL; - zvrf = vrf_info_lookup(zevpn->vxlan_if->vrf_id); + zvrf = zevpn->vxlan_if->vrf->info; if (IS_ZEBRA_DEBUG_VXLAN) zlog_debug("Processing neighbors on local MAC %pEA %s, VNI %u", @@ -1308,11 +1308,11 @@ int zebra_evpn_local_neigh_update(struct zebra_evpn *zevpn, } } - zvrf = vrf_info_lookup(zevpn->vxlan_if->vrf_id); + zvrf = zevpn->vxlan_if->vrf->info; if (!zvrf) { if (IS_ZEBRA_DEBUG_VXLAN) zlog_debug(" Unable to find vrf for: %d", - zevpn->vxlan_if->vrf_id); + zevpn->vxlan_if->vrf->vrf_id); return -1; } @@ -1725,7 +1725,6 @@ void zebra_evpn_print_neigh(struct zebra_neigh *n, void *ctxt, struct vty *vty; char buf1[ETHER_ADDR_STRLEN]; char buf2[INET6_ADDRSTRLEN]; - char addr_buf[PREFIX_STRLEN]; const char *type_str; const char *state_str; bool flags_present = false; @@ -1812,10 +1811,8 @@ void zebra_evpn_print_neigh(struct zebra_neigh *n, void *ctxt, n->mac->es->esi_str); } else { if (json) - json_object_string_add( - json, "remoteVtep", - inet_ntop(AF_INET, &n->r_vtep_ip, - addr_buf, sizeof(addr_buf))); + json_object_string_addf(json, "remoteVtep", + "%pI4", &n->r_vtep_ip); else vty_out(vty, " Remote VTEP: %pI4\n", &n->r_vtep_ip); @@ -1974,10 +1971,8 @@ void zebra_evpn_print_neigh_hash(struct hash_bucket *bucket, void *ctxt) json_object_string_add(json_row, "remoteEs", n->mac->es->esi_str); else - json_object_string_add( - json_row, "remoteVtep", - inet_ntop(AF_INET, &n->r_vtep_ip, - addr_buf, sizeof(addr_buf))); + json_object_string_addf(json_row, "remoteVtep", + "%pI4", &n->r_vtep_ip); if (CHECK_FLAG(n->flags, ZEBRA_NEIGH_DEF_GW)) json_object_boolean_true_add(json_row, "defaultGateway"); @@ -2342,7 +2337,7 @@ int zebra_evpn_neigh_del_ip(struct zebra_evpn *zevpn, const struct ipaddr *ip) return 0; } - zvrf = vrf_info_lookup(zevpn->vxlan_if->vrf_id); + zvrf = zevpn->vxlan_if->vrf->info; if (!zvrf) { zlog_debug("%s: VNI %u vrf lookup failed.", __func__, zevpn->vni); |
