feature: Config end nodes are user specific
Type: fix
it is possible for a user to change the end node of a feature arc, but
this change should only apply to that 'instnace' of the arc, not all
arcs. for example, if a tunnel has its ipx-output end node changed to
adj-midchain-tx, this shouldn't affect all ipx-output arcs. obviously...
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I41daea7ba6907963e42140307d065c8bcfdcb585
diff --git a/src/vnet/feature/feature.c b/src/vnet/feature/feature.c
index 4a5127d..09dd9cc 100644
--- a/src/vnet/feature/feature.c
+++ b/src/vnet/feature/feature.c
@@ -321,7 +321,7 @@
n_feature_config_bytes);
}
-int
+u32
vnet_feature_modify_end_node (u8 arc_index,
u32 sw_if_index, u32 end_node_index)
{
@@ -342,12 +342,10 @@
ci = vnet_config_modify_end_node (vlib_get_main (), &cm->config_main,
ci, end_node_index);
- if (ci == ~0)
- return 0;
+ if (ci != ~0)
+ cm->config_index_by_sw_if_index[sw_if_index] = ci;
- cm->config_index_by_sw_if_index[sw_if_index] = ci;
-
- return 0;
+ return ci;
}
static int
@@ -495,6 +493,14 @@
else
vlib_cli_output (vm, " %v", n->name);
}
+ if (verbose)
+ {
+ n =
+ vlib_get_node (vm,
+ vcm->end_node_indices_by_user_index
+ [current_config_index]);
+ vlib_cli_output (vm, " [end] %v", n->name);
+ }
}
}