Tue Dec 2 20:22:14 2014 UTC ()
Update to 0.99.23.1.

Remove a patch which has been incorporated upstream, and one which has
been superceded.

Add a patch to use the system's RT_ROUNDUP macro if defined,
which fixes IPv6 routing on NetBSD 6 (where rtsock alignment has
changed).

Upstream NEWS:

* Changes in Quagga 0.99.23

Known issues:
- [bgpd] setting an extcommunity in a route map on a route that already has
  an extcommunity attribute will cause bgpd to crash.  This issue will be
  fixed in a followup minor release.

User-visible changes:
- [lib] Performance enhancements on hashes and timers.
- [bgpd] New feature: iBGP TTL security.
- [bgpd] New feature: relaxed bestpath criteria for multipath and improved
  display of multipath routes in "show ip bgp".  Scripts parsing this output
  may need to be updated.
- [bgpd] Multiprotocol peerings over IPv6 now try to find a more appropriate
  IPv4 nexthop by looking at the interface.
- [ospf6d] A large amount of changes has been merged for ospf6d.  Careful
  evaluation prior to deployment is recommended.
- [zebra] Recursive route support has been overhauled.  Scripts parsing
  "show ip route" output may need adaptation.
- [zebra] IPv6 address management has been improved regarding tentative
  addresses.  This is visible in that a freshly configured address will not
  immediately be marked as usable.
- [*] a lot of bugs have been fixed, please refer to the git log


(gdt)
diff -r1.47 -r1.48 pkgsrc/net/quagga/Makefile
diff -r1.14 -r1.15 pkgsrc/net/quagga/PLIST
diff -r1.19 -r1.20 pkgsrc/net/quagga/distinfo
diff -r1.1 -r0 pkgsrc/net/quagga/patches/patch-lib_queue.h
diff -r1.1 -r0 pkgsrc/net/quagga/patches/patch-vtysh_vtysh.c
diff -r0 -r1.1 pkgsrc/net/quagga/patches/patch-zebra-kernel_socket.c

cvs diff -r1.47 -r1.48 pkgsrc/net/quagga/Makefile (expand / switch to unified diff)

--- pkgsrc/net/quagga/Makefile 2014/05/29 23:37:11 1.47
+++ pkgsrc/net/quagga/Makefile 2014/12/02 20:22:14 1.48
@@ -1,18 +1,17 @@ @@ -1,18 +1,17 @@
1# $NetBSD: Makefile,v 1.47 2014/05/29 23:37:11 wiz Exp $ 1# $NetBSD: Makefile,v 1.48 2014/12/02 20:22:14 gdt Exp $
2# 2#
3 3
4DISTNAME= quagga-0.99.22.3 4DISTNAME= quagga-0.99.23.1
5PKGREVISION= 1 
6CATEGORIES= net 5CATEGORIES= net
7MASTER_SITES= http://download.savannah.gnu.org/releases/quagga/ 6MASTER_SITES= http://download.savannah.gnu.org/releases/quagga/
8 7
9MAINTAINER= gdt@NetBSD.org 8MAINTAINER= gdt@NetBSD.org
10HOMEPAGE= http://www.nongnu.org/quagga/ 9HOMEPAGE= http://www.nongnu.org/quagga/
11COMMENT= Free multithreaded routing daemon software 10COMMENT= Free multithreaded routing daemon software
12LICENSE= gnu-gpl-v2 11LICENSE= gnu-gpl-v2
13 12
14.include "../../mk/bsd.prefs.mk" 13.include "../../mk/bsd.prefs.mk"
15 14
16GNU_CONFIGURE= YES 15GNU_CONFIGURE= YES
17USE_TOOLS+= gawk gmake perl 16USE_TOOLS+= gawk gmake perl
18USE_LIBTOOL= YES 17USE_LIBTOOL= YES

cvs diff -r1.14 -r1.15 pkgsrc/net/quagga/PLIST (expand / switch to unified diff)

--- pkgsrc/net/quagga/PLIST 2014/03/11 14:05:10 1.14
+++ pkgsrc/net/quagga/PLIST 2014/12/02 20:22:14 1.15
@@ -1,25 +1,26 @@ @@ -1,25 +1,26 @@
1@comment $NetBSD: PLIST,v 1.14 2014/03/11 14:05:10 jperkin Exp $ 1@comment $NetBSD: PLIST,v 1.15 2014/12/02 20:22:14 gdt Exp $
2include/quagga/buffer.h 2include/quagga/buffer.h
3include/quagga/checksum.h 3include/quagga/checksum.h
4include/quagga/command.h 4include/quagga/command.h
5include/quagga/distribute.h 5include/quagga/distribute.h
6include/quagga/filter.h 6include/quagga/filter.h
7include/quagga/getopt.h 7include/quagga/getopt.h
8include/quagga/hash.h 8include/quagga/hash.h
9include/quagga/if.h 9include/quagga/if.h
10include/quagga/if_rmap.h 10include/quagga/if_rmap.h
11include/quagga/jhash.h 11include/quagga/jhash.h
12include/quagga/keychain.h 12include/quagga/keychain.h
 13include/quagga/libospf.h
13include/quagga/linklist.h 14include/quagga/linklist.h
14include/quagga/log.h 15include/quagga/log.h
15include/quagga/md5.h 16include/quagga/md5.h
16include/quagga/memory.h 17include/quagga/memory.h
17include/quagga/memtypes.h 18include/quagga/memtypes.h
18include/quagga/network.h 19include/quagga/network.h
19include/quagga/ospfd/ospf_api.h 20include/quagga/ospfd/ospf_api.h
20include/quagga/ospfd/ospf_asbr.h 21include/quagga/ospfd/ospf_asbr.h
21include/quagga/ospfd/ospf_dump.h 22include/quagga/ospfd/ospf_dump.h
22include/quagga/ospfd/ospf_ism.h 23include/quagga/ospfd/ospf_ism.h
23include/quagga/ospfd/ospf_lsa.h 24include/quagga/ospfd/ospf_lsa.h
24include/quagga/ospfd/ospf_lsdb.h 25include/quagga/ospfd/ospf_lsdb.h
25include/quagga/ospfd/ospf_nsm.h 26include/quagga/ospfd/ospf_nsm.h

cvs diff -r1.19 -r1.20 pkgsrc/net/quagga/distinfo (expand / switch to unified diff)

--- pkgsrc/net/quagga/distinfo 2014/03/22 10:48:20 1.19
+++ pkgsrc/net/quagga/distinfo 2014/12/02 20:22:14 1.20
@@ -1,8 +1,7 @@ @@ -1,8 +1,7 @@
1$NetBSD: distinfo,v 1.19 2014/03/22 10:48:20 wiedi Exp $ 1$NetBSD: distinfo,v 1.20 2014/12/02 20:22:14 gdt Exp $
2 2
3SHA1 (quagga-0.99.22.3.tar.gz) = 80e2d32bb0a95d2e3e9c90f16618eee863202f85 3SHA1 (quagga-0.99.23.1.tar.gz) = 0501f527383cfa548a800de9816cf1423f6b2336
4RMD160 (quagga-0.99.22.3.tar.gz) = 41fa875d1722af286621aa90b14b27a56e8d6c9d 4RMD160 (quagga-0.99.23.1.tar.gz) = 6102fdf118cf31de8155dfcaffee91207ff56164
5Size (quagga-0.99.22.3.tar.gz) = 2363963 bytes 5Size (quagga-0.99.23.1.tar.gz) = 2526612 bytes
6SHA1 (patch-configure) = a58a698ba9b8a174c3623a9cd4b52518e410c0df 6SHA1 (patch-configure) = a58a698ba9b8a174c3623a9cd4b52518e410c0df
7SHA1 (patch-lib_queue.h) = 63ce2d88fb29654d937384898b0d84480b3b2581 7SHA1 (patch-zebra-kernel_socket.c) = d9a2f3a301d4ac8392c246a2661859657a6dca5e
8SHA1 (patch-vtysh_vtysh.c) = 55b398c2b78d68b151450d071256031955ca7ebc 

File Deleted: pkgsrc/net/quagga/patches/Attic/patch-lib_queue.h

File Deleted: pkgsrc/net/quagga/patches/Attic/patch-vtysh_vtysh.c

File Added: pkgsrc/net/quagga/patches/Attic/patch-zebra-kernel_socket.c
From 2fa9994ed80f1b5620cbebf040e85127992ec20d Mon Sep 17 00:00:00 2001
From: Greg Troxel <gdt@ir.bbn.com>
Date: Tue, 2 Dec 2014 14:51:49 -0500
Subject: [PATCH] zebra/kernel_socket.c: Use platform alignment.

Use the platform-provided RT_ROUNDUP macro to align sockaddrs on the
routing socket, rather than using hard-coded assumptions about
alignment.  Emit a warning if the OS doesn't define alignment macros.

Resolves failure of ripngd on NetBSD 6 i386, which changed alignment
to uint64_t from long.
---
 zebra/kernel_socket.c | 51 +++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 41 insertions(+), 10 deletions(-)

diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index 3dbeb98..c2ede09 100644
--- zebra/kernel_socket.c
+++ zebra/kernel_socket.c
@@ -42,22 +42,53 @@ extern struct zebra_privs_t zserv_privs;
 extern struct zebra_t zebrad;
 
 /*
- * Given a sockaddr length, round it up to include pad bytes following
- * it.  Assumes the kernel pads to sizeof(long).
+ * Historically, the BSD routing socket has aligned data following a
+ * struct sockaddr to sizeof(long), which was 4 bytes on some
+ * platforms, and 8 bytes on others.  bytes.  NetBSD 6 changed the
+ * routing socket to align to sizeof(uint64_t), which is 8 bytes.  OS
+ * X appears to align to sizeof(int), which is 4 bytes.
  *
- * XXX: why is ROUNDUP(0) sizeof(long)?  0 is an illegal sockaddr
- * length anyway (< sizeof (struct sockaddr)), so this shouldn't
- * matter.
- * On OS X, both 32, 64bit syatems align on 4 byte boundary
+ * Alignment of zero-sized sockaddrs is nonsensical, but historically
+ * BSD defines RT_ROUNDUP(0) to be the alignment interval (rather than
+ * 0).  We follow this practice without questioning it, but it is a
+ * bug if quagga calls ROUNDUP with 0.
  */
+
+/*
+ * Because of these varying conventions, the only sane approach is for
+ * the <net/route.h> header to define a ROUNDUP macro.  We use the
+ * provided ROUNDUP macro when possible, and provide a workaround with
+ * a warning if not.
+ */
+#if defined(RT_ROUNDUP)
+#define ROUNDUP(a)	RT_ROUNDUP(a)
+#endif /* defined(RT_ROUNDUP) */
+
+/*
+ * If ROUNDUP is not defined in terms of platform-provided defines,
+ * attempt to cope with heuristics.
+ */
+#if !defined(ROUNDUP)
+
+/*
+ * It's a bug for a platform not to define rounding/alignment for
+ * sockaddrs on the routing socket.  This warning really is
+ * intentional, to provoke filing bug reports with operating systems
+ * that don't define RT_ROUNDUP or equivalent.
+ */
+#warning "net/route.h does not define RT_ROUNDUP; makeing unwarranted assumptions!"
+
 #ifdef __APPLE__
-#define ROUNDUP(a) \
-  ((a) > 0 ? (1 + (((a) - 1) | (sizeof(int) - 1))) : sizeof(int))
+#define ROUNDUP_TYPE	long
 #else
-#define ROUNDUP(a) \
-  ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
+#define ROUNDUP_TYPE	int
 #endif
 
+#define ROUNDUP(a) \
+  ((a) > 0 ? (1 + (((a) - 1) | (sizeof(ROUNDUP_TYPE) - 1))) : sizeof(ROUNDUP_TYPE))
+
+#endif /* defined(ROUNDUP) */
+
 /*
  * Given a pointer (sockaddr or void *), return the number of bytes
  * taken up by the sockaddr and any padding needed for alignment.
-- 
2.1.0