diff options
author | Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> | 2017-06-07 09:13:06 +0100 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2017-06-07 12:40:44 +0000 |
commit | 07950f82ba05ce964fb39da467655cc900660b79 (patch) | |
tree | 40a8b8831d1ec5819624e577f327f3e585e610e9 /src | |
parent | 7c2ea751992bb6a02b435022224314b943f75d48 (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')
-rw-r--r-- | src/plugins/dpdk/ipsec/esp_encrypt.c | 5 |
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]; |