summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorMarco Varlese <marco.varlese@suse.com>2017-11-27 16:46:04 +0100
committerChris Luke <chris_luke@comcast.com>2017-11-27 18:48:14 +0000
commit7af4a57e7824c850f28a3cc5b4451a9e9baad068 (patch)
tree2e1aa8e1e5bff498197e542d24b7819b96a5ce2b /src/vnet
parent1d781558da28f72f5233c09835663aa3b42e2d97 (diff)
Address COVERITY warnings
Among many false positives the potential NULL pointer dereference seems to be a valid one hence addressing that with this patch. Change-Id: Ia55784475294e96f60df64baf8820b459bb85bb7 Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/geneve/encap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/geneve/encap.c b/src/vnet/geneve/encap.c
index 59d5c96c974..e9e7e5b9faf 100644
--- a/src/vnet/geneve/encap.c
+++ b/src/vnet/geneve/encap.c
@@ -153,6 +153,9 @@ geneve_encap_inline (vlib_main_t * vm,
/* Note: change to always set next0 if it may be set to drop */
next0 = t0->next_dpo.dpoi_next_node;
}
+
+ ASSERT (t0 != NULL);
+
vnet_buffer (b0)->ip.adj_index[VLIB_TX] = t0->next_dpo.dpoi_index;
/* Get next node index and adj index from tunnel next_dpo */
@@ -164,6 +167,9 @@ geneve_encap_inline (vlib_main_t * vm,
/* Note: change to always set next1 if it may be set to drop */
next1 = t1->next_dpo.dpoi_next_node;
}
+
+ ASSERT (t1 != NULL);
+
vnet_buffer (b1)->ip.adj_index[VLIB_TX] = t1->next_dpo.dpoi_index;
/* Apply the rewrite string. $$$$ vnet_rewrite? */