aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_atheros.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-12-18 14:14:54 (GMT)
committerJouni Malinen <j@w1.fi>2009-12-18 14:14:54 (GMT)
commit3b31db5199dba0b3749d92ca4fe6633694711fa8 (patch)
tree66494d74c0467a589e41232e399258bd066b4c4b /src/drivers/driver_atheros.c
parent0e15e529eb201478954c7104ebb22edb7fb4359b (diff)
downloadhostap-3b31db5199dba0b3749d92ca4fe6633694711fa8.zip
hostap-3b31db5199dba0b3749d92ca4fe6633694711fa8.tar.gz
hostap-3b31db5199dba0b3749d92ca4fe6633694711fa8.tar.bz2
Fix netlink payload length calculation
nlmsghdr length needs to be removed from payload length. [Bug 341]
Diffstat (limited to 'src/drivers/driver_atheros.c')
-rw-r--r--src/drivers/driver_atheros.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/driver_atheros.c b/src/drivers/driver_atheros.c
index 7f5f930..8603f34 100644
--- a/src/drivers/driver_atheros.c
+++ b/src/drivers/driver_atheros.c
@@ -952,7 +952,7 @@ madwifi_wireless_event_rtm_newlink(struct madwifi_driver_data *drv,
nlmsg_len = NLMSG_ALIGN(sizeof(struct ifinfomsg));
- attrlen = h->nlmsg_len - nlmsg_len;
+ attrlen = NLMSG_PAYLOAD(h, sizeof(struct ifinfomsg));
if (attrlen < 0)
return;