chiark / gitweb /
shared: switch our hash table implementation over to SipHash
[elogind.git] / src / libsystemd-rtnl / rtnl-message.c
index 264cca004fe40d5379b5f0feb40254a6ffaf7226..24f2e6f2466220ef386301c4c29709dc4c21a91a 100644 (file)
@@ -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;
 
@@ -601,7 +601,7 @@ int sd_rtnl_message_append_ether_addr(sd_rtnl_message *m, unsigned short type, c
                         return -ENOTSUP;
         }
 
-        r = add_rtattr(m, type, data, sizeof(data));
+        r = add_rtattr(m, type, data, ETH_ALEN);
         if (r < 0)
                 return r;