diff options
Diffstat (limited to 'src/libsystemd/sd-rtnl/rtnl-util.c')
-rw-r--r-- | src/libsystemd/sd-rtnl/rtnl-util.c | 4 |
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); |