Re: [PATCH v2] Bluetooth: Add hci_h4p driver

From: Pali RohÃr
Date: Mon Dec 30 2013 - 08:55:26 EST


On Monday 30 December 2013 13:13:50 Pavel Machek wrote:
> > > +
> > > + if (not_valid) {
> > > + dev_info(info->dev, "Valid bluetooth address not
found,
> > > setting some random\n"); + /* When address is not valid,
> > > use some random but Nokia MAC */ + memcpy(info-
>bd_addr,
> > > nokia_oui, 3);
> > > + get_random_bytes(info->bd_addr + 3, 3);
> > > + }
> >
> > This behavior is extremely dangerous. I would rather have
> > the device init or powering on the device fail instead of
> > making up a number that might clash with a real Nokia
> > device.
>
> Perhaps people can donate bt addresses from their
> no-longer-functional bluetooth devices and we can select from
> such pool here? ;-).
>
> Is there some experimental range we can allocate from?
>

Wifi driver wl1251 (it is already in mainline) is doing same:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wireless/ti/wl1251/main.c#n1431

--
Pali RohÃr
pali.rohar@xxxxxxxxx

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