summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl/rtnl-util.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-02-06 11:49:07 +0100
committerTom Gundersen <teg@jklm.no>2015-02-06 11:49:39 +0100
commitb621bfd2311a13311a45ccd5e31a9ce3214895fe (patch)
tree0dd8f38e131a590a9416fcc5c852d0e55326f6a3 /src/libsystemd/sd-rtnl/rtnl-util.c
parent1c25683e0f40c6169676cc44fa1897082597feec (diff)
sd-rtnl: fix creation of synthetic error replies
Diffstat (limited to 'src/libsystemd/sd-rtnl/rtnl-util.c')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-util.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-util.c b/src/libsystemd/sd-rtnl/rtnl-util.c
index 194a267b04..5666ea44cb 100644
--- a/src/libsystemd/sd-rtnl/rtnl-util.c
+++ b/src/libsystemd/sd-rtnl/rtnl-util.c
@@ -107,12 +107,10 @@ int rtnl_message_new_synthetic_error(int error, uint32_t serial, sd_rtnl_message
assert(error <= 0);
- r = message_new(NULL, ret, NLMSG_SPACE(sizeof(struct nlmsgerr)));
+ r = message_new(NULL, ret, NLMSG_ERROR);
if (r < 0)
return r;
- (*ret)->hdr->nlmsg_len = NLMSG_LENGTH(sizeof(struct nlmsgerr));
- (*ret)->hdr->nlmsg_type = NLMSG_ERROR;
(*ret)->hdr->nlmsg_seq = serial;
err = NLMSG_DATA((*ret)->hdr);