ieee80211: fix "INVALID" label in Endpoints dialog

Problem: the "Apply as filter" option in the Endpoints dialog creates
the "INVALID==11:22:33:44:55:66" filter for IEEE 802.11 packets.

Since dissect_ieee80211_common initialises the address "whdr->src" and
"whdr->dst" fields using the "wlan_address_type" type, we have to do the
same in "wlan_host_get_filter_type". While at it, remove the check for
AT_ETHER since these will never match.

Change-Id: I43f9298adfa406ea37a383187137e3e0c1f8733d
Reviewed-on: https://code.wireshark.org/review/21015
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
Peter Wu 2017-04-11 16:21:55 +02:00
parent 75d40599b0
commit ccdb9073cd
1 changed files with 4 additions and 4 deletions

View File

@ -5213,13 +5213,13 @@ static const value_string ff_psmp_sta_info_flags[] = {
static const char*
wlan_conv_get_filter_type(conv_item_t* conv, conv_filter_type_e filter)
{
if ((filter == CONV_FT_SRC_ADDRESS) && ((conv->src_address.type == AT_ETHER) || (conv->src_address.type == wlan_address_type)))
if ((filter == CONV_FT_SRC_ADDRESS) && (conv->src_address.type == wlan_address_type))
return "wlan.sa";
if ((filter == CONV_FT_DST_ADDRESS) && ((conv->dst_address.type == AT_ETHER) || (conv->dst_address.type == wlan_address_type)))
if ((filter == CONV_FT_DST_ADDRESS) && (conv->dst_address.type == wlan_address_type))
return "wlan.da";
if ((filter == CONV_FT_ANY_ADDRESS) && ((conv->src_address.type == AT_ETHER) || (conv->src_address.type == wlan_address_type)))
if ((filter == CONV_FT_ANY_ADDRESS) && (conv->src_address.type == wlan_address_type))
return "wlan.addr";
return CONV_FILTER_INVALID;
@ -5241,7 +5241,7 @@ wlan_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
static const char*
wlan_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
{
if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == AT_ETHER))
if ((filter == CONV_FT_ANY_ADDRESS) && (host->myaddress.type == wlan_address_type))
return "wlan.addr";
return CONV_FILTER_INVALID;