srv6: fix pointers in quad loops 44/13444/2
authorFrancois Clad <fclad@cisco.com>
Thu, 12 Jul 2018 07:56:23 +0000 (09:56 +0200)
committerDave Barach <openvpp@barachs.net>
Thu, 12 Jul 2018 11:36:03 +0000 (11:36 +0000)
Change-Id: I51c4bcbd456d2e7ffbdeef9cc8c7703d1c88b52e
Signed-off-by: Francois Clad <fclad@cisco.com>
src/vnet/srv6/sr_localsid.c

index 6b1724d..58fdbfd 100755 (executable)
@@ -946,13 +946,13 @@ sr_localsid_d_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
                               vnet_buffer (b0)->ip.adj_index[VLIB_TX]);
          ls1 =
            pool_elt_at_index (sm->localsids,
-                              vnet_buffer (b0)->ip.adj_index[VLIB_TX]);
+                              vnet_buffer (b1)->ip.adj_index[VLIB_TX]);
          ls2 =
            pool_elt_at_index (sm->localsids,
-                              vnet_buffer (b0)->ip.adj_index[VLIB_TX]);
+                              vnet_buffer (b2)->ip.adj_index[VLIB_TX]);
          ls3 =
            pool_elt_at_index (sm->localsids,
-                              vnet_buffer (b0)->ip.adj_index[VLIB_TX]);
+                              vnet_buffer (b3)->ip.adj_index[VLIB_TX]);
 
          ip0 = vlib_buffer_get_current (b0);
          ip1 = vlib_buffer_get_current (b1);
@@ -1259,13 +1259,13 @@ sr_localsid_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
                               vnet_buffer (b0)->ip.adj_index[VLIB_TX]);
          ls1 =
            pool_elt_at_index (sm->localsids,
-                              vnet_buffer (b0)->ip.adj_index[VLIB_TX]);
+                              vnet_buffer (b1)->ip.adj_index[VLIB_TX]);
          ls2 =
            pool_elt_at_index (sm->localsids,
-                              vnet_buffer (b0)->ip.adj_index[VLIB_TX]);
+                              vnet_buffer (b2)->ip.adj_index[VLIB_TX]);
          ls3 =
            pool_elt_at_index (sm->localsids,
-                              vnet_buffer (b0)->ip.adj_index[VLIB_TX]);
+                              vnet_buffer (b3)->ip.adj_index[VLIB_TX]);
 
          end_srh_processing (node, b0, ip0, sr0, ls0, &next0, ls0->end_psp,
                              prev0);