Fix netlink payload length calculation
nlmsghdr length needs to be removed from payload length. [Bug 341]
This commit is contained in:
parent
0e15e529eb
commit
3b31db5199
7 changed files with 13 additions and 10 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue