summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-08-21 12:50:31 +0200
committerTom Gundersen <teg@jklm.no>2015-09-18 15:14:43 +0200
commite3dca0089b7b50e2ec21409d1292727921d06102 (patch)
tree7b437df24b2d8b3c5f4fcf215729efdd15eb656e /src/network
parent6af9144f5ff65cb9f6ae9999e7e0a9edc4841b2b (diff)
sd-ipv4acd: introduce new library split out from sd-ipv4ll
This splits the Address Conflict Detection out of the Link Local library so that we can reuse it for DHCP and static addresses in the future. Implements RFC5227.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-ipv4ll.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/networkd-ipv4ll.c b/src/network/networkd-ipv4ll.c
index 43aaa749ff..1c34f55b4b 100644
--- a/src/network/networkd-ipv4ll.c
+++ b/src/network/networkd-ipv4ll.c
@@ -215,7 +215,9 @@ int ipv4ll_configure(Link *link) {
if (link->udev_device) {
r = net_get_unique_predictable_data(link->udev_device, seed);
if (r >= 0) {
- r = sd_ipv4ll_set_address_seed(link->ipv4ll, seed);
+ assert_cc(sizeof(unsigned) <= 8);
+
+ r = sd_ipv4ll_set_address_seed(link->ipv4ll, *(unsigned *)seed);
if (r < 0)
return r;
}