aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_atheros.c
diff options
context:
space:
mode:
authorSubrat Dash <sdash@qca.qualcomm.com>2011-09-22 12:42:03 (GMT)
committerJouni Malinen <j@w1.fi>2011-09-22 12:42:03 (GMT)
commit6a5200e6997d85e4874f35a250c655e2110539a7 (patch)
tree1bef793f1dd35ec9dfeb0ca2afb3e7dad07ff0fb /src/drivers/driver_atheros.c
parent97a8cbb88d2985ecd886d3bc56caa728c1ca1117 (diff)
downloadhostap-6a5200e6997d85e4874f35a250c655e2110539a7.zip
hostap-6a5200e6997d85e4874f35a250c655e2110539a7.tar.gz
hostap-6a5200e6997d85e4874f35a250c655e2110539a7.tar.bz2
atheros: Fix WEXT SIOCGIWESSID use with WE-21 and newer
The "too long" buffer (32+1 octets) prevented AP from starting up with 32 octet SSID with WE-21 and newer. Fix this by reducing the SIOCGIWESSID buffer length.
Diffstat (limited to 'src/drivers/driver_atheros.c')
-rw-r--r--src/drivers/driver_atheros.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drivers/driver_atheros.c b/src/drivers/driver_atheros.c
index 0587050..27ea18f 100644
--- a/src/drivers/driver_atheros.c
+++ b/src/drivers/driver_atheros.c
@@ -1334,6 +1334,8 @@ atheros_get_ssid(void *priv, u8 *buf, int len)
os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
iwr.u.essid.pointer = (caddr_t) buf;
iwr.u.essid.length = len;
+ iwr.u.essid.length = (len > IW_ESSID_MAX_SIZE) ?
+ IW_ESSID_MAX_SIZE : len;
if (ioctl(drv->ioctl_sock, SIOCGIWESSID, &iwr) < 0) {
perror("ioctl[SIOCGIWESSID]");