summaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/mapme_ctrl_node.c
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-06-06 19:42:12 +0200
committerAlberto Compagno <acompagn+fdio@cisco.com>2019-06-06 23:02:14 +0200
commit27712b5f2a06c935a97643d91f6bd1345d05ec3b (patch)
treebd9dc4ee89daea07722db9376be4a5ef63b9ddf6 /hicn-plugin/src/mapme_ctrl_node.c
parent2d555daf9034459ec5ef20f7d63cccd25c6c4b0c (diff)
[HICN-214] Updating next_node in the face that mapme add to the fib in order to forward interests
Change-Id: I97c408c9e910df0ea7c43c0341c0025521ced125 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/mapme_ctrl_node.c')
-rw-r--r--hicn-plugin/src/mapme_ctrl_node.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/hicn-plugin/src/mapme_ctrl_node.c b/hicn-plugin/src/mapme_ctrl_node.c
index 9fc0c9055..7e07045c2 100644
--- a/hicn-plugin/src/mapme_ctrl_node.c
+++ b/hicn-plugin/src/mapme_ctrl_node.c
@@ -157,15 +157,15 @@ hicn_mapme_process_ctrl (vlib_main_t * vm, vlib_buffer_t * b,
}
/* ... and set ingress face as next_hop */
+ in_face->dpoi_next_node = hicn_mapme_get_dpo_vlib_edge (in_face);
hicn_mapme_nh_set (tfib, in_face);
/* We transmit both the prefix and the full dpo (type will be needed to pick the right transmit node */
- retx_t *retx =
- vlib_process_signal_event_data (vm,
- hicn_mapme_eventmgr_process_node.
- index,
- HICN_MAPME_EVENT_FACE_NH_SET, 1,
- sizeof (retx_t));
+ retx_t *retx = vlib_process_signal_event_data (vm,
+ hicn_mapme_eventmgr_process_node.index,
+ HICN_MAPME_EVENT_FACE_NH_SET,
+ 1,
+ sizeof (retx_t));
*retx = (retx_t)
{
.prefix = prefix,.dpo = *dpo};
@@ -183,12 +183,11 @@ hicn_mapme_process_ctrl (vlib_main_t * vm, vlib_buffer_t * b,
hicn_mapme_nh_add (tfib, in_face);
/* Multipath, multihoming, multiple producers or duplicate interest */
- retx_t *retx =
- vlib_process_signal_event_data (vm,
- hicn_mapme_eventmgr_process_node.
- index,
- HICN_MAPME_EVENT_FACE_NH_ADD, 1,
- sizeof (retx_t));
+ retx_t *retx = vlib_process_signal_event_data (vm,
+ hicn_mapme_eventmgr_process_node.index,
+ HICN_MAPME_EVENT_FACE_NH_ADD,
+ 1,
+ sizeof (retx_t));
*retx = (retx_t)
{
.prefix = prefix,.dpo = *dpo};
@@ -201,12 +200,11 @@ hicn_mapme_process_ctrl (vlib_main_t * vm, vlib_buffer_t * b,
*/
hicn_mapme_tfib_add (tfib, in_face);
- retx_t *retx =
- vlib_process_signal_event_data (vm,
- hicn_mapme_eventmgr_process_node.
- index,
- HICN_MAPME_EVENT_FACE_PH_ADD, 1,
- sizeof (retx_t));
+ retx_t *retx = vlib_process_signal_event_data (vm,
+ hicn_mapme_eventmgr_process_node.index,
+ HICN_MAPME_EVENT_FACE_PH_ADD,
+ 1,
+ sizeof (retx_t));
*retx = (retx_t)
{
.prefix = prefix,.dpo = *dpo};
@@ -268,6 +266,8 @@ hicn_mapme_ctrl_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
preprocess_in_face (hb->type, &hb->face_dpo_id, &in_face);
hicn_mapme_process_ctrl (vm, b0, &in_face);
+ vnet_buffer (b0)->ip.adj_index[VLIB_TX] = in_face.dpoi_index;
+
vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next,
n_left_to_next, bi0, next0);