examples/ipsec-secgw: fix inbound crash
authorSergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Tue, 12 Jul 2016 12:49:35 +0000 (13:49 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 15 Jul 2016 22:11:51 +0000 (00:11 +0200)
commit0a08ab548d1afa15080cdd93edbcd6776b36f4a2
treef530fe55208e9c5bac999b57b5589df79abaeffd
parent6dad6e692bd74ea8ade42dd3c8a27264027c659c
examples/ipsec-secgw: fix inbound crash

When sending Inbound non IPSec traffic that matches an Inbound Security
Policy set to Protect, the code will check that the SPI of the packet
and the associated Security Association match.

That check should only be done for IPSec packets and results in SEGFAULT
when done on non IPSec packets.

Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
examples/ipsec-secgw/ipsec-secgw.c