aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk
diff options
context:
space:
mode:
authorSergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>2017-06-07 09:13:06 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-06-07 12:40:44 +0000
commit07950f82ba05ce964fb39da467655cc900660b79 (patch)
tree40a8b8831d1ec5819624e577f327f3e585e610e9 /src/plugins/dpdk
parent7c2ea751992bb6a02b435022224314b943f75d48 (diff)
dpdk: fix ipsec coverity warnings
CID 161044 and 161045 Change-Id: I50a450e231e387f05e354e3b07dc777ab864d018 Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Diffstat (limited to 'src/plugins/dpdk')
-rw-r--r--src/plugins/dpdk/ipsec/esp_encrypt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/dpdk/ipsec/esp_encrypt.c b/src/plugins/dpdk/ipsec/esp_encrypt.c
index f996d7df999..8e948504fbe 100644
--- a/src/plugins/dpdk/ipsec/esp_encrypt.c
+++ b/src/plugins/dpdk/ipsec/esp_encrypt.c
@@ -293,7 +293,8 @@ dpdk_esp_encrypt_node_fn (vlib_main_t * vm,
oh0->esp.seq = clib_net_to_host_u32 (sa0->seq);
}
- if (PREDICT_TRUE (sa0->is_tunnel && !sa0->is_tunnel_ip6))
+ if (PREDICT_TRUE
+ (!is_ipv6 && sa0->is_tunnel && !sa0->is_tunnel_ip6))
{
oh0->ip4.src_address.as_u32 = sa0->tunnel_src_addr.ip4.as_u32;
oh0->ip4.dst_address.as_u32 = sa0->tunnel_dst_addr.ip4.as_u32;
@@ -302,7 +303,7 @@ dpdk_esp_encrypt_node_fn (vlib_main_t * vm,
next0 = ESP_ENCRYPT_NEXT_IP4_LOOKUP;
vnet_buffer (b0)->sw_if_index[VLIB_TX] = (u32) ~ 0;
}
- else if (sa0->is_tunnel && sa0->is_tunnel_ip6)
+ else if (is_ipv6 && sa0->is_tunnel && sa0->is_tunnel_ip6)
{
oh6_0->ip6.src_address.as_u64[0] =
sa0->tunnel_src_addr.ip6.as_u64[0];