forked from osmocom/wireshark
Repair "Follow TCP Stream" which got broken by my change in SVN 38056
Mental note: Try to not do half work ;-) svn path=/trunk/; revision=38065
This commit is contained in:
parent
246d94edb2
commit
796564ed90
|
@ -4201,7 +4201,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if (tcph->th_have_seglen) {
|
||||
if( data_out_file ) {
|
||||
reassemble_tcp( conv->index, /* conversation index */
|
||||
reassemble_tcp( tcpd->stream, /* tcp stream index */
|
||||
tcph->th_seq, /* sequence number */
|
||||
tcph->th_ack, /* acknowledgement number */
|
||||
tcph->th_seglen, /* data length */
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include <glib.h>
|
||||
#include <epan/packet.h>
|
||||
#include <epan/ipproto.h>
|
||||
#include <epan/dissectors/packet-tcp.h>
|
||||
#include "follow.h"
|
||||
#include <epan/conversation.h>
|
||||
|
||||
|
@ -87,16 +88,28 @@ build_follow_filter( packet_info *pi ) {
|
|||
char* buf;
|
||||
int len;
|
||||
conversation_t *conv=NULL;
|
||||
struct tcp_analysis *tcpd;
|
||||
|
||||
if( pi->net_src.type == AT_IPv4 && pi->net_dst.type == AT_IPv4
|
||||
if( ((pi->net_src.type == AT_IPv4 && pi->net_dst.type == AT_IPv4) ||
|
||||
(pi->net_src.type == AT_IPv6 && pi->net_dst.type == AT_IPv6))
|
||||
&& pi->ipproto == IP_PROTO_TCP
|
||||
&& (conv=find_conversation(pi->fd->num, &pi->src, &pi->dst, pi->ptype,
|
||||
pi->srcport, pi->destport, 0)) != NULL ) {
|
||||
/* TCP over IPv4 */
|
||||
buf = g_strdup_printf("tcp.stream eq %d", conv->index);
|
||||
len = 4;
|
||||
is_ipv6 = FALSE;
|
||||
tcp_stream_to_follow = conv->index;
|
||||
tcpd=get_tcp_conversation_data(conv, pi);
|
||||
if (tcpd) {
|
||||
buf = g_strdup_printf("tcp.stream eq %d", tcpd->stream);
|
||||
tcp_stream_to_follow = tcpd->stream;
|
||||
if (pi->net_src.type == AT_IPv4) {
|
||||
len = 4;
|
||||
is_ipv6 = FALSE;
|
||||
} else {
|
||||
len = 16;
|
||||
is_ipv6 = TRUE;
|
||||
}
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else if( pi->net_src.type == AT_IPv4 && pi->net_dst.type == AT_IPv4
|
||||
&& pi->ipproto == IP_PROTO_UDP ) {
|
||||
|
@ -109,16 +122,6 @@ build_follow_filter( packet_info *pi ) {
|
|||
len = 4;
|
||||
is_ipv6 = FALSE;
|
||||
}
|
||||
else if( pi->net_src.type == AT_IPv6 && pi->net_dst.type == AT_IPv6
|
||||
&& pi->ipproto == IP_PROTO_TCP
|
||||
&& (conv=find_conversation(pi->fd->num, &pi->src, &pi->dst, pi->ptype,
|
||||
pi->srcport, pi->destport, 0)) != NULL ) {
|
||||
/* TCP over IPv6 */
|
||||
buf = g_strdup_printf("tcp.stream eq %d", conv->index);
|
||||
len = 16;
|
||||
is_ipv6 = TRUE;
|
||||
tcp_stream_to_follow = conv->index;
|
||||
}
|
||||
else if( pi->net_src.type == AT_IPv6 && pi->net_dst.type == AT_IPv6
|
||||
&& pi->ipproto == IP_PROTO_UDP ) {
|
||||
/* UDP over IPv6 */
|
||||
|
|
Loading…
Reference in New Issue