summaryrefslogtreecommitdiffstats
path: root/net/netlink/af_netlink.c
diff options
context:
space:
mode:
authorJohn Fastabend <john.r.fastabend@intel.com>2009-09-25 13:11:44 +0000
committerDavid S. Miller <davem@davemloft.net>2009-09-26 20:16:11 -0700
commit5dba93aedfc6906b27791c4a1136b177beae25b7 (patch)
tree2d2493187f430245110bd640c8a5c990aaf865d7 /net/netlink/af_netlink.c
parentfc482cc54e56bde012585905eb0f3565bec18ff5 (diff)
downloadop-kernel-dev-5dba93aedfc6906b27791c4a1136b177beae25b7.zip
op-kernel-dev-5dba93aedfc6906b27791c4a1136b177beae25b7.tar.gz
net: fix nlmsg len size for skb when error bit is set.
Currently, the nlmsg->len field is not set correctly in netlink_ack() for ack messages that include the nlmsg of the error frame. This corrects the length field passed to __nlmsg_put to use the correct payload size. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink/af_netlink.c')
-rw-r--r--net/netlink/af_netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index a4bafbf..dd85320 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1788,7 +1788,7 @@ void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err)
}
rep = __nlmsg_put(skb, NETLINK_CB(in_skb).pid, nlh->nlmsg_seq,
- NLMSG_ERROR, sizeof(struct nlmsgerr), 0);
+ NLMSG_ERROR, payload, 0);
errmsg = nlmsg_data(rep);
errmsg->error = err;
memcpy(&errmsg->msg, nlh, err ? nlh->nlmsg_len : sizeof(*nlh));
OpenPOWER on IntegriCloud