aboutsummaryrefslogtreecommitdiffstats
path: root/packet-tcp.c
diff options
context:
space:
mode:
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2003-08-29 11:15:13 +0000
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2003-08-29 11:15:13 +0000
commite3b7deba8f83ba24fc937cfc6d36f88d8bd260f4 (patch)
tree22aeccb2a805280859a6f0f0bfa0a372c3308225 /packet-tcp.c
parent71d090981c333c96fd7aa038baf44e4002062166 (diff)
If the FIN flag is set it is NOT a keepalive
fix small typo git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8311 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-tcp.c')
-rw-r--r--packet-tcp.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/packet-tcp.c b/packet-tcp.c
index 34b1eebab4..79f2993aa4 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.202 2003/08/28 03:35:23 guy Exp $
+ * $Id: packet-tcp.c,v 1.203 2003/08/29 11:15:13 sahlberg Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -586,7 +586,7 @@ tcp_analyze_sequence_number(packet_info *pinfo, guint32 seq, guint32 ack, guint3
goto seq_finished;
}
- /* keep-alives are empty semgents with a sequence number -1 of what
+ /* keep-alives are empty segments with a sequence number -1 of what
* we would expect.
*
* Solaris is an exception, Solaris does not really use KeepAlives
@@ -604,11 +604,13 @@ tcp_analyze_sequence_number(packet_info *pinfo, guint32 seq, guint32 ack, guint3
* , brilliant)
*/
if( (seglen<=1) && EQ_SEQ(seq, (ual1->nextseq-1)) ){
- struct tcp_acked *ta;
-
- ta=tcp_analyze_get_acked_struct(pinfo->fd->num, TRUE);
- ta->flags|=TCP_A_KEEP_ALIVE;
- goto seq_finished;
+ if(!(flags&TH_FIN)){ /* FIN segments are not keepalives */
+ struct tcp_acked *ta;
+
+ ta=tcp_analyze_get_acked_struct(pinfo->fd->num, TRUE);
+ ta->flags|=TCP_A_KEEP_ALIVE;
+ goto seq_finished;
+ }
}