Fix TCP/UDP/SCTP conversations broken by g59ef97d and g31ecdf5

Bug: 10336
Change-Id: Ia0dbe3abfade59a1c9714eacd8a854eafa6cf879
Reviewed-on: https://code.wireshark.org/review/3379
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Pascal Quantin 2014-08-03 15:03:50 +02:00 committed by Anders Broman
parent 50b6e16a8e
commit 7a7a72e155
4 changed files with 65 additions and 2 deletions

View File

@ -786,6 +786,27 @@ static const char* sctp_conv_get_filter_type(conv_item_t* conv _U_, conv_filter_
if (filter == CONV_FT_ANY_PORT)
return "sctp.port";
if (filter == CONV_FT_SRC_ADDRESS) {
if (conv->src_address.type == AT_IPv4)
return "ip.src";
if (conv->src_address.type == AT_IPv6)
return "ipv6.src";
}
if (filter == CONV_FT_DST_ADDRESS) {
if (conv->dst_address.type == AT_IPv4)
return "ip.dst";
if (conv->dst_address.type == AT_IPv6)
return "ipv6.dst";
}
if (filter == CONV_FT_ANY_ADDRESS) {
if (conv->src_address.type == AT_IPv4)
return "ip.addr";
if (conv->src_address.type == AT_IPv6)
return "ipv6.addr";
}
return CONV_FILTER_INVALID;
}

View File

@ -536,6 +536,27 @@ static const char* tcp_conv_get_filter_type(conv_item_t* conv _U_, conv_filter_t
if (filter == CONV_FT_ANY_PORT)
return "tcp.port";
if (filter == CONV_FT_SRC_ADDRESS) {
if (conv->src_address.type == AT_IPv4)
return "ip.src";
if (conv->src_address.type == AT_IPv6)
return "ipv6.src";
}
if (filter == CONV_FT_DST_ADDRESS) {
if (conv->dst_address.type == AT_IPv4)
return "ip.dst";
if (conv->dst_address.type == AT_IPv6)
return "ipv6.dst";
}
if (filter == CONV_FT_ANY_ADDRESS) {
if (conv->src_address.type == AT_IPv4)
return "ip.addr";
if (conv->src_address.type == AT_IPv6)
return "ipv6.addr";
}
return CONV_FILTER_INVALID;
}

View File

@ -292,6 +292,27 @@ static const char* udp_conv_get_filter_type(conv_item_t* conv _U_, conv_filter_t
if (filter == CONV_FT_ANY_PORT)
return "udp.port";
if (filter == CONV_FT_SRC_ADDRESS) {
if (conv->src_address.type == AT_IPv4)
return "ip.src";
if (conv->src_address.type == AT_IPv6)
return "ipv6.src";
}
if (filter == CONV_FT_DST_ADDRESS) {
if (conv->dst_address.type == AT_IPv4)
return "ip.dst";
if (conv->dst_address.type == AT_IPv6)
return "ipv6.dst";
}
if (filter == CONV_FT_ANY_ADDRESS) {
if (conv->src_address.type == AT_IPv4)
return "ip.addr";
if (conv->src_address.type == AT_IPv6)
return "ipv6.addr";
}
return CONV_FILTER_INVALID;
}

View File

@ -1606,7 +1606,7 @@ draw_ct_table_addresses(conversations_table *ct)
CONV_COLUMN_SRC_ADDR, get_conversation_address(&conv_item->src_address, ct->resolve_names),
CONV_COLUMN_SRC_PORT, get_conversation_port(conv_item->src_port, conv_item->ptype, ct->resolve_names),
CONV_COLUMN_DST_ADDR, get_conversation_address(&conv_item->dst_address, ct->resolve_names),
CONV_COLUMN_DST_PORT, get_conversation_port(conv_item->src_port, conv_item->ptype, ct->resolve_names),
CONV_COLUMN_DST_PORT, get_conversation_port(conv_item->dst_port, conv_item->ptype, ct->resolve_names),
-1);
iter_valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter);
}
@ -1715,7 +1715,7 @@ draw_ct_table_data(conversations_table *ct)
CONV_COLUMN_SRC_ADDR, get_conversation_address(&conv_item->src_address, ct->resolve_names),
CONV_COLUMN_SRC_PORT, get_conversation_port(conv_item->src_port, conv_item->ptype, ct->resolve_names),
CONV_COLUMN_DST_ADDR, get_conversation_address(&conv_item->dst_address, ct->resolve_names),
CONV_COLUMN_DST_PORT, get_conversation_port(conv_item->src_port, conv_item->ptype, ct->resolve_names),
CONV_COLUMN_DST_PORT, get_conversation_port(conv_item->dst_port, conv_item->ptype, ct->resolve_names),
CONV_COLUMN_PACKETS, conv_item->tx_frames+conv_item->rx_frames,
CONV_COLUMN_BYTES, conv_item->tx_bytes+conv_item->rx_bytes,
CONV_COLUMN_PKT_AB, conv_item->tx_frames,