aboutsummaryrefslogtreecommitdiff
path: root/example/ipsec_crypto/odp_ipsec.c
diff options
context:
space:
mode:
Diffstat (limited to 'example/ipsec_crypto/odp_ipsec.c')
-rw-r--r--example/ipsec_crypto/odp_ipsec.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/example/ipsec_crypto/odp_ipsec.c b/example/ipsec_crypto/odp_ipsec.c
index c5dd7398e..dc56d671d 100644
--- a/example/ipsec_crypto/odp_ipsec.c
+++ b/example/ipsec_crypto/odp_ipsec.c
@@ -714,12 +714,9 @@ pkt_disposition_e do_ipsec_in_finish(odp_packet_t pkt,
odp_crypto_result(&result, pkt);
/* Check crypto result */
- if (!result.ok) {
- if (!is_crypto_op_status_ok(&result.cipher_status))
- return PKT_DROP;
- if (!is_crypto_op_status_ok(&result.auth_status))
- return PKT_DROP;
- }
+ if (!result.ok)
+ return PKT_DROP;
+
ip = (odph_ipv4hdr_t *)odp_packet_l3_ptr(pkt, NULL);
/*
@@ -1025,12 +1022,9 @@ pkt_disposition_e do_ipsec_out_finish(odp_packet_t pkt,
odp_crypto_result(&result, pkt);
/* Check crypto result */
- if (!result.ok) {
- if (!is_crypto_op_status_ok(&result.cipher_status))
- return PKT_DROP;
- if (!is_crypto_op_status_ok(&result.auth_status))
- return PKT_DROP;
- }
+ if (!result.ok)
+ return PKT_DROP;
+
ip = (odph_ipv4hdr_t *)odp_packet_l3_ptr(pkt, NULL);
/* Finalize the IPv4 header */