Fix coverity issues: ioam

Change-Id: I0963760a7da95612d5cab19596919b369a4d0f8e
Signed-off-by: Shwetha Bhandari <shwethab@cisco.com>
diff --git a/src/plugins/ioam/analyse/ioam_analyse.h b/src/plugins/ioam/analyse/ioam_analyse.h
index a416cb1..d5b6fbe 100644
--- a/src/plugins/ioam/analyse/ioam_analyse.h
+++ b/src/plugins/ioam/analyse/ioam_analyse.h
@@ -131,6 +131,9 @@
   u32 start_time, end_time;
 
   size_of_traceopt_per_node = fetch_trace_data_size (trace->ioam_trace_type);
+  // Unknown trace type
+  if (size_of_traceopt_per_node == 0)
+    return 0;
   size_of_all_traceopts = trace_len;	/*ioam_trace_type,data_list_elts_left */
 
   num_nodes = (u8) (size_of_all_traceopts / size_of_traceopt_per_node);
@@ -140,7 +143,7 @@
   start_elt = trace->elts;
   end_elt =
     trace->elts +
-    (size_of_traceopt_per_node * (num_nodes - 1) / sizeof (u32));
+    (u32) (size_of_traceopt_per_node * (num_nodes - 1) / sizeof (u32));
 
   if (trace->ioam_trace_type & BIT_TTL_NODEID)
     {
@@ -180,6 +183,9 @@
   trace_data = &data->trace_data;
 
   size_of_traceopt_per_node = fetch_trace_data_size (trace->ioam_trace_type);
+  // Unknown trace type
+  if (size_of_traceopt_per_node == 0)
+    goto DONE;
   size_of_all_traceopts = trace_len;
 
   ptr = (u8 *) trace->elts;
@@ -281,7 +287,7 @@
       trace_record->mean_delay =
 	(u32) ((sum + delay) / (data->seqno_data.rx_packets + 1));
     }
-
+DONE:
   *(data->writer_lock) = 0;
   return 0;
 }
diff --git a/src/plugins/ioam/analyse/ioam_summary_export.c b/src/plugins/ioam/analyse/ioam_summary_export.c
index 0056732..afda309 100644
--- a/src/plugins/ioam/analyse/ioam_summary_export.c
+++ b/src/plugins/ioam/analyse/ioam_summary_export.c
@@ -312,7 +312,6 @@
 
 	    tp = vlib_buffer_get_current (b0);
 	    ip = &tp->ip4;
-	    udp = &tp->udp;
 	    h = &tp->ipfix.h;
 	    s = &tp->ipfix.s;
 
@@ -394,6 +393,7 @@
   u32 domain_id = 0;
   flow_report_main_t *frm = &flow_report_main;
 
+  memset (&args, 0, sizeof (args));
   args.rewrite_callback = ioam_template_rewrite;
   args.flow_data_callback = ioam_send_flows;
   del ? (args.is_add = 0) : (args.is_add = 1);
diff --git a/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c b/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
index e51b585..9412885 100644
--- a/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
+++ b/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
@@ -982,15 +982,16 @@
 
   /* We have only one nsh-lisp interface (no NSH virtualization) */
   hip = hash_get (lgm->nsh_ifaces.hw_if_index_by_dp_table, 0);
-  hi = vnet_get_hw_interface (lgm->vnet_main, hip[0]);
-
-  dpo_stack_from_node (hi->tx_node_index, &lfe->nsh.choice, &dpo);
-
+  if (hip)
+    {
+      hi = vnet_get_hw_interface (lgm->vnet_main, hip[0]);
+      dpo_stack_from_node (hi->tx_node_index, &lfe->nsh.choice, &dpo);
+    }
   /* add entry to nsh lisp fib */
   lisp_nsh_fib_add_del_entry (fid_addr_nsh (&lfe->key->rmt),
 			      lfe - lgm->lisp_fwd_entry_pool, 1);
-
   dpo_reset (&dpo);
+
 }
 
 /**