Search Linux Wireless

warning in ieee80211 tkip code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



net/ieee80211/ieee80211_crypt_tkip.c: In function 'michael_mic_hdr':
net/ieee80211/ieee80211_crypt_tkip.c:587: warning: overflow in implicit
constant conversion

The reason is pretty obvious:
hdr[12] = qoshdr->qos_ctl & cpu_to_le16(IEEE80211_QCTL_TID);

where IEEE80211_QCTL_TID is 0xF, so that's made into 0xF00 on BE and
then truncated to 0x00. Not very useful.

This was introduced in this commit:

commit 65b6a2775102cd81e57158ef4b1cb89641f76cfd
Author: Zhu Yi <yi.zhu@xxxxxxxxx>
Date:   Mon Aug 21 11:32:31 2006 +0800

with the change

-               hdr[12] = le16_to_cpu(qoshdr->qos_ctl) & IEEE80211_QCTL_TID;
+               hdr[12] = qoshdr->qos_ctl & cpu_to_le16(IEEE80211_QCTL_TID);

The code before the change looks much saner since you're accessing the
header as bytes...

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux