aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2014-05-11 15:07:25 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-05-11 17:01:54 +0000
commit98f608cc0ddd5493a18e87ffe09ed551969b8ae3 (patch)
tree73262480e9b0da27362ae9bf332967ab6ed8dbeb /ui/qt
parent44d83c2f4f9256f7436e43dee940c922d864d57d (diff)
Identify client/server by their IP address and port number in follow streams dialog box
This allows to properly identify hosts that use the same port number Change-Id: I93bf5b53e4df1d339fb06b372b90f88fce6785a0 Reviewed-on: https://code.wireshark.org/review/1588 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'ui/qt')
-rw-r--r--ui/qt/follow_stream_dialog.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/ui/qt/follow_stream_dialog.cpp b/ui/qt/follow_stream_dialog.cpp
index 9fbf5ed871..a747b62812 100644
--- a/ui/qt/follow_stream_dialog.cpp
+++ b/ui/qt/follow_stream_dialog.cpp
@@ -1057,7 +1057,9 @@ bool FollowStreamDialog::follow(QString previous_filter, bool use_tcp_index)
if (follow_type_ == FOLLOW_TCP)
{
/* Host 0 --> Host 1 */
- if(sc.src_port == stats.port[0]) {
+ if ((sc.src_port == stats.port[0]) &&
+ ((stats.is_ipv6 && (memcmp(sc.src_addr, stats.ip_address[0], 16) == 0)) ||
+ (!stats.is_ipv6 && (memcmp(sc.src_addr, stats.ip_address[0], 4) == 0)))) {
server_to_client_string =
QString("%1:%2 %3 %4:%5 (%6)")
.arg(hostname0).arg(port0)
@@ -1078,7 +1080,9 @@ bool FollowStreamDialog::follow(QString previous_filter, bool use_tcp_index)
}
/* Host 1 --> Host 0 */
- if(sc.src_port == stats.port[1]) {
+ if ((sc.src_port == stats.port[1]) &&
+ ((stats.is_ipv6 && (memcmp(sc.src_addr, stats.ip_address[1], 16) == 0)) ||
+ (!stats.is_ipv6 && (memcmp(sc.src_addr, stats.ip_address[1], 4) == 0)))) {
client_to_server_string =
QString("%1:%2 %3 %4:%5 (%6)")
.arg(hostname0).arg(port0)
@@ -1101,7 +1105,9 @@ bool FollowStreamDialog::follow(QString previous_filter, bool use_tcp_index)
}
else
{
- if(follow_info_.client_port == stats.port[0]) {
+ if ((follow_info_.client_port == stats.port[0]) &&
+ ((stats.is_ipv6 && (memcmp(follow_info_.client_ip.data, stats.ip_address[0], 16) == 0)) ||
+ (!stats.is_ipv6 && (memcmp(follow_info_.client_ip.data, stats.ip_address[0], 4) == 0)))) {
server_to_client_string =
QString("%1:%2 %3 %4:%5 (%6)")
.arg(hostname0).arg(port0)