{
struct prefix_evpn p;
+ /* If VNI is not live, we only need to update the originator ip */
+ if (!is_vni_live(vpn)) {
+ vpn->originator_ip = originator_ip;
+ return 0;
+ }
+
/* Need to withdraw type-3 route as the originator IP is part
* of the key.
*/
/* Lookup VNI. If present and no change, exit. */
vpn = bgp_evpn_lookup_vni(bgp, vni);
- if (vpn && is_vni_live(vpn)) {
+ if (vpn) {
if (IPV4_ADDR_SAME(&vpn->originator_ip, &originator_ip))
/* Probably some other param has changed that we don't
* care about. */
return 0;
/* Local tunnel endpoint IP address has changed */
- return handle_tunnel_ip_change(bgp, vpn, originator_ip);
+ handle_tunnel_ip_change(bgp, vpn, originator_ip);
}
/* Create or update as appropriate. */
}
}
+ /* if the VNI is live already, there is nothibng more to do */
+ if (is_vni_live(vpn))
+ return 0;
+
/* Mark as "live" */
SET_FLAG(vpn->flags, VNI_FLAG_LIVE);
vty_out(vty, " RD: %s\n",
prefix_rd2str(&vpn->prd, buf1, RD_ADDRSTRLEN));
vty_out(vty, " Originator IP: %s\n", inet_ntoa(vpn->originator_ip));
+ vty_out(vty, " Advertise-gw-macip : %s\n",
+ vpn->advertise_gw_macip ? "Yes" : "No");
vty_out(vty, " Import Route Target:\n");
for (ALL_LIST_ELEMENTS(vpn->import_rtl, node, nnode, ecom)) {
json_object_int_add(json, "ifindex", zvni->vxlan_if->ifindex);
json_object_string_add(json, "vtepIp",
inet_ntoa(zvni->local_vtep_ip));
+ json_object_string_add(json, "advertiseGatewayMacip",
+ zvni->advertise_gw_macip ? "Yes" : "No");
json_object_int_add(json, "numMacs", num_macs);
json_object_int_add(json, "numArpNd", num_neigh);
}
" Number of ARPs (IPv4 and IPv6, local and remote) "
"known for this VNI: %u\n",
num_neigh);
+ vty_out(vty, " Advertise-gw-macip: %s\n",
+ zvni->advertise_gw_macip ? "Yes" : "No");
}
}
}
if (use_json) {
json = json_object_new_object();
+ json_object_string_add(json, "advertiseGatewayMacip",
+ zvrf->advertise_gw_macip ? "Yes" : "No");
json_object_int_add(json, "numVnis", num_vnis);
} else {
+ vty_out(vty, "Advertise gateway mac-ip: %s\n",
+ zvrf->advertise_gw_macip ? "Yes" : "No");
vty_out(vty, "Number of VNIs: %u\n", num_vnis);
vty_out(vty, "%-10s %-21s %-15s %-8s %-8s %-15s\n", "VNI",
"VxLAN IF", "VTEP IP", "# MACs", "# ARPs",