aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tcp.c
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2016-02-01 13:00:29 +0100
committerAnders Broman <a.broman58@gmail.com>2016-02-02 05:15:55 +0000
commitf80e9df7939be9d88062718d6c15fa2983e5e605 (patch)
tree5c77f37e767b568e7881c06d55ecb062e205e17e /epan/dissectors/packet-tcp.c
parent872f8b45826d2bd0fe5b87a23516f82d926f2944 (diff)
Create an extended converstaion hastable taking more address information
into consideration. This makes it possible to differentiate between packets on different vlans and can be expanded to handle tunnels. Change-Id: Id36e71028702d1ba4b6b3047e822e5a62056a1e2 Reviewed-on: https://code.wireshark.org/review/13637 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-tcp.c')
-rw-r--r--epan/dissectors/packet-tcp.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index e3617fbf7d..6437e4cea5 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -948,7 +948,7 @@ get_tcp_conversation_data(conversation_t *conv, packet_info *pinfo)
/* If the caller didn't supply a conversation, don't
* clear the analysis, it may be needed */
clear_ta = FALSE;
- conv = find_or_create_conversation(pinfo);
+ conv = find_or_create_conversation_ext(pinfo, USE_EXT_ADDRESS_INF);
}
/* Get the data for this conversation */
@@ -5014,9 +5014,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
* in case a new conversation is found and the previous conversation needs
* to be adjusted,
*/
- if((conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0)) != NULL) {
+ if((conv = find_conversation_ext_from_pinfo(pinfo)) != NULL) {
/* Update how far the conversation reaches */
if (pinfo->num > conv->last_frame) {
save_last_frame = conv->last_frame;
@@ -5024,9 +5022,9 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
}
}
else {
- conv = conversation_new(pinfo->num, &pinfo->src,
+ conv = conversation_new_ext(pinfo->num, &pinfo->src,
&pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
+ pinfo->srcport, pinfo->destport, pinfo, USE_EXT_ADDRESS_INF);
}
tcpd=get_tcp_conversation_data(conv,pinfo);
@@ -5046,7 +5044,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (save_last_frame > 0)
conv->last_frame = save_last_frame;
- conv=conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conv= conversation_new_ext(pinfo->num, &pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, pinfo, USE_EXT_ADDRESS_INF);
tcpd=get_tcp_conversation_data(conv,pinfo);
}
if(!tcpd->ta)
@@ -5070,7 +5068,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
conv->last_frame = save_last_frame;
}
- other_conv = find_conversation(pinfo->num, &pinfo->dst, &pinfo->src, pinfo->ptype, pinfo->destport, pinfo->srcport, 0);
+ other_conv = find_conversation_ext_from_pinfo(pinfo);
if (other_conv != NULL)
{
conv = other_conv;