dup_addr_detection_cmd,
"dup-addr-detection [max-moves (2-1000)$max_moves_val time (2-1800)$time_val]",
"Duplicate address detection\n"
- "Max allowed moved before address detected as duplicate\n"
+ "Max allowed moves before address detected as duplicate\n"
"Num of max allowed moves (2-1000) default 5\n"
"Duplicate address detection time\n"
"Time in seconds (2-1800) default 180\n")
"no dup-addr-detection [max-moves (2-1000)$max_moves_val time (2-1800)$time_val | freeze <permanent$permanent_val | (30-3600)$freeze_time_val>]",
NO_STR
"Duplicate address detection\n"
- "Max allowed moved before address detected as duplicate\n"
+ "Max allowed moves before address detected as duplicate\n"
"Num of max allowed moves (2-1000) default 5\n"
"Duplicate address detection time\n"
"Time in seconds (2-1800) default 180\n"
}
/* As part Duplicate Address Detection (DAD) for IP mobility
- * MAC binding changes, ensure to inheirt duplicate flag
+ * MAC binding changes, ensure to inherit duplicate flag
+ * from MAC.
*/
static int zebra_vxlan_ip_inherit_dad_from_mac(struct zebra_vrf *zvrf,
zebra_mac_t *old_zmac,
const char *type_str;
const char *state_str;
bool flags_present = false;
- struct zebra_vrf *zvrf;
+ struct zebra_vrf *zvrf = NULL;
struct timeval detect_start_time = {0, 0};
zvrf = zebra_vrf_lookup_by_id(n->zvni->vrf_id);
+ if (!zvrf)
+ return;
+
ipaddr2str(&n->ip, buf2, sizeof(buf2));
prefix_mac2str(&n->emac, buf1, sizeof(buf1));
type_str = CHECK_FLAG(n->flags, ZEBRA_NEIGH_LOCAL) ?
/* since this is asynchronous we need sanity checks*/
zvrf = vrf_info_lookup(nbr->zvni->vrf_id);
if (!zvrf)
- goto exit;
+ return 0;
zvni = zvni_lookup(nbr->zvni->vni);
if (!zvni)
- goto exit;
+ return 0;
nbr = zvni_neigh_lookup(zvni, &nbr->ip);
if (!nbr)
- goto exit;
+ return 0;
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug("%s: duplicate addr MAC %s IP %s flags 0x%x learn count %u vni %u auto recovery expired",
zvni_neigh_install(zvni, nbr);
}
-exit:
return 0;
}
/* since this is asynchronous we need sanity checks*/
zvrf = vrf_info_lookup(mac->zvni->vrf_id);
if (!zvrf)
- goto exit;
+ return 0;
zvni = zvni_lookup(mac->zvni->vni);
if (!zvni)
- goto exit;
+ return 0;
mac = zvni_mac_lookup(zvni, &mac->macaddr);
if (!mac)
- goto exit;
+ return 0;
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug("%s: duplicate addr mac %s flags 0x%x learn count %u host count %u auto recovery expired",
zvni_mac_install(zvni, mac);
}
-exit:
return 0;
}