]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: dup addr detect add fields to show evpn cmd
authorChirag Shah <chirag@cumulusnetworks.com>
Sat, 17 Nov 2018 01:51:11 +0000 (17:51 -0800)
committerChirag Shah <chirag@cumulusnetworks.com>
Sun, 18 Nov 2018 03:22:17 +0000 (19:22 -0800)
TOR# show evpn
L2 VNIs: 5
L3 VNIs: 0
Advertise gateway mac-ip: No
Duplicate address detection: Enable
  Detection max-moves 5, time 180

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
zebra/zebra_vxlan.c

index 76912f63afb546d229eef51e4fbe395795a06409..e06db0abc5d7f156f364c670c77b1c8280863863 100644 (file)
@@ -6460,11 +6460,34 @@ void zebra_vxlan_print_evpn(struct vty *vty, bool uj)
                json_object_int_add(json, "numVnis", num_vnis);
                json_object_int_add(json, "numL2Vnis", num_l2vnis);
                json_object_int_add(json, "numL3Vnis", num_l3vnis);
+               if (zvrf->dup_addr_detect)
+                       json_object_boolean_true_add(json,
+                                               "isDuplicateAddrDetection");
+               else
+                       json_object_boolean_false_add(json,
+                                               "isDuplicateAddrDetection");
+               json_object_int_add(json, "maxMoves", zvrf->dad_max_moves);
+               json_object_int_add(json, "detectionTime", zvrf->dad_time);
+               json_object_int_add(json, "detectionFreezeTime",
+                                   zvrf->dad_freeze_time);
+
        } else {
                vty_out(vty, "L2 VNIs: %u\n", num_l2vnis);
                vty_out(vty, "L3 VNIs: %u\n", num_l3vnis);
                vty_out(vty, "Advertise gateway mac-ip: %s\n",
                        zvrf->advertise_gw_macip ? "Yes" : "No");
+               vty_out(vty, "Duplicate address detection: %s\n",
+                       zvrf->dup_addr_detect ? "Enable" : "Disable");
+               vty_out(vty, "  Detection max-moves %u, time %d\n",
+                       zvrf->dad_max_moves, zvrf->dad_time);
+               if (zvrf->dad_freeze) {
+                       if (zvrf->dad_freeze_time)
+                               vty_out(vty, "  Detection freeze %u\n",
+                                       zvrf->dad_freeze_time);
+                       else
+                               vty_out(vty, "  Detection freeze %s\n",
+                                       "permanent");
+               }
        }
 
        if (uj) {