From d2c7ed0706c64953ce6bcb4abc370c378d49be40 Mon Sep 17 00:00:00 2001 From: kardel Date: Wed, 25 Nov 2020 10:57:11 +0000 Subject: [PATCH] Fix address advancing for i386 and other 32-bit platforms. Makes racoon grok IPv6 addresses again on these platforms. --- crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c b/crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c index e6f0cbaf2b4f..319feac7fba1 100644 --- a/crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c +++ b/crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c @@ -1,4 +1,4 @@ -/* $NetBSD: grabmyaddr.c,v 1.37 2018/05/19 20:14:56 maxv Exp $ */ +/* $NetBSD: grabmyaddr.c,v 1.38 2020/11/25 10:57:11 kardel Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * Copyright (C) 2008 Timo Teras . @@ -683,10 +683,14 @@ kernel_sync() #elif defined(USE_ROUTE) +#ifdef RT_ROUNDUP +#define SAROUNDUP(X) RT_ROUNDUP(((struct sockaddr *)(X))->sa_len) +#else #define ROUNDUP(a) \ ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) - #define SAROUNDUP(X) ROUNDUP(((struct sockaddr *)(X))->sa_len) +#endif + static size_t parse_address(caddr_t start, caddr_t end, struct sockaddr_storage *dest)