[PATCH] drivers/net/wireless: correct reported ssid lengths
ESSIDs can technically include NULL characters. Drivers should not be adjusting the length of the ESSID before reporting it in their SIOCGIWESSID handlers. Breaks stuff like wpa_supplicant. Note that ipw drivers, which seem to currently be the "most correct", don't have this problem. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
a485cde662
commit
d6a13a24b7
@@ -1718,11 +1718,11 @@ static int atmel_get_essid(struct net_device *dev,
|
||||
if (priv->new_SSID_size != 0) {
|
||||
memcpy(extra, priv->new_SSID, priv->new_SSID_size);
|
||||
extra[priv->new_SSID_size] = '\0';
|
||||
dwrq->length = priv->new_SSID_size + 1;
|
||||
dwrq->length = priv->new_SSID_size;
|
||||
} else {
|
||||
memcpy(extra, priv->SSID, priv->SSID_size);
|
||||
extra[priv->SSID_size] = '\0';
|
||||
dwrq->length = priv->SSID_size + 1;
|
||||
dwrq->length = priv->SSID_size;
|
||||
}
|
||||
|
||||
dwrq->flags = !priv->connect_to_any_BSS; /* active */
|
||||
|
Reference in New Issue
Block a user