summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/log.c2
-rw-r--r--lib/zclient.h2
-rw-r--r--zebra/zapi_msg.c1
-rw-r--r--zebra/zebra_vrf.h7
-rw-r--r--zebra/zebra_vxlan.c36
-rw-r--r--zebra/zebra_vxlan.h1
6 files changed, 47 insertions, 2 deletions
diff --git a/lib/log.c b/lib/log.c
index 38e5260751..12a1d7fbe0 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -1030,11 +1030,11 @@ static const struct zebra_desc_table command_types[] = {
DESC_ENTRY(ZEBRA_REMOTE_VTEP_DEL),
DESC_ENTRY(ZEBRA_MACIP_ADD),
DESC_ENTRY(ZEBRA_MACIP_DEL),
- DESC_ENTRY(ZEBRA_DUPLICATE_ADDR_DETECTION),
DESC_ENTRY(ZEBRA_IP_PREFIX_ROUTE_ADD),
DESC_ENTRY(ZEBRA_IP_PREFIX_ROUTE_DEL),
DESC_ENTRY(ZEBRA_REMOTE_MACIP_ADD),
DESC_ENTRY(ZEBRA_REMOTE_MACIP_DEL),
+ DESC_ENTRY(ZEBRA_DUPLICATE_ADDR_DETECTION),
DESC_ENTRY(ZEBRA_PW_ADD),
DESC_ENTRY(ZEBRA_PW_DELETE),
DESC_ENTRY(ZEBRA_PW_SET),
diff --git a/lib/zclient.h b/lib/zclient.h
index f26097e648..adb48b252a 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -131,11 +131,11 @@ typedef enum {
ZEBRA_REMOTE_VTEP_DEL,
ZEBRA_MACIP_ADD,
ZEBRA_MACIP_DEL,
- ZEBRA_DUPLICATE_ADDR_DETECTION,
ZEBRA_IP_PREFIX_ROUTE_ADD,
ZEBRA_IP_PREFIX_ROUTE_DEL,
ZEBRA_REMOTE_MACIP_ADD,
ZEBRA_REMOTE_MACIP_DEL,
+ ZEBRA_DUPLICATE_ADDR_DETECTION,
ZEBRA_PW_ADD,
ZEBRA_PW_DELETE,
ZEBRA_PW_SET,
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index b93911bee7..9b84a6e58a 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -2443,6 +2443,7 @@ void (*zserv_handlers[])(ZAPI_HANDLER_ARGS) = {
[ZEBRA_REMOTE_VTEP_DEL] = zebra_vxlan_remote_vtep_del,
[ZEBRA_REMOTE_MACIP_ADD] = zebra_vxlan_remote_macip_add,
[ZEBRA_REMOTE_MACIP_DEL] = zebra_vxlan_remote_macip_del,
+ [ZEBRA_DUPLICATE_ADDR_DETECTION] = zebra_vxlan_dup_addr_detection,
[ZEBRA_INTERFACE_SET_MASTER] = zread_interface_set_master,
[ZEBRA_PW_ADD] = zread_pseudowire,
[ZEBRA_PW_DELETE] = zread_pseudowire,
diff --git a/zebra/zebra_vrf.h b/zebra/zebra_vrf.h
index ef02ca63e5..c28025403b 100644
--- a/zebra/zebra_vrf.h
+++ b/zebra/zebra_vrf.h
@@ -125,6 +125,13 @@ struct zebra_vrf {
/* l3-vni info */
vni_t l3vni;
+ bool dup_addr_detect;
+
+ int dad_time;
+ uint32_t dad_max_moves;
+ bool dad_freeze;
+ uint32_t dad_freeze_time;
+
/*
* Flooding mechanism for BUM packets for VxLAN-EVPN.
*/
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index d372d3e832..280b10b6e9 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -5426,6 +5426,42 @@ void zebra_vxlan_print_vnis(struct vty *vty, struct zebra_vrf *zvrf,
}
}
+void zebra_vxlan_dup_addr_detection(ZAPI_HANDLER_ARGS)
+{
+ struct stream *s;
+ int time = 0;
+ uint32_t max_moves = 0;
+ uint32_t freeze_time = 0;
+ bool dup_addr_detect = false;
+ bool freeze = false;
+
+ s = msg;
+ STREAM_GETL(s, dup_addr_detect);
+ STREAM_GETL(s, time);
+ STREAM_GETL(s, max_moves);
+ STREAM_GETL(s, freeze);
+ STREAM_GETL(s, freeze_time);
+
+ zvrf->dup_addr_detect = dup_addr_detect;
+ zvrf->dad_time = time;
+ zvrf->dad_max_moves = max_moves;
+ zvrf->dad_freeze = freeze;
+ zvrf->dad_freeze_time = freeze_time;
+
+ if (IS_ZEBRA_DEBUG_VXLAN)
+ zlog_debug(
+ "%s: duplicate detect %s max_moves %u timeout %u freeze %s freeze_time %u",
+ __PRETTY_FUNCTION__,
+ zvrf->dup_addr_detect ? "enable" : "disable",
+ zvrf->dad_max_moves,
+ zvrf->dad_time,
+ zvrf->dad_freeze ? "enable" : "disable",
+ zvrf->dad_freeze_time);
+
+stream_failure:
+ return;
+}
+
/*
* Handle neighbor delete notification from the kernel (on a VLAN device
* / L3 interface). This may result in either the neighbor getting deleted
diff --git a/zebra/zebra_vxlan.h b/zebra/zebra_vxlan.h
index 1c394e9eff..806af9100f 100644
--- a/zebra/zebra_vxlan.h
+++ b/zebra/zebra_vxlan.h
@@ -70,6 +70,7 @@ extern void zebra_vxlan_flood_control(ZAPI_HANDLER_ARGS);
extern void zebra_vxlan_advertise_subnet(ZAPI_HANDLER_ARGS);
extern void zebra_vxlan_advertise_gw_macip(ZAPI_HANDLER_ARGS);
extern void zebra_vxlan_advertise_all_vni(ZAPI_HANDLER_ARGS);
+extern void zebra_vxlan_dup_addr_detection(ZAPI_HANDLER_ARGS);
extern int is_l3vni_for_prefix_routes_only(vni_t vni);
extern ifindex_t get_l3vni_svi_ifindex(vrf_id_t vrf_id);