c11 safe string handling support
[vpp.git] / src / plugins / gtpu / gtpu_decap.c
index de23588..c4e6c85 100644 (file)
@@ -87,7 +87,7 @@ gtpu_input (vlib_main_t * vm,
   if (is_ip4)
     last_key4.as_u64 = ~0;
   else
-    memset (&last_key6, 0xff, sizeof (last_key6));
+    clib_memset (&last_key6, 0xff, sizeof (last_key6));
 
   from = vlib_frame_vector_args (from_frame);
   n_left_from = from_frame->n_vectors;
@@ -213,7 +213,7 @@ gtpu_input (vlib_main_t * vm,
               tunnel_index0 = last_tunnel_index;
            t0 = pool_elt_at_index (gtm->tunnels, tunnel_index0);
 
-           /* Validate GTPU tunnel encap-fib index agaist packet */
+           /* Validate GTPU tunnel encap-fib index against packet */
            if (PREDICT_FALSE (validate_gtpu_fib (b0, t0, is_ip4) == 0))
              {
                error0 = GTPU_ERROR_NO_SUCH_TUNNEL;
@@ -263,7 +263,7 @@ gtpu_input (vlib_main_t * vm,
               tunnel_index0 = last_tunnel_index;
            t0 = pool_elt_at_index (gtm->tunnels, tunnel_index0);
 
-           /* Validate GTPU tunnel encap-fib index agaist packet */
+           /* Validate GTPU tunnel encap-fib index against packet */
            if (PREDICT_FALSE (validate_gtpu_fib (b0, t0, is_ip4) == 0))
              {
                error0 = GTPU_ERROR_NO_SUCH_TUNNEL;
@@ -387,7 +387,7 @@ gtpu_input (vlib_main_t * vm,
               tunnel_index1 = last_tunnel_index;
            t1 = pool_elt_at_index (gtm->tunnels, tunnel_index1);
 
-           /* Validate GTPU tunnel encap-fib index agaist packet */
+           /* Validate GTPU tunnel encap-fib index against packet */
            if (PREDICT_FALSE (validate_gtpu_fib (b1, t1, is_ip4) == 0))
              {
                error1 = GTPU_ERROR_NO_SUCH_TUNNEL;
@@ -439,7 +439,7 @@ gtpu_input (vlib_main_t * vm,
               tunnel_index1 = last_tunnel_index;
            t1 = pool_elt_at_index (gtm->tunnels, tunnel_index1);
 
-           /* Validate GTPU tunnel encap-fib index agaist packet */
+           /* Validate GTPU tunnel encap-fib index against packet */
            if (PREDICT_FALSE (validate_gtpu_fib (b1, t1, is_ip4) == 0))
              {
                error1 = GTPU_ERROR_NO_SUCH_TUNNEL;
@@ -616,7 +616,7 @@ gtpu_input (vlib_main_t * vm,
               tunnel_index0 = last_tunnel_index;
            t0 = pool_elt_at_index (gtm->tunnels, tunnel_index0);
 
-           /* Validate GTPU tunnel encap-fib index agaist packet */
+           /* Validate GTPU tunnel encap-fib index against packet */
            if (PREDICT_FALSE (validate_gtpu_fib (b0, t0, is_ip4) == 0))
              {
                error0 = GTPU_ERROR_NO_SUCH_TUNNEL;
@@ -666,7 +666,7 @@ gtpu_input (vlib_main_t * vm,
               tunnel_index0 = last_tunnel_index;
            t0 = pool_elt_at_index (gtm->tunnels, tunnel_index0);
 
-           /* Validate GTPU tunnel encap-fib index agaist packet */
+           /* Validate GTPU tunnel encap-fib index against packet */
            if (PREDICT_FALSE (validate_gtpu_fib (b0, t0, is_ip4) == 0))
              {
                error0 = GTPU_ERROR_NO_SUCH_TUNNEL;
@@ -933,8 +933,8 @@ ip_gtpu_bypass_inline (vlib_main_t * vm,
            }
 
          /* Setup packet for next IP feature */
-         vnet_feature_next(vnet_buffer(b0)->sw_if_index[VLIB_RX], &next0, b0);
-         vnet_feature_next(vnet_buffer(b1)->sw_if_index[VLIB_RX], &next1, b1);
+         vnet_feature_next(&next0, b0);
+         vnet_feature_next(&next1, b1);
 
          if (is_ip4)
            {
@@ -1141,7 +1141,7 @@ ip_gtpu_bypass_inline (vlib_main_t * vm,
            ip60 = vlib_buffer_get_current (b0);
 
          /* Setup packet for next IP feature */
-         vnet_feature_next(vnet_buffer(b0)->sw_if_index[VLIB_RX], &next0, b0);
+         vnet_feature_next(&next0, b0);
 
          if (is_ip4)
            /* Treat IP4 frag packets as "experimental" protocol for now