diff options
author | Dave Barach <dave@barachs.net> | 2016-03-20 10:14:45 -0400 |
---|---|---|
committer | Dave Barach <dave@barachs.net> | 2016-03-20 10:15:24 -0400 |
commit | f39ff74346e86fb175da7e2a3981f2e6f8d3cc0c (patch) | |
tree | 56f1136855072a6af295a727e8936e37039a9057 /vnet/vnet/mpls-gre | |
parent | 4f81085a771ca4c1fdb7d7cb617dcb06f8caa092 (diff) |
vnet classifier debug CLI enhancements
Extensible next-index and opaque unformat function scheme. Added
next-index-by-node-name and sw_if_index->opaque functions.
Allow dynamic graph arcs to be added to ip4/6-inacl.
Change-Id: Ie434335399a0708772eb82563a154df19c63b622
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vnet/vnet/mpls-gre')
-rw-r--r-- | vnet/vnet/mpls-gre/policy_encap.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vnet/vnet/mpls-gre/policy_encap.c b/vnet/vnet/mpls-gre/policy_encap.c index 53411515e69..850cdc196be 100644 --- a/vnet/vnet/mpls-gre/policy_encap.c +++ b/vnet/vnet/mpls-gre/policy_encap.c @@ -158,6 +158,7 @@ mpls_policy_encap_init (vlib_main_t * vm) { mpls_main_t * mm = &mpls_main; clib_error_t * error; + u32 ip6_next_index; if ((error = vlib_call_init_function (vm, mpls_init))) return error; @@ -166,6 +167,21 @@ mpls_policy_encap_init (vlib_main_t * vm) vlib_node_add_next (mm->vlib_main, ip4_classify_node.index, mpls_policy_encap_node.index); + + /* + * Must add the same arc to ip6_classify so the + * next-index vectors are congruent + */ + ip6_next_index = + vlib_node_add_next (mm->vlib_main, + ip6_classify_node.index, + mpls_policy_encap_node.index); + + if (ip6_next_index != mm->ip_classify_mpls_policy_encap_next_index) + return clib_error_return + (0, "ip4/ip6 classifier next vector botch: %d vs %d", + ip6_next_index, mm->ip_classify_mpls_policy_encap_next_index); + return 0; } |