ipsec: fix trace of GRE_teb packets 61/28661/3
authorChristian Hopps <chopps@labn.net>
Tue, 25 Aug 2020 16:40:40 +0000 (12:40 -0400)
committerNeale Ranns <nranns@cisco.com>
Fri, 4 Sep 2020 11:56:06 +0000 (11:56 +0000)
commitd570e53c74306d3aa237acbd56357a85b9d693a3
tree365122d4f84ab913006b40a88ba9a1e141ba2ee8
parent99975388a2106e65965a7661ac21a34af288aa7b
ipsec: fix trace of GRE_teb packets

The issue is not easily hit. When GRE_teb packets are received the post
crypto processing adjusts the l2.l2_len value in the vnet_buffer opaque
data. This is overwriting the ipsec opaque data. Later the trace code
fetches the sa_index from the ipsec opaque data. It's just an accident
that this currently works, if the ipsec data is changed so that the
sa_index moves around it will be overwritten by the l2_len modification.
Indeed, this was found b/c local development changes had moved the
sa_index so it was over-lapping with the l2_len memory space, and the UT
failed.

Type: fix
Change-Id: Iaecfa750cf0b36653fd9e75b4d799f323a14d932
Signed-off-by: Christian Hopps <chopps@labn.net>
src/vnet/ipsec/esp_decrypt.c