Fix netlink payload length calculation

nlmsghdr length needs to be removed from payload length. [Bug 341]
This commit is contained in:
Jouni Malinen 2009-12-18 16:14:54 +02:00 committed by Jouni Malinen
parent 0e15e529eb
commit 3b31db5199
7 changed files with 13 additions and 10 deletions

View file

@ -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;