summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
authorJukka Rissanen2014-05-27 10:33:22 +0200
committerMarcel Holtmann2014-05-31 06:28:21 +0200
commit62bbd5b35994eaf30519f126765d7f6af9cd3526 (patch)
treea72047de0469280af9320c477367e3788b2dc4a3 /net/bluetooth/l2cap_core.c
parentBluetooth: Fix authentication check for FIPS security level (diff)
downloadkernel-qcow2-linux-62bbd5b35994eaf30519f126765d7f6af9cd3526.tar.gz
kernel-qcow2-linux-62bbd5b35994eaf30519f126765d7f6af9cd3526.tar.xz
kernel-qcow2-linux-62bbd5b35994eaf30519f126765d7f6af9cd3526.zip
Bluetooth: 6LoWPAN: Fix MAC address universal/local bit handling
The universal/local bit handling was incorrectly done in the code. So when setting EUI address from BD address we do this: - If BD address type is PUBLIC, then we clear the universal bit in EUI address. If the address type is RANDOM, then the universal bit is set (BT 6lowpan draft chapter 3.2.2) - After this we invert the universal/local bit according to RFC 2464 When figuring out BD address we do the reverse: - Take EUI address from stateless IPv6 address, invert the universal/local bit according to RFC 2464 - If universal bit is 1 in this modified EUI address, then address type is set to RANDOM, otherwise it is PUBLIC Note that 6lowpan_iphc.[ch] does the final toggling of U/L bit before sending or receiving the network packet. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
0 files changed, 0 insertions, 0 deletions