P2P: Filter control chars in group client device name similarly to peer
P2P device discovery can add peer entries based on a message directly from a peer and from a Probe Response frame from a GO for all the P2P Clients in the group. The former case for filtering out control characters from the device name while the latter was not. Make this consistent and filter both cases in the same way to avoid confusing external programs using the device name of a P2P peer. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
f67d1a0099
commit
5d1d69a10f
3 changed files with 25 additions and 11 deletions
|
@ -445,8 +445,9 @@ static struct p2p_device * p2p_create_device(struct p2p_data *p2p,
|
|||
static void p2p_copy_client_info(struct p2p_device *dev,
|
||||
struct p2p_client_info *cli)
|
||||
{
|
||||
os_memcpy(dev->info.device_name, cli->dev_name, cli->dev_name_len);
|
||||
dev->info.device_name[cli->dev_name_len] = '\0';
|
||||
p2p_copy_filter_devname(dev->info.device_name,
|
||||
sizeof(dev->info.device_name),
|
||||
cli->dev_name, cli->dev_name_len);
|
||||
dev->info.dev_capab = cli->dev_capab;
|
||||
dev->info.config_methods = cli->config_methods;
|
||||
os_memcpy(dev->info.pri_dev_type, cli->pri_dev_type, 8);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue