Opaque index is not populated when ACL is configured. Fixed it. 75/775/2
authorrangan <rangan@cisco.com>
Wed, 13 Apr 2016 11:38:11 +0000 (17:08 +0530)
committerGerrit Code Review <gerrit@fd.io>
Thu, 14 Apr 2016 14:00:02 +0000 (14:00 +0000)
This is inline with ip6_classify.c

Change-Id: Ib6e1f6fa3e4669e0a94e4ae2da48eacb240d192b
Signed-off-by: rangan <rangan@cisco.com>
vnet/vnet/ip/ip_input_acl.c

index fb7255e..e905ed1 100644 (file)
@@ -231,12 +231,13 @@ ip_inacl_inline (vlib_main_t * vm,
           table_index0 = vnet_buffer(b0)->l2_classify.table_index;
           e0 = 0;
           t0 = 0;
-
           vnet_get_config_data (am->vnet_config_main[tid],
                                 &vnet_buffer(b0)->ip.current_config_index,
                                 &next0,
                                 /* # bytes of config data */ 0);
 
+          vnet_buffer(b0)->l2_classify.opaque_index = ~0;
+
           if (PREDICT_TRUE(table_index0 != ~0))
             {
               hash0 = vnet_buffer(b0)->l2_classify.hash;
@@ -246,6 +247,8 @@ ip_inacl_inline (vlib_main_t * vm,
                                              now);
               if (e0)
                 {
+                  vnet_buffer(b0)->l2_classify.opaque_index
+                    = e0->opaque_index;
                   vlib_buffer_advance (b0, e0->advance);
 
                   next0 = (e0->next_index < n_next_nodes)?
@@ -290,6 +293,8 @@ ip_inacl_inline (vlib_main_t * vm,
                         (t0, (u8 *) h0, hash0, now);
                       if (e0)
                         {
+                          vnet_buffer(b0)->l2_classify.opaque_index
+                            = e0->opaque_index;
                           vlib_buffer_advance (b0, e0->advance);
                           next0 = (e0->next_index < n_next_nodes)?
                                    e0->next_index:next0;