diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-11-17 00:32:06 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-11-17 00:32:06 +0100 |
commit | 357bc17975e3a60a64c46f56b5330747c67705b2 (patch) | |
tree | a433ef446817659ae3a4fc8c60f2adb68082650d /src/libsystemd-network/sd-ipv4ll.c | |
parent | 8702319e119008954baa872d50d0e4098e6e83db (diff) | |
parent | 933f9caeeb2b3c1b951d330e04beb04226e5a890 (diff) |
Merge pull request #1923 from zonque/siphash
siphash24: let siphash24_finalize() and siphash24() return the result…
Diffstat (limited to 'src/libsystemd-network/sd-ipv4ll.c')
-rw-r--r-- | src/libsystemd-network/sd-ipv4ll.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsystemd-network/sd-ipv4ll.c b/src/libsystemd-network/sd-ipv4ll.c index e69b1864d7..006db6feee 100644 --- a/src/libsystemd-network/sd-ipv4ll.c +++ b/src/libsystemd-network/sd-ipv4ll.c @@ -146,12 +146,11 @@ int sd_ipv4ll_set_mac(sd_ipv4ll *ll, const struct ether_addr *addr) { uint64_t seed; /* If no random data is set, generate some from the MAC */ - siphash24(&seed, &addr->ether_addr_octet, - ETH_ALEN, HASH_KEY.bytes); + seed = siphash24(&addr->ether_addr_octet, ETH_ALEN, HASH_KEY.bytes); assert_cc(sizeof(unsigned) <= 8); - r = sd_ipv4ll_set_address_seed(ll, (unsigned)seed); + r = sd_ipv4ll_set_address_seed(ll, (unsigned) htole64(seed)); if (r < 0) return r; } |