summaryrefslogtreecommitdiff
path: root/src/libsystemd-rtnl/rtnl-message.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-12-19 21:28:50 +0100
committerTom Gundersen <teg@jklm.no>2013-12-19 21:39:45 +0100
commit4d47756b8fa5eb6bc75b7aa2345eb31e6bc10e9a (patch)
treede78f04782efbfd7366523d8ff69f76644e203c1 /src/libsystemd-rtnl/rtnl-message.c
parent753e98788a9bcbd3bba2b3006672c003ae72eefa (diff)
rtnl: correctly get the size of data to be appended
This fixes: systemd[1]: Failed to configure loopback device: Numerical result out of range
Diffstat (limited to 'src/libsystemd-rtnl/rtnl-message.c')
-rw-r--r--src/libsystemd-rtnl/rtnl-message.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-rtnl/rtnl-message.c b/src/libsystemd-rtnl/rtnl-message.c
index c62eca9fae..24f2e6f246 100644
--- a/src/libsystemd-rtnl/rtnl-message.c
+++ b/src/libsystemd-rtnl/rtnl-message.c
@@ -447,7 +447,7 @@ int sd_rtnl_message_append_u32(sd_rtnl_message *m, unsigned short type, uint32_t
return -ENOTSUP;
}
- r = add_rtattr(m, type, &data, sizeof(&data));
+ r = add_rtattr(m, type, &data, sizeof(uint32_t));
if (r < 0)
return r;
@@ -508,7 +508,7 @@ int sd_rtnl_message_append_in_addr(sd_rtnl_message *m, unsigned short type, cons
return -ENOTSUP;
}
- r = add_rtattr(m, type, data, sizeof(data));
+ r = add_rtattr(m, type, data, sizeof(struct in_addr));
if (r < 0)
return r;
@@ -568,7 +568,7 @@ int sd_rtnl_message_append_in6_addr(sd_rtnl_message *m, unsigned short type, con
return -ENOTSUP;
}
- r = add_rtattr(m, type, data, sizeof(data));
+ r = add_rtattr(m, type, data, sizeof(struct in6_addr));
if (r < 0)
return r;