aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-kerberos.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2004-10-18 13:58:20 +0000
committerGerald Combs <gerald@wireshark.org>2004-10-18 13:58:20 +0000
commitfa01ccd18c08763f444fd88507da7ea579ca5c87 (patch)
tree65212ddb5aa5633683afb559b39caa3f55fe1dd6 /epan/dissectors/packet-kerberos.c
parent04e39c17f19a4bc235d913c889317e6c05c4e4b8 (diff)
One more item from CableLabs: Add conversation support to the Kerberos
UDP dissector. svn path=/trunk/; revision=12337
Diffstat (limited to 'epan/dissectors/packet-kerberos.c')
-rw-r--r--epan/dissectors/packet-kerberos.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/epan/dissectors/packet-kerberos.c b/epan/dissectors/packet-kerberos.c
index 1a8a66a963..bafb11435b 100644
--- a/epan/dissectors/packet-kerberos.c
+++ b/epan/dissectors/packet-kerberos.c
@@ -75,6 +75,7 @@
#include <epan/strutil.h>
+#include <epan/conversation.h>
#include <epan/dissectors/packet-kerberos.h>
#include <epan/dissectors/packet-netbios.h>
#include <epan/dissectors/packet-tcp.h>
@@ -93,6 +94,8 @@
#define UDP_PORT_KERBEROS 88
#define TCP_PORT_KERBEROS 88
+static dissector_handle_t kerberos_handle_udp;
+
/* Desegment Kerberos over TCP messages */
static gboolean krb_desegment = TRUE;
@@ -3611,6 +3614,23 @@ dissect_kerberos_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int d
static void
dissect_kerberos_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
+ conversation_t *conversation;
+
+ /*
+ * UDP replies from the server are sent back to the client's source
+ * port, similar to TFTP.
+ */
+ /* XXX This test may be too general */
+ if (pinfo->destport == UDP_PORT_KERBEROS && pinfo->ptype == PT_UDP) {
+ conversation = find_conversation(&pinfo->src, &pinfo->dst, PT_UDP,
+ pinfo->srcport, 0, NO_PORT_B);
+ if (conversation == NULL) {
+ conversation = conversation_new(&pinfo->src, &pinfo->dst, PT_UDP,
+ pinfo->srcport, 0, NO_PORT2);
+ conversation_set_dissector(conversation, kerberos_handle_udp);
+ }
+ }
+
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "KRB5");
@@ -4234,7 +4254,6 @@ static dcerpc_auth_subdissector_fns gss_kerb_auth_fns = {
void
proto_reg_handoff_kerberos(void)
{
- dissector_handle_t kerberos_handle_udp;
dissector_handle_t kerberos_handle_tcp;
kerberos_handle_udp = create_dissector_handle(dissect_kerberos_udp,