diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2014-08-05 21:09:54 +0200 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2014-08-05 19:53:06 +0000 |
commit | dfe331e35e0400942d3ad9e4b5f8c84369546b6d (patch) | |
tree | ee49ef402b87f304df69ac368d3a5d61f897a20d /epan/dissectors/packet-tftp.c | |
parent | 7f030bb0659b92dc29218ccc1ac8cf2ec41b46f5 (diff) |
we may set a TFTP port via Decode As
take this setting into account when we try to detect the first packet of
a tftp transfer
Change-Id: Ia80f9b5f994b02ecaaa063308b1a87d00fe0dafe
Reviewed-on: https://code.wireshark.org/review/3450
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan/dissectors/packet-tftp.c')
-rw-r--r-- | epan/dissectors/packet-tftp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/dissectors/packet-tftp.c b/epan/dissectors/packet-tftp.c index d690169af6..18da7b148c 100644 --- a/epan/dissectors/packet-tftp.c +++ b/epan/dissectors/packet-tftp.c @@ -497,8 +497,9 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * came; all subsequent packets go between those two IP addresses * and ports. * - * If this packet went to the TFTP port, we check to see if - * there's already a conversation with one address/port pair + * If this packet went to the TFTP port (either to one of the ports + * set in the preferences or to a port set via Decode As), we check + * to see if there's already a conversation with one address/port pair * matching the source IP address and port of this packet, * the other address matching the destination IP address of this * packet, and any destination port. @@ -508,7 +509,8 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * the destination address of this packet, and its port 2 being * wildcarded, and give it the TFTP dissector as a dissector. */ - if (value_is_in_range(global_tftp_port_range, pinfo->destport)) { + if (value_is_in_range(global_tftp_port_range, pinfo->destport) || + (pinfo->match_uint == pinfo->destport)) { conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_UDP, pinfo->srcport, 0, NO_PORT_B); if( (conversation == NULL) || (conversation->dissector_handle != tftp_handle) ){ |