nat: use correct data types for memory sizes
[vpp.git] / src / plugins / srv6-mobile / gtp4_dt.c
index 76525c2..44a4af3 100644 (file)
@@ -95,7 +95,8 @@ clb_unformat_srv6_t_m_gtp4_dt (unformat_input_t * input, va_list * args)
 {
   void **plugin_mem_p = va_arg (*args, void **);
   srv6_t_gtp4_dt_param_t *ls_mem;
-  u32 fib_index = 0, local_fib_index = 0;
+  u32 fib_index = 0;
+  u32 local_fib_index = 0;
   u32 type;
 
   if (unformat (input, "t.m.gtp4.dt4 fib-table %u", &fib_index))
@@ -123,8 +124,12 @@ clb_unformat_srv6_t_m_gtp4_dt (unformat_input_t * input, va_list * args)
 
   ls_mem->fib4_index = fib_table_find (FIB_PROTOCOL_IP4, fib_index);
   ls_mem->fib6_index = fib_table_find (FIB_PROTOCOL_IP6, fib_index);
-  ls_mem->local_fib_index =
-    fib_table_find (FIB_PROTOCOL_IP6, local_fib_index);
+
+  if (type == SRV6_GTP4_DT6 || type == SRV6_GTP4_DT46)
+    {
+      ls_mem->local_fib_index =
+       fib_table_find (FIB_PROTOCOL_IP6, local_fib_index);
+    }
 
   ls_mem->type = type;