eap: fix EAPOL conversation tracking, fixes TLS decryption
authorPeter Wu <peter@lekensteyn.nl>
Wed, 14 Sep 2016 17:45:50 +0000 (19:45 +0200)
committerAnders Broman <a.broman58@gmail.com>
Thu, 15 Sep 2016 04:25:08 +0000 (04:25 +0000)
commitf2e79776a78ad245c3fa0e079601f5ea7b9cce2f
treeee875bea2e8ca54e6caa4cb44d7bfede8301c461
parente8e193694a35779eaf506120ecd2567c98f652ac
eap: fix EAPOL conversation tracking, fixes TLS decryption

Use new heuristics based on the EAP Code field to determine whether a
field originates from the client or server. This is more reliable than
using "pinfo->match_uint" for two reasons: (1) the heuristics dissector
does not set "match_uint" (resulting in an arbitrary match on the
previous value) and (2) with EAP over EAPOL, there is no matching port
number (resulting in two conversations with different addresses and port
number zero).

To fix TLS decryption, make sure to create a single conversation for
both direction and allow the port type to be PT_NONE (to avoid reporting
all packets as originating from the server).

Bug: 12879
Change-Id: I7b4267a27ffcf68bf9d3f6a90d6e6e2093733f51
Reviewed-on: https://code.wireshark.org/review/17703
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
epan/dissectors/packet-eap.c
epan/dissectors/packet-ssl-utils.c