diff options
author | Jörg Mayer <jmayer@loplof.de> | 2007-01-26 08:09:20 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2007-01-26 08:09:20 +0000 |
commit | 7280702537491baecedd52ae6457e97d1c78d9cc (patch) | |
tree | 9e9983b5b9c7fca036e73da7bf82337511072a78 | |
parent | 065e9f88e54aa837270ec0bd2d499c977dda3007 (diff) |
If there is just a tftp response without a prior request,
dissection would fail with dissector assert.
svn path=/trunk/; revision=20562
-rw-r--r-- | epan/dissectors/packet-tftp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/epan/dissectors/packet-tftp.c b/epan/dissectors/packet-tftp.c index c90eec5413..779e6b03b1 100644 --- a/epan/dissectors/packet-tftp.c +++ b/epan/dissectors/packet-tftp.c @@ -158,7 +158,7 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree *tftp_tree = NULL; proto_item *ti; - conversation_t *conversation; + conversation_t *conversation = NULL; gint offset = 0; guint16 opcode; guint16 bytes; @@ -196,7 +196,11 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0); - DISSECTOR_ASSERT(conversation); + if( (conversation == NULL) || (conversation->dissector_handle!=tftp_handle) ){ + conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_UDP, + pinfo->destport, pinfo->srcport, 0); + conversation_set_dissector(conversation, tftp_handle); + } } tftp_info = conversation_get_proto_data(conversation, proto_tftp); if (!tftp_info) { |