Skip to content

Commit

Permalink
linux-gen: ipsec: fix error path when pktout queue not found
Browse files Browse the repository at this point in the history
Do not try to send a packet to a pktout using an uninitialized queue
handle when the queue lookup has failed in inline output.

Signed-off-by: Janne Peltonen <[email protected]>
Reviewed-by: Matias Elo <[email protected]>
  • Loading branch information
JannePeltonen authored and MatiasElo committed Jul 19, 2024
1 parent c8b1bdc commit 1bab696
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions platform/linux-generic/odp_ipsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2483,8 +2483,7 @@ static void ipsec_out_inline_finish_packet_proc(odp_packet_t *pkt,
if (!op->op.status.error.all) {
if (odp_pktout_queue(param->pktio, &pkqueue, 1) <= 0)
op->op.status.error.alg = 1;

if (odp_pktout_send(pkqueue, pkt, 1) < 0)
else if (odp_pktout_send(pkqueue, pkt, 1) < 0)
op->op.status.error.alg = 1;
}
}
Expand Down

0 comments on commit 1bab696

Please sign in to comment.