examples/ipsec-secgw: fix over MTU packet crash
authorMarcin Smoczynski <marcinx.smoczynski@intel.com>
Tue, 24 Sep 2019 10:55:08 +0000 (12:55 +0200)
committerAkhil Goyal <akhil.goyal@nxp.com>
Wed, 9 Oct 2019 09:50:12 +0000 (11:50 +0200)
commitf46aa9859b3e9a62bded616b126439c1fd60a56c
treec78adcede5a41c9cb55b5c81b668c9db82413417
parent185059c0f3ebdf396aa12877689e51880d47027e
examples/ipsec-secgw: fix over MTU packet crash

When sending an encrypted packet which size after encapsulation exceeds
MTU, ipsec-secgw application tries to fragment it. If --reassemble
option has not been set it results with a segmantation fault, because
fragmentation buckets have not been initialized.

Fix crashing by adding extra check if --ressemble option has not been
set and packet exceeds MTU after encapsulation - drop it.

Fixes: b01d1cd213 ("examples/ipsec-secgw: support fragmentation and reassembly")
Cc: stable@dpdk.org
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
examples/ipsec-secgw/ipsec-secgw.c