aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2011-07-04 14:33:22 +0000
committerAnders Broman <anders.broman@ericsson.com>2011-07-04 14:33:22 +0000
commit4257e61b6c8d496cb0f91a9f3ceaf5ddb551a065 (patch)
tree1e930a87e6a95a2c9b0ac67d68d70b6e31e4db6b
parent639e59a9f90f1f0dc4f673f8b1f37c9d64b84834 (diff)
From Kluchnikov Ivan:
Wireshark cannot decode wimax compressed DL-MAP without FCH burst. Function is_down_link use the base station address (bs_address), which is set in function dissect_wimax_fch_decoder. Changed function is_down_link, it use packet_info->p2p_dir for check if packet is downlink. packet_info->p2p_dir set in GSMTAP. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6066 svn path=/trunk/; revision=37889
-rw-r--r--plugins/wimax/mac_hd_generic_decoder.c6
-rw-r--r--plugins/wimax/packet-wmx.c10
-rw-r--r--plugins/wimax/wimax_pdu_decoder.c4
3 files changed, 11 insertions, 9 deletions
diff --git a/plugins/wimax/mac_hd_generic_decoder.c b/plugins/wimax/mac_hd_generic_decoder.c
index 1ac882f278..506ced6774 100644
--- a/plugins/wimax/mac_hd_generic_decoder.c
+++ b/plugins/wimax/mac_hd_generic_decoder.c
@@ -60,7 +60,7 @@ extern gint mac_sdu_length; /* declared in packet-wmx.c */
extern address bs_address; /* declared in packet-wmx.c */
extern guint max_logical_bands; /* declared in wimax_compact_dlmap_ie_decoder.c */
-extern gboolean is_down_link(address *src_address);/* declared in packet-wmx.c */
+extern gboolean is_down_link(packet_info *pinfo);/* declared in packet-wmx.c */
extern void proto_register_mac_mgmt_msg(void); /* defined in macmgmtmsgdecoder.c */
extern void init_wimax_globals(void); /* defined in msg_ulmap.c */
@@ -862,7 +862,7 @@ void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto
/* if Fast-feedback allocation (DL) subheader or Grant management (UL) subheader is present */
if (ffb_grant_mgmt_subheader)
{ /* check if it is downlink packet */
- if (is_down_link(&(pinfo->src)))
+ if (is_down_link(pinfo))
{ /* Fast-feedback allocation (DL) subheader is present */
/* update the info column */
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Fast-fb subhdr");
@@ -1280,7 +1280,7 @@ static gint extended_subheader_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_
/* decode and display the extended subheader type (MSB) */
proto_tree_add_item(sub_tree, hf_mac_header_generic_ext_subheader_rsv, tvb, (offset+i), 1, FALSE);
/* for downlink */
- if (is_down_link(&(pinfo->src))) /* for downlink */
+ if (is_down_link(pinfo)) /* for downlink */
{ /* decode and display the extended subheader type */
ti = proto_tree_add_item(sub_tree, hf_mac_header_generic_ext_subheader_type_dl, tvb, (offset+i), 1, FALSE);
/* add subtree */
diff --git a/plugins/wimax/packet-wmx.c b/plugins/wimax/packet-wmx.c
index 1a76f3c13d..9e9ece12d6 100644
--- a/plugins/wimax/packet-wmx.c
+++ b/plugins/wimax/packet-wmx.c
@@ -54,7 +54,7 @@ extern void proto_register_wimax_compact_ulmap_ie(void);
/* Global functions */
/* void proto_reg_handoff_wimax(void); */
-gboolean is_down_link(address *src_address);
+gboolean is_down_link(packet_info *pinfo);
/* Global variables */
gint proto_wimax = -1;
@@ -800,11 +800,13 @@ static void dissect_wimax(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *tre
col_clear(pinfo->cinfo, COL_INFO);
}
-gboolean is_down_link(address *src_address)
+gboolean is_down_link(packet_info *pinfo)
{
- if(bs_address.len && !CMP_ADDRESS(&bs_address, src_address))
+ if (pinfo->p2p_dir == P2P_DIR_RECV)
return TRUE;
-
+ if (pinfo->p2p_dir == P2P_DIR_UNKNOWN)
+ if(bs_address.len && !CMP_ADDRESS(&bs_address, &pinfo->src))
+ return TRUE;
return FALSE;
}
diff --git a/plugins/wimax/wimax_pdu_decoder.c b/plugins/wimax/wimax_pdu_decoder.c
index 0874db752c..2c4649ec4e 100644
--- a/plugins/wimax/wimax_pdu_decoder.c
+++ b/plugins/wimax/wimax_pdu_decoder.c
@@ -48,7 +48,7 @@ extern void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo
extern void dissect_mac_header_type_1_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
extern void dissect_mac_header_type_2_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
extern void dissector_wimax_harq_map_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
-extern gboolean is_down_link(address *src_address);
+extern gboolean is_down_link(packet_info *pinfo);
extern gint wimax_decode_dlmap_reduced_aas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree);
extern gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdu_tree);
@@ -130,7 +130,7 @@ static void dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t
}
else if((first_byte & WIMAX_MAP_TYPE_MASK) == WIMAX_COMPRESSED_DL_MAP_IND)
{
- if(is_down_link(&pinfo->src))
+ if(is_down_link(pinfo))
{ /* decode compressed dl-map without mac header */
if ((first_byte & REDUCED_PRIVATE_MAP_MASK) == REDUCED_PRIVATE_MAP_MASK)
{