Commit 78a7b2a8 authored by Bongsu Jeon's avatar Bongsu Jeon Committed by David S. Miller

selftests: nci: Fix the code for next nlattr offset

nlattr could have a padding for 4 bytes alignment. So next nla's offset
should be calculated with a padding.
Signed-off-by: default avatarBongsu Jeon <bongsu.jeon@samsung.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 366f6edf
......@@ -113,8 +113,8 @@ static int send_cmd_mt_nla(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
if (nla_len > 0)
memcpy(NLA_DATA(na), nla_data[cnt], nla_len[cnt]);
msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len);
prv_len = na->nla_len;
prv_len = NLA_ALIGN(nla_len[cnt]) + NLA_HDRLEN;
msg.n.nlmsg_len += prv_len;
}
buf = (char *)&msg;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment