summaryrefslogtreecommitdiff
path: root/src/nspawn
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-11-16 15:50:13 +0100
committerTom Gundersen <teg@jklm.no>2015-11-16 15:50:13 +0100
commitf5ed8d4a51b7f168eba9114a7cf4c2a3132cafff (patch)
treeaaf3b2b5a03de9ca3801a912ae42b7f61d95ff6e /src/nspawn
parent920a7262211254a6f728af5ed4f6cd7f9a83e9a6 (diff)
parentdbe81cbd2a93088236a2e4e41eeb33378940f7b9 (diff)
Merge pull request #1916 from zonque/align
siphash: alignment
Diffstat (limited to 'src/nspawn')
-rw-r--r--src/nspawn/nspawn-network.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nspawn/nspawn-network.c b/src/nspawn/nspawn-network.c
index c71552879d..92dfb945e0 100644
--- a/src/nspawn/nspawn-network.c
+++ b/src/nspawn/nspawn-network.c
@@ -47,7 +47,7 @@ static int generate_mac(
sd_id128_t hash_key,
uint64_t idx) {
- uint8_t result[8];
+ uint64_t result;
size_t l, sz;
uint8_t *v, *i;
int r;
@@ -74,10 +74,10 @@ static int generate_mac(
/* Let's hash the host machine ID plus the container name. We
* use a fixed, but originally randomly created hash key here. */
- siphash24(result, v, sz, hash_key.bytes);
+ siphash24(&result, v, sz, hash_key.bytes);
assert_cc(ETH_ALEN <= sizeof(result));
- memcpy(mac->ether_addr_octet, result, ETH_ALEN);
+ memcpy(mac->ether_addr_octet, &result, ETH_ALEN);
/* see eth_random_addr in the kernel */
mac->ether_addr_octet[0] &= 0xfe; /* clear multicast bit */