ipsec: Don't include ICV in decrypted data with ESP NULL

ESP NULL can be used with a non NULL AUTH, when wishing to
provide authentication without encryption.

Part of #13730
This commit is contained in:
John Thacker 2022-08-04 19:24:03 -04:00
parent baf61478e4
commit 5f05a705a6
1 changed files with 3 additions and 3 deletions

View File

@ -1863,10 +1863,10 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
esp_block_len = 1;
/* Allocate buffer for decrypted data */
esp_decr_data = (guint8 *)wmem_alloc(wmem_packet_scope(), esp_encr_data_len);
esp_decr_data_len = esp_encr_data_len;
esp_decr_data_len = esp_encr_data_len - esp_icv_len;
esp_decr_data = (guint8 *)wmem_alloc(wmem_packet_scope(), esp_decr_data_len);
tvb_memcpy(tvb, esp_decr_data, ESP_HEADER_LEN, esp_encr_data_len);
tvb_memcpy(tvb, esp_decr_data, ESP_HEADER_LEN, esp_decr_data_len);
decrypt_ok = TRUE;