summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2020-06-19 08:48:16 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2020-06-19 08:48:16 +0000
commitbf1b862269510af11243791c705895b1a0045ab9 (patch)
tree80fc4a673eccc9a1c34356635d3aa4bb3862eec0
parent9c7a7f338a4b07e5a2f1ece88724a97e7b14d12e (diff)
let stoeplitz_to_key take a void * argument instead of uint8_t *.
ix(4) wants an array of uint32_ts to push into 32bit registers.
-rw-r--r--sys/net/toeplitz.c5
-rw-r--r--sys/net/toeplitz.h4
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/net/toeplitz.c b/sys/net/toeplitz.c
index c835dcb51d1..3915d15d041 100644
--- a/sys/net/toeplitz.c
+++ b/sys/net/toeplitz.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: toeplitz.c,v 1.6 2020/06/18 12:22:39 tb Exp $ */
+/* $OpenBSD: toeplitz.c,v 1.7 2020/06/19 08:48:15 dlg Exp $ */
/*
* Copyright (c) 2009 The DragonFly Project. All rights reserved.
@@ -159,8 +159,9 @@ stoeplitz_hash_ip6port(const struct stoeplitz_cache *scache,
#endif /* INET6 */
void
-stoeplitz_to_key(uint8_t *k, size_t klen)
+stoeplitz_to_key(void *key, size_t klen)
{
+ uint8_t *k = key;
uint16_t skey = htons(stoeplitz_keyseed);
size_t i;
diff --git a/sys/net/toeplitz.h b/sys/net/toeplitz.h
index d296329d65f..ece8bdf1726 100644
--- a/sys/net/toeplitz.h
+++ b/sys/net/toeplitz.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: toeplitz.h,v 1.2 2020/06/18 12:22:39 tb Exp $ */
+/* $OpenBSD: toeplitz.h,v 1.3 2020/06/19 08:48:15 dlg Exp $ */
/*
* Copyright (c) 2019 David Gwynne <dlg@openbsd.org>
@@ -96,7 +96,7 @@ stoeplitz_hash_h16(const struct stoeplitz_cache *scache, uint16_t h16)
void stoeplitz_init(void);
-void stoeplitz_to_key(uint8_t *, size_t)
+void stoeplitz_to_key(void *, size_t)
__bounded((__buffer__, 1, 2));
extern const struct stoeplitz_cache *const stoeplitz_cache;