aboutsummaryrefslogtreecommitdiffstats
path: root/packet-tcp.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-03-27 11:53:21 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-03-27 11:53:21 +0000
commit3f1bd3d4074e5e01eb06e9ace5b1f1b18bc24ab0 (patch)
tree8c8d64cef01eec8d5583170dd05d43ca0e49d439 /packet-tcp.c
parente6627950fd6770f67261f79003a0be04713d73a8 (diff)
From Ronnie Sahlberg: RST and FIN segments are neither zero-window
packets nor duplicate ACKs. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10506 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-tcp.c')
-rw-r--r--packet-tcp.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/packet-tcp.c b/packet-tcp.c
index 65b4500858..309352924a 100644
--- a/packet-tcp.c
+++ b/packet-tcp.c
@@ -1,7 +1,7 @@
/* packet-tcp.c
* Routines for TCP packet disassembly
*
- * $Id: packet-tcp.c,v 1.224 2004/03/19 06:14:03 guy Exp $
+ * $Id: packet-tcp.c,v 1.225 2004/03/27 11:53:21 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1036,8 +1036,11 @@ ack_finished:
/* ok we have found a potential duplicate ack */
struct tcp_acked *ta;
ta=tcp_analyze_get_acked_struct(pinfo->fd->num, TRUE);
- /* keepalives are not dupacks */
- if( (!(ta->flags&TCP_A_KEEP_ALIVE)) ){
+ /* keepalives are not dupacks and
+ * netiher are RST/FIN segments
+ */
+ if( (!(ta->flags&TCP_A_KEEP_ALIVE))
+ &&(!(flags&(TH_RST|TH_FIN))) ){
ta->flags|=TCP_A_DUPLICATE_ACK;
ta->dupack_num=num2_acks-1;
ta->dupack_frame=ack2_frame;
@@ -1076,8 +1079,12 @@ ack_finished:
}
}
- /* check for zero window */
- if(!window){
+ /* check for zero window
+ * dont check for RST/FIN segments since the window field is
+ * meaningless for those
+ */
+ if( (!window)
+ &&(!(flags&(TH_RST|TH_FIN))) ){
struct tcp_acked *ta;
ta=tcp_analyze_get_acked_struct(pinfo->fd->num, TRUE);
ta->flags|=TCP_A_ZERO_WINDOW;