#include "vrf.h"
#include "workqueue.h"
#include "nexthop_group_private.h"
+#include "frr_pthread.h"
#include "zebra/zebra_router.h"
#include "zebra/connected.h"
/* Redistribute */
redistribute_update(dest_pfx, src_pfx,
- re, NULL);
+ re, old_re);
}
/*
goto done;
}
+ /* Ensure we clear the QUEUED flag */
+ UNSET_FLAG(re->status, ROUTE_ENTRY_QUEUED);
+
/* Is this a notification that ... matters? We only really care about
* the route that is currently selected for installation.
*/
dplane_ctx_get_vrf(ctx), dest_str);
/* We expect this to be the selected route, so we want
- * to tell others about this transistion.
+ * to tell others about this transition.
*/
SET_FLAG(re->status, ROUTE_ENTRY_INSTALLED);
if (dplane_ctx_get_status(ctx) != ZEBRA_DPLANE_REQUEST_SUCCESS) {
vrf = zebra_vrf_lookup_by_id(dplane_ctx_get_vrf(ctx));
- pw = zebra_pw_find(vrf, dplane_ctx_get_pw_ifname(ctx));
+ pw = zebra_pw_find(vrf, dplane_ctx_get_ifname(ctx));
if (pw)
zebra_pw_install_failure(pw);
}
TAILQ_INIT(&ctxlist);
/* Take lock controlling queue of results */
- pthread_mutex_lock(&dplane_mutex);
- {
+ frr_with_mutex(&dplane_mutex) {
/* Dequeue list of context structs */
dplane_ctx_list_append(&ctxlist, &rib_dplane_q);
}
- pthread_mutex_unlock(&dplane_mutex);
/* Dequeue context block */
ctx = dplane_ctx_dequeue(&ctxlist);
dplane_ctx_fini(&ctx);
break;
+ case DPLANE_OP_MAC_INSTALL:
+ case DPLANE_OP_MAC_DELETE:
+ zebra_vxlan_handle_result(ctx);
+ break;
+
default:
/* Don't expect this: just return the struct? */
dplane_ctx_fini(&ctx);
static int rib_dplane_results(struct dplane_ctx_q *ctxlist)
{
/* Take lock controlling queue of results */
- pthread_mutex_lock(&dplane_mutex);
- {
+ frr_with_mutex(&dplane_mutex) {
/* Enqueue context blocks */
dplane_ctx_list_append(&rib_dplane_q, ctxlist);
}
- pthread_mutex_unlock(&dplane_mutex);
/* Ensure event is signalled to zebra main pthread */
thread_add_event(zrouter.master, rib_process_dplane_results, NULL, 0,