diff options
| author | Mitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com> | 2017-08-18 17:40:52 -0700 |
|---|---|---|
| committer | Mitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com> | 2017-08-20 05:53:15 -0700 |
| commit | f51d8a274b68b97c7d618d3763b3fbafab4ac716 (patch) | |
| tree | 2b7d923196318c278a1f41fbd17cff5ce527b9b2 | |
| parent | 0291c246dbf3e2e598a3a93c835a40cd6bcbb845 (diff) | |
zebra: Delete AUTO macs when neigh list is empty
Ticket: CM-17660
Review: CCR-6624
Testing: Manual
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
| -rw-r--r-- | zebra/zebra_vxlan.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index c2ea8ab58c..86c3ce1d00 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -204,13 +204,18 @@ static void zvni_print_neigh(zebra_neigh_t *n, void *ctxt, json_object *json) if (json == NULL) { vty_out(vty, " Remote VTEP: %s", inet_ntoa(n->r_vtep_ip)); - vty_out(vty, " State: %s", IS_ZEBRA_NEIGH_ACTIVE(n) - ? "Active" - : "Inactive"); } else json_object_string_add(json, "remoteVtep", inet_ntoa(n->r_vtep_ip)); } + if (CHECK_FLAG(n->flags, ZEBRA_NEIGH_LOCAL)) { + if (!json) { + vty_out(vty, "\n"); + vty_out(vty, " State: %s", + IS_ZEBRA_NEIGH_ACTIVE(n) ? "Active" + : "Inactive"); + } + } if (json == NULL) vty_out(vty, "\n"); } @@ -2869,7 +2874,7 @@ int zebra_vxlan_local_neigh_del(struct interface *ifp, /* see if the AUTO mac needs to be deleted */ if (CHECK_FLAG(zmac->flags, ZEBRA_MAC_AUTO) - || !listcount(zmac->neigh_list)) + && !listcount(zmac->neigh_list)) zvni_mac_del(zvni, zmac); return 0; |
