summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--babeld/babel_interface.c7
-rw-r--r--isisd/isis_circuit.c37
-rw-r--r--ospfd/ospf_abr.c2
-rw-r--r--ospfd/ospf_asbr.c16
-rw-r--r--ospfd/ospf_asbr.h2
-rw-r--r--ospfd/ospf_flood.c2
-rw-r--r--ospfd/ospf_lsa.c2
-rw-r--r--ospfd/ospfd.c2
-rw-r--r--zebra/zebra_evpn_mac.c13
9 files changed, 44 insertions, 39 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index b83c7b1908..f17842366a 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -719,6 +719,7 @@ babel_interface_close_all(void)
{
struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT);
struct interface *ifp = NULL;
+ int type;
FOR_ALL_INTERFACES(vrf, ifp) {
if(!if_up(ifp))
@@ -740,8 +741,14 @@ babel_interface_close_all(void)
flushbuf(ifp);
usleep(roughly(10000));
gettime(&babel_now);
+ babel_enable_if_delete(ifp->name);
interface_reset(ifp);
}
+ /* Disable babel redistribution */
+ for (type = 0; type < ZEBRA_ROUTE_MAX; type++) {
+ zclient_redistribute (ZEBRA_REDISTRIBUTE_DELETE, zclient, AFI_IP, type, 0, VRF_DEFAULT);
+ zclient_redistribute (ZEBRA_REDISTRIBUTE_DELETE, zclient, AFI_IP6, type, 0, VRF_DEFAULT);
+ }
}
/* return "true" if address is one of our ipv6 addresses */
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c
index 9a967bc1e3..9ea2cfd0a1 100644
--- a/isisd/isis_circuit.c
+++ b/isisd/isis_circuit.c
@@ -1008,45 +1008,40 @@ void isis_circuit_print_json(struct isis_circuit *circuit,
circuit_t2string(level));
if (circuit->area->newmetric)
json_object_int_add(level_json, "metric",
- circuit->te_metric[0]);
+ circuit->te_metric[level - 1]);
else
json_object_int_add(level_json, "metric",
- circuit->metric[0]);
+ circuit->metric[level - 1]);
if (!circuit->is_passive) {
- json_object_int_add(level_json,
- "active-neighbors",
- circuit->upadjcount[0]);
- json_object_int_add(level_json,
- "hello-interval",
- circuit->hello_interval[0]);
+ json_object_int_add(level_json, "active-neighbors",
+ circuit->upadjcount[level - 1]);
+ json_object_int_add(level_json, "hello-interval",
+ circuit->hello_interval[level - 1]);
hold_json = json_object_new_object();
json_object_object_add(level_json, "holddown",
hold_json);
- json_object_int_add(
- hold_json, "count",
- circuit->hello_multiplier[0]);
+ json_object_int_add(hold_json, "count",
+ circuit->hello_multiplier[level - 1]);
json_object_string_add(
hold_json, "pad",
isis_hello_padding2string(
circuit->pad_hellos));
json_object_int_add(level_json, "cnsp-interval",
- circuit->csnp_interval[0]);
+ circuit->csnp_interval[level - 1]);
json_object_int_add(level_json, "psnp-interval",
- circuit->psnp_interval[0]);
+ circuit->psnp_interval[level - 1]);
if (circuit->circ_type == CIRCUIT_T_BROADCAST) {
lan_prio_json =
json_object_new_object();
json_object_object_add(level_json,
"lan",
lan_prio_json);
- json_object_int_add(
- lan_prio_json, "priority",
- circuit->priority[0]);
- json_object_string_add(
- lan_prio_json, "is-dis",
- (circuit->u.bc.is_dr[0]
- ? "yes"
- : "no"));
+ json_object_int_add(lan_prio_json, "priority",
+ circuit->priority[level - 1]);
+ json_object_string_add(lan_prio_json, "is-dis",
+ (circuit->u.bc.is_dr[level - 1]
+ ? "yes"
+ : "no"));
}
}
json_object_array_add(levels_json, level_json);
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index 93779991b5..eed1bfcb30 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -1823,7 +1823,7 @@ static void ospf_abr_nssa_type7_default_create(struct ospf *ospf,
"Announcing Type-7 default route into NSSA area %pI4",
&area->area_id);
- /* Prepare the extrenal_info for aggregator */
+ /* Prepare the external_info for aggregator */
memset(&ei, 0, sizeof(struct external_info));
ei.p.family = AF_INET;
ei.p.prefixlen = 0;
diff --git a/ospfd/ospf_asbr.c b/ospfd/ospf_asbr.c
index 738ac6d8cf..aa11467027 100644
--- a/ospfd/ospf_asbr.c
+++ b/ospfd/ospf_asbr.c
@@ -492,7 +492,7 @@ static void ospf_aggr_handle_external_info(void *data)
ei->to_be_processed = true;
if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR))
- zlog_debug("%s: Handle extrenal route(%pI4/%d)", __func__,
+ zlog_debug("%s: Handle external route(%pI4/%d)", __func__,
&ei->p.prefix, ei->p.prefixlen);
assert(ospf);
@@ -571,7 +571,7 @@ static void ospf_external_aggr_delete(struct ospf *ospf, struct route_node *rn)
}
struct ospf_external_aggr_rt *
-ospf_extrenal_aggregator_lookup(struct ospf *ospf, struct prefix_ipv4 *p)
+ospf_external_aggregator_lookup(struct ospf *ospf, struct prefix_ipv4 *p)
{
struct route_node *rn;
struct ospf_external_aggr_rt *summary_rt = NULL;
@@ -617,7 +617,7 @@ void ospf_unlink_ei_from_aggr(struct ospf *ospf,
{
if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR))
zlog_debug(
- "%s: Unlinking extrenal route(%pI4/%d) from aggregator(%pI4/%d), external route count:%ld",
+ "%s: Unlinking external route(%pI4/%d) from aggregator(%pI4/%d), external route count:%ld",
__func__, &ei->p.prefix, ei->p.prefixlen,
&aggr->p.prefix, aggr->p.prefixlen,
OSPF_EXTERNAL_RT_COUNT(aggr));
@@ -648,7 +648,7 @@ static void ospf_link_ei_to_aggr(struct ospf_external_aggr_rt *aggr,
{
if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR))
zlog_debug(
- "%s: Linking extrenal route(%pI4/%d) to aggregator(%pI4/%d)",
+ "%s: Linking external route(%pI4/%d) to aggregator(%pI4/%d)",
__func__, &ei->p.prefix, ei->p.prefixlen,
&aggr->p.prefix, aggr->p.prefixlen);
(void)hash_get(aggr->match_extnl_hash, ei, hash_alloc_intern);
@@ -703,7 +703,7 @@ struct ospf_lsa *ospf_originate_summary_lsa(struct ospf *ospf,
return NULL;
}
- /* Prepare the extrenal_info for aggregator */
+ /* Prepare the external_info for aggregator */
memset(&ei_aggr, 0, sizeof(ei_aggr));
ei_aggr.p = aggr->p;
ei_aggr.tag = aggr->tag;
@@ -1063,7 +1063,7 @@ static void ospf_handle_external_aggr_update(struct ospf *ospf)
aggr->action = OSPF_ROUTE_AGGR_NONE;
- /* Prepare the extrenal_info for aggregator */
+ /* Prepare the external_info for aggregator */
memset(&ei_aggr, 0, sizeof(ei_aggr));
ei_aggr.p = aggr->p;
ei_aggr.tag = aggr->tag;
@@ -1176,7 +1176,7 @@ int ospf_asbr_external_aggregator_set(struct ospf *ospf, struct prefix_ipv4 *p,
{
struct ospf_external_aggr_rt *aggregator;
- aggregator = ospf_extrenal_aggregator_lookup(ospf, p);
+ aggregator = ospf_external_aggregator_lookup(ospf, p);
if (aggregator) {
if (CHECK_FLAG(aggregator->flags,
@@ -1236,7 +1236,7 @@ int ospf_asbr_external_rt_no_advertise(struct ospf *ospf, struct prefix_ipv4 *p)
struct ospf_external_aggr_rt *aggr;
route_tag_t tag = 0;
- aggr = ospf_extrenal_aggregator_lookup(ospf, p);
+ aggr = ospf_external_aggregator_lookup(ospf, p);
if (aggr) {
if (CHECK_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_NO_ADVERTISE))
return OSPF_SUCCESS;
diff --git a/ospfd/ospf_asbr.h b/ospfd/ospf_asbr.h
index 648a5a11ae..0b3b695f3e 100644
--- a/ospfd/ospf_asbr.h
+++ b/ospfd/ospf_asbr.h
@@ -144,7 +144,7 @@ extern int ospf_external_aggregator_timer_set(struct ospf *ospf,
extern void ospf_external_aggrigator_free(struct ospf_external_aggr_rt *aggr);
extern struct ospf_external_aggr_rt *
-ospf_extrenal_aggregator_lookup(struct ospf *ospf, struct prefix_ipv4 *p);
+ospf_external_aggregator_lookup(struct ospf *ospf, struct prefix_ipv4 *p);
void ospf_unset_all_aggr_flag(struct ospf *ospf);
diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c
index e3398af74b..bcb35315d8 100644
--- a/ospfd/ospf_flood.c
+++ b/ospfd/ospf_flood.c
@@ -325,7 +325,7 @@ static void ospf_process_self_originated_lsa(struct ospf *ospf,
LSA_REFRESH_FORCE, false);
} else {
aggr = (struct ospf_external_aggr_rt *)
- ospf_extrenal_aggregator_lookup(ospf, &p);
+ ospf_external_aggregator_lookup(ospf, &p);
if (aggr) {
struct external_info ei_aggr;
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 7354223397..ac53f3a19f 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -4064,7 +4064,7 @@ struct ospf_lsa *ospf_lsa_refresh(struct ospf *ospf, struct ospf_lsa *lsa)
ospf, lsa, ei, LSA_REFRESH_FORCE, false);
else {
aggr = (struct ospf_external_aggr_rt *)
- ospf_extrenal_aggregator_lookup(ospf, &p);
+ ospf_external_aggregator_lookup(ospf, &p);
if (aggr) {
struct external_info ei_aggr;
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index d72afec1e4..90330d368d 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -843,7 +843,7 @@ static void ospf_finish_final(struct ospf *ospf)
ospf_distance_reset(ospf);
route_table_finish(ospf->distance_table);
- /* Release extrenal Aggregator table */
+ /* Release external Aggregator table */
for (rn = route_top(ospf->rt_aggr_tbl); rn; rn = route_next(rn)) {
struct ospf_external_aggr_rt *aggr;
diff --git a/zebra/zebra_evpn_mac.c b/zebra/zebra_evpn_mac.c
index f9009dabb7..3fd84b5257 100644
--- a/zebra/zebra_evpn_mac.c
+++ b/zebra/zebra_evpn_mac.c
@@ -1323,6 +1323,7 @@ int zebra_evpn_mac_send_del_to_client(vni_t vni, const struct ethaddr *macaddr,
uint32_t flags, bool force)
{
int state = ZEBRA_NEIGH_ACTIVE;
+ struct zebra_vrf *zvrf;
if (!force) {
if (CHECK_FLAG(flags, ZEBRA_MAC_LOCAL_INACTIVE) &&
@@ -1330,12 +1331,14 @@ int zebra_evpn_mac_send_del_to_client(vni_t vni, const struct ethaddr *macaddr,
/* the host was not advertised - nothing to delete */
return 0;
- /* MAC is LOCAL and DUP_DETECTED, this local mobility event
- * is not known to bgpd. Upon receiving local delete
- * ask bgp to reinstall the best route (remote entry).
+ /* Duplicate detect action is freeze enabled and
+ * Local MAC is duplicate deteced, this local
+ * mobility event is not known to bgpd.
+ * Upon receiving local delete ask bgp to reinstall
+ * the best route (remote entry).
*/
- if (CHECK_FLAG(flags, ZEBRA_MAC_LOCAL) &&
- CHECK_FLAG(flags, ZEBRA_MAC_DUPLICATE))
+ zvrf = zebra_vrf_get_evpn();
+ if (zvrf && zvrf->dad_freeze && CHECK_FLAG(flags, ZEBRA_MAC_DUPLICATE))
state = ZEBRA_NEIGH_INACTIVE;
}