Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/dist/ipsec-tools/src/racoon Fix address advancing for...



details:   https://anonhg.NetBSD.org/src/rev/b1e0abe1ed18
branches:  trunk
changeset: 946398:b1e0abe1ed18
user:      kardel <kardel%NetBSD.org@localhost>
date:      Wed Nov 25 10:57:11 2020 +0000

description:
Fix address advancing for i386 and other 32-bit platforms.
Makes racoon grok IPv6 addresses again on these platforms.

diffstat:

 crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r 4a90ce480c45 -r b1e0abe1ed18 crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c
--- a/crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c   Wed Nov 25 10:44:53 2020 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c   Wed Nov 25 10:57:11 2020 +0000
@@ -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 <timo.teras%iki.fi@localhost>.
@@ -683,10 +683,14 @@
 
 #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
 
-#define SAROUNDUP(X)   ROUNDUP(((struct sockaddr *)(X))->sa_len)
 
 static size_t
 parse_address(caddr_t start, caddr_t end, struct sockaddr_storage *dest)



Home | Main Index | Thread Index | Old Index