fixing issue #28, fixing memset operation in send_nl_req.
This commit is contained in:
parent
581725a8dd
commit
28e698cc7f
@ -72,7 +72,7 @@ int send_nl_req(uint16_t msg_type, uint32_t seq,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(nlmsg, 0, sizeof(struct nlmsghdr));
|
memset(nlmsg, 0, NLMSG_SPACE(payload_len));
|
||||||
memcpy(NLMSG_DATA(nlmsg), payload, payload_len);
|
memcpy(NLMSG_DATA(nlmsg), payload, payload_len);
|
||||||
nlmsg->nlmsg_type = msg_type;
|
nlmsg->nlmsg_type = msg_type;
|
||||||
nlmsg->nlmsg_len = NLMSG_LENGTH(payload_len);
|
nlmsg->nlmsg_len = NLMSG_LENGTH(payload_len);
|
||||||
|
Loading…
Reference in New Issue
Block a user