summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobhe <tobhe@openbsd.org>2021-03-25 01:39:09 +0000
committertobhe <tobhe@openbsd.org>2021-03-25 01:39:09 +0000
commitd3cfb0fa17023a1905ffbe62fe8db2a415d41a35 (patch)
tree868daa8b6ea05df597d3ff987dadace126316bc2
parentThe server only sends a cookie during a HRR, not a SH (diff)
downloadwireguard-openbsd-d3cfb0fa17023a1905ffbe62fe8db2a415d41a35.tar.xz
wireguard-openbsd-d3cfb0fa17023a1905ffbe62fe8db2a415d41a35.zip
Sync correct ROUNDUP() from net/route.c
-rw-r--r--sbin/iked/vroute.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sbin/iked/vroute.c b/sbin/iked/vroute.c
index 7c7ad3b324e..8538edcf415 100644
--- a/sbin/iked/vroute.c
+++ b/sbin/iked/vroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vroute.c,v 1.6 2021/02/28 19:25:59 tobhe Exp $ */
+/* $OpenBSD: vroute.c,v 1.7 2021/03/25 01:39:09 tobhe Exp $ */
/*
* Copyright (c) 2021 Tobias Heider <tobhe@openbsd.org>
@@ -37,8 +37,7 @@
#define IKED_VROUTE_PRIO 6
-#define ROUNDUP(a) \
- (((a) & (sizeof(long) - 1)) ? (1 + ((a) | (sizeof(long) - 1))) : (a))
+#define ROUNDUP(a) (a>0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
int vroute_setroute(struct iked *, uint8_t, struct sockaddr *, uint8_t,
struct sockaddr *, int);