aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tcp.c
diff options
context:
space:
mode:
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2009-11-16 21:26:55 +0000
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2009-11-16 21:26:55 +0000
commitfc275c8d30e8922088ac4b447309aba2aabe3df5 (patch)
tree298d57e01aa75177c91e8c55e86564f891aa76f9 /epan/dissectors/packet-tcp.c
parent495f0c4d8a3854f71adc9b28405c64b9338c9360 (diff)
dont print the window size for the initial SYN packet
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30979 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-tcp.c')
-rw-r--r--epan/dissectors/packet-tcp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index f411d3a258..e45cd3a401 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -3266,10 +3266,12 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tf_rst = proto_tree_add_boolean(field_tree, hf_tcp_flags_reset, tvb, offset + 13, 1, tcph->th_flags);
tf_syn = proto_tree_add_boolean(field_tree, hf_tcp_flags_syn, tvb, offset + 13, 1, tcph->th_flags);
tf_fin = proto_tree_add_boolean(field_tree, hf_tcp_flags_fin, tvb, offset + 13, 1, tcph->th_flags);
- if(tcp_relative_seq && tcph->th_win!=real_window) {
- proto_tree_add_uint_format(tcp_tree, hf_tcp_window_size, tvb, offset + 14, 2, tcph->th_win, "Window size: %u (scaled)", tcph->th_win);
- } else {
- proto_tree_add_uint(tcp_tree, hf_tcp_window_size, tvb, offset + 14, 2, real_window);
+ if (tcph->th_flags & TH_ACK) {
+ if(tcp_relative_seq && tcph->th_win!=real_window) {
+ proto_tree_add_uint_format(tcp_tree, hf_tcp_window_size, tvb, offset + 14, 2, tcph->th_win, "Window size: %u (scaled)", tcph->th_win);
+ } else {
+ proto_tree_add_uint(tcp_tree, hf_tcp_window_size, tvb, offset + 14, 2, real_window);
+ }
}
}