examples/ipsec-secgw: fix no SA found case
authorSergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Thu, 9 Jun 2016 08:42:46 +0000 (09:42 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 21 Jun 2016 10:09:18 +0000 (12:09 +0200)
commit85f847672767062584e0fe9a9b603d90e5b058d0
tree076f053c0d535351825fb74737ab756852c4bee3
parentc64278c0c18bd87242ff3fd12891a095cecdbf58
examples/ipsec-secgw: fix no SA found case

The application only ASSERTS that an SA is not NULL (only when debugging
is enabled) without properly dealing with the case of not having an SA
for the processed packet.

Behavior should be such as if no SA is found, drop the packet.

Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
examples/ipsec-secgw/ipsec.c