Initialize the 11b presence flag to 0.

There were some cases where it wasn't getting initialized when we set
the PHY to 11b, in addition to the one Pascal found.

Change-Id: I127737cd29dc53c96342364de5cb722b135f23f3
Reviewed-on: https://code.wireshark.org/review/9540
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2015-07-07 09:44:28 -07:00
parent 5b76ef3965
commit 813a1fb5be
4 changed files with 5 additions and 0 deletions

View File

@ -133,6 +133,7 @@ dissect_netmon_802_11(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
case PHY_TYPE_11B:
phdr->phy = PHDR_802_11_PHY_11B;
phdr->phy_info.info_11b.presence_flags = 0;
break;
case PHY_TYPE_11A:

View File

@ -423,11 +423,13 @@ dissect_wlancap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case 4:
phdr.phy = PHDR_802_11_PHY_11B;
phdr.phy_info.info_11b.presence_flags = 0;
break;
case 5:
/* 11b PBCC? */
phdr.phy = PHDR_802_11_PHY_11B;
phdr.phy_info.info_11b.presence_flags = 0;
break;
case 6:

View File

@ -772,6 +772,7 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree
*/
if (vw_chanflags & CHAN_CCK) {
phdr.phy = PHDR_802_11_PHY_11B;
phdr.phy_info.info_11b.presence_flags = 0;
}
phdr.presence_flags |= PHDR_802_11_HAS_DATA_RATE;
phdr.data_rate = tvb_get_letohs(tvb, offset-5) / 5;

View File

@ -177,6 +177,7 @@ commview_read_packet(FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf,
case BAND_11B:
phdr->pseudo_header.ieee_802_11.phy = PHDR_802_11_PHY_11B;
phdr->pseudo_header.ieee_802_11.phy_info.info_11b.presence_flags = 0;
frequency = ieee80211_chan_to_mhz(cv_hdr.channel, TRUE);
break;