]> The Tcpdump Group git mirrors - tcpdump/commit
Don't hand un-decrypted data to the IP demuxer.
authorGuy Harris <[email protected]>
Fri, 29 Mar 2019 17:52:41 +0000 (10:52 -0700)
committerGuy Harris <[email protected]>
Fri, 29 Mar 2019 17:52:58 +0000 (10:52 -0700)
commitb0acedad189fd00412b56a5e63d6a89930a76830
tree4a42b3ab4778aa326ae6b488c2d73e594c21f3f1
parenta87d6a044893dace0534e91d77ce236a101d5794
Don't hand un-decrypted data to the IP demuxer.

If we can't decrypt the payload, we can't dissect it, so don't try -
just give up immediately.

While we're at it:

If EVP_CIPHER_CTX_new() fails, it means a memory allocation failed;
treat that as such.

Use some of the arguments we're passed rather than re-fetching them from
the IP header.

Add some comments.

Call nd_print_trunc() for failed length sanity checks, and note that
they can fail due to the decryption being done with the wrong key.

Update one test's output; it is, I think, being decrypted with the wrong
key.
print-esp.c
tests/espudp1.out