aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/acl-plugin/acl/l2sess.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/acl-plugin/acl/l2sess.c')
-rw-r--r--plugins/acl-plugin/acl/l2sess.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/plugins/acl-plugin/acl/l2sess.c b/plugins/acl-plugin/acl/l2sess.c
index cc9bde4417d..b17f7841de6 100644
--- a/plugins/acl-plugin/acl/l2sess.c
+++ b/plugins/acl-plugin/acl/l2sess.c
@@ -44,10 +44,18 @@ l2sess_vlib_plugin_register (vlib_main_t * vm, void* hh,
}
void
-l2sess_init_next_features_input (vlib_main_t * vm, l2sess_main_t * sm)
+l2sess_init_next_features (vlib_main_t * vm, l2sess_main_t * sm)
{
-#define _(node_name, node_var, is_out, is_ip6, is_track) \
- if (!is_out) feat_bitmap_init_next_nodes(vm, node_var.index, L2INPUT_N_FEAT, l2input_get_feat_names (), sm->node_var ## _input_next_node_index);
+#define _(node_name, node_var, is_out, is_ip6, is_track) \
+ if (is_out) \
+ feat_bitmap_init_next_nodes(vm, node_var.index, L2OUTPUT_N_FEAT, \
+ l2output_get_feat_names (), \
+ sm->node_var ## _feat_next_node_index); \
+ else \
+ feat_bitmap_init_next_nodes(vm, node_var.index, L2INPUT_N_FEAT, \
+ l2input_get_feat_names (), \
+ sm->node_var ## _feat_next_node_index);
+
foreach_l2sess_node
#undef _
}
@@ -75,7 +83,7 @@ l2sess_setup_nodes (void)
vlib_main_t *vm = vlib_get_main ();
l2sess_main_t *sm = &l2sess_main;
- l2sess_init_next_features_input (vm, sm);
+ l2sess_init_next_features (vm, sm);
l2sess_add_our_next_nodes (vm, sm, (u8 *) "l2-input-classify", 0);
l2sess_add_our_next_nodes (vm, sm, (u8 *) "l2-output-classify", 1);