From boris@ntmk.ru  Fri Jan 14 12:10:29 2005
Return-Path: <boris@ntmk.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1419D16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 14 Jan 2005 12:10:29 +0000 (GMT)
Received: from mail.ntmk.ru (mail.ntmk.ru [217.114.241.6])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C6B9343D31
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 14 Jan 2005 12:10:26 +0000 (GMT)
	(envelope-from boris@ntmk.ru)
Received: from boris.nikom.ru ([10.1.16.195])
	by mail.ntmk.ru with esmtp (Exim 4.34)
	id 1CpQHY-00015A-Qo; Fri, 14 Jan 2005 17:10:24 +0500
Received: from root by boris.nikom.ru with local (Exim 4.43 (FreeBSD))
	id 1CpQHY-000EXc-NK; Fri, 14 Jan 2005 17:10:24 +0500
Message-Id: <E1CpQHY-000EXc-NK@boris.nikom.ru>
Date: Fri, 14 Jan 2005 17:10:24 +0500
From: Boris Kovalenko <boris@tagnet.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc: boris@tagnet.ru
Subject: [MAINTAINER UPDATE] net/quagga: update to 0.98.0
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         76243
>Category:       ports
>Synopsis:       [MAINTAINER UPDATE] net/quagga: update to 0.98.0
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pav
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 14 12:20:26 GMT 2005
>Closed-Date:    Sat Jan 15 03:01:53 GMT 2005
>Last-Modified:  Sat Jan 15 03:01:53 GMT 2005
>Originator:     Boris Kovalenko
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
JSC TAGNet
>Environment:
System: FreeBSD boris.nikom.ru 5.3-STABLE FreeBSD 5.3-STABLE #1: Tue Jan 11 15:17:02 YEKT 2005
>Description:
- Update to 0.98.0

Added file(s):
- files/extra-patch-zebra.h
- files/watchquagga.sh

Removed file(s):
- Makefile.inc
- files/extra-tcpmd5-patch-bgpd::bgp_network.c
- files/extra-tcpmd5-patch-bgpd::bgp_vty.c
- files/extra-tcpmd5-patch-bgpd::bgpd.c
- files/extra-tcpmd5-patch-bgpd::bgpd.h
- files/extra-tcpmd5-patch-configure.ac
- files/extra-tcpmd5-patch-lib::sockopt.c
- files/extra-tcpmd5-patch-lib::sockopt.h
- files/patch-bgpd::bgp_packet.c
- scripts/configure.quagga

Port maintainer (boris@tagnet.ru) is cc'd.

    BGPv4 MD5 authentication was removed due the lack of support. Bruce M. Simpson, the
author, is very busy.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- quagga-0.98.0.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/net/quagga/Makefile /usr/ports/net/quagga.new/Makefile
--- /usr/ports/net/quagga/Makefile	Mon Nov 22 12:08:15 2004
+++ /usr/ports/net/quagga.new/Makefile	Fri Jan 14 17:07:04 2005
@@ -6,52 +6,95 @@
 #
 
 PORTNAME=	quagga
-PORTVERSION=	0.96.5
-PORTREVISION=	1
+PORTVERSION=	0.98.0
+PORTREVISION=	0
 CATEGORIES=	net ipv6
 MASTER_SITES=	http://quagga.net/download/
 
 PATCH_SITES=	http://quagga.net/
 
 MAINTAINER=	boris@tagnet.ru
-COMMENT=	Free RIPv1, RIPv2, OSPFv2, BGP4, IS-IS route software (server/reflector)
+COMMENT=	Free RIPv1, RIPv2, OSPFv2, BGP4, IS-IS route software
 
-CONFLICTS=	zebra-devel-* zebra-0*
+CONFLICTS=	zebra-devel-[0-9]* zebra-0*
 
 GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
-USE_SUBMAKE=	yes
-WANT_AUTOCONF_VER=	259
-WANT_AUTOMAKE_VER=	19
-AUTOMAKE_ARGS=	-a -i
+USE_REINPLACE=	yes
+INSTALLS_SHLIB=	yes
+USE_LIBTOOL_VER=15
 
 MAN1=		vtysh.1
 MAN8=		bgpd.8 ospf6d.8 ospfd.8 ripd.8 ripngd.8 zebra.8
 
+OPTIONS=	ISISD		"Enable experemental ISIS daemon"	off \
+		PAM		"PAM authentication for vtysh"	off \
+		OSPF_NSSA	"NSSA support (RFC1587)"	off \
+		OSPF_OPAQUE_LSA	"OSPF Opaque-LSA support (RFC2370)" off \
+		RTADV		"IPv6 Router Advertisements"	off \
+		SNMP		"SNMP support"			off \
+		TCPSOCKETS	"Use TCP/IP sockets for protocol daemons" off
+
+.if !defined(BATCH)
+SEL_OPTIONS=	yes
+.endif
+
+.include <bsd.port.pre.mk>
+
 CONFIGURE_ARGS+=--includedir=${PREFIX}/include --enable-exampledir=${PREFIX}/share/examples/quagga
-SCRIPTS_ENV=	WRKDIRPREFIX=${WRKDIRPREFIX} WITH_SNMP_4=${WITH_SNMP_4} \
+SCRIPTS_ENV=	PREFIX=${PREFIX} \
 		SYSCONF_DIR=${SYSCONF_DIR} SYSSTATE_DIR=${SYSSTATE_DIR} \
 		ENABLE_USER=${ENABLE_USER} ENABLE_GROUP=${ENABLE_GROUP}
 
-pre-fetch:
-	@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.quagga
+.if ${OSVERSION} < 500000
+EXTRA_PATCHES+=${PATCHDIR}/extra-patch-zebra.h
+.endif
+
+.if defined(WITH_ISISD) && !defined(WITHOUT_ISISD)
+CONFIGURE_ARGS+=--enable-isisd
+PLIST_SUB+=ISISD_SBIN=sbin/isisd
+PLIST_SUB+=ISISD_CONF=%%EXAMPLESDIR%%/isisd.conf.sample
+MAN8+=isisd.8
+.endif
+
+.if defined(WITH_PAM) && !defined(WITHOUT_PAM)
+CONFIGURE_ARGS+=--with-libpam
+.endif
 
-.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
-.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
+.if defined(WITH_OSPFNSSA) && !defined(WITHOUT_OSPF_NSSA)
+CONFIGURE_ARGS+=--enable-nssa
 .endif
 
-.if ${CONFIGURE_ARGS:M--enable-opaque-lsa} != ""
+.if defined(WITH_OSPF_OPAQUE_LSA) && !defined(WITHOUT_OSPF_OPAQUE_LSA)
+CONFIGURE_ARGS+=--enable-opaque-lsa
 PLIST_SUB+=	OSPFAPI_HEADER="include/quagga/ospfapi/ospf_apiclient.h"
 PLIST_SUB+=	OSPFAPI_PATH="@dirrm include/quagga/ospfapi"
-PLIST_SUB+=	OSPFAPI_LIB="lib/libospfapiclient.a"
+PLIST_SUB+=	OSPFAPI_LIBA="lib/libospfapiclient.a"
+PLIST_SUB+=	OSPFAPI_LIBSO="lib/libospfapiclient.so"
+PLIST_SUB+=	OSPFAPI_LIBSO0="lib/libospfapiclient.so.0"
 PLIST_SUB+=	OSPFAPI_SBIN="sbin/ospfclient"
 .else
 PLIST_SUB+=	OSPFAPI_HEADER=
 PLIST_SUB+=	OSPFAPI_PATH=
-PLIST_SUB+=	OSPFAPI_LIB=
+PLIST_SUB+=	OSPFAPI_LIBA=
+PLIST_SUB+=	OSPFAPI_LIBSO=
+PLIST_SUB+=	OSPFAPI_LIBSO0=
 PLIST_SUB+=	OSPFAPI_SBIN=
 .endif
 
+.if defined(WITH_RTADV) && !defined(WITHOUT_RTADV)
+CONFIGURE_ARGS+=--enable-rtadv
+.endif
+
+.if defined(WITH_SNMP) && !defined(WITHOUT_SNMP)
+CONFIGURE_ARGS+=--enable-snmp
+.if defined(WITH_SNMP_4)
+LIB_DEPENDS+=snmp.4:${PORTSDIR}/net-mgmt/net-snmp4:install
+.else
+LIB_DEPENDS+=netsnmp.7:${PORTSDIR}/net-mgmt/net-snmp:install
+.endif
+.endif
+
 .if !defined(ENABLE_USER)
 ENABLE_USER=quagga
 .endif
@@ -78,8 +121,6 @@
 
 CONFIGURE_ARGS+=--enable-vtysh
 
-.include <bsd.port.pre.mk>
-
 .if ${OSVERSION} >= 500038
 RC_SUBR?=	${DESTDIR}/etc/rc.subr
 RC_DIR=		${DESTDIR}/etc/rc.d
@@ -116,30 +157,30 @@
 	@${ECHO} "LOCALSTATE_DIR    Specify directory for Quagga runtime files"
 	@${ECHO}
 	@${ECHO} "The following options may be configured interactively:"
-	@${ECHO} "QUAGGA_OPTIONS    Specify additional switches, including:"
-	@${ECHO} "   LIBPAM           PAM authentication for vtysh"
-	@${ECHO} "   OSPF_NSSA        NSSA support (RFC1587)"
-	@${ECHO} "   OSPF_OPAQUE_LSA  OSPF Opaque-LSA with OSPFAPI support (RFC2370)"
-	@${ECHO} "   RTADV            IPv6 Router Advertisements"
-	@${ECHO} "   SNMP             SNMP support"
-	@${ECHO} "   TCPSOCKETS       Use TCP/IP sockets for protocol daemons"
-	@${ECHO} "   TCPMD5           TCP-MD5 support for BGP sessions"
+	@${ECHO} "   WITH_PAM              PAM authentication for vtysh"
+	@${ECHO} "   WITH_OSPF_NSSA        NSSA support (RFC1587)"
+	@${ECHO} "   WITH_OSPF_OPAQUE_LSA  OSPF Opaque-LSA with OSPFAPI support (RFC2370)"
+	@${ECHO} "   WITH_RTADV            IPv6 Router Advertisements"
+	@${ECHO} "   WITH_SNMP             SNMP support"
+	@${ECHO} "   WITH_TCPSOCKETS       Use TCP/IP sockets for protocol daemons"
 
 pre-configure:
-	@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOMAKE_ENV} ${ACLOCAL} )
-	@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOHEADER_ENV} ${AUTOHEADER} \
-		${AUTOHEADER_ARGS})
-	-@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOMAKE_ENV} ${AUTOMAKE} \
-		${AUTOMAKE_ARGS})
-	@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOCONF_ENV} ${AUTOCONF} \
-		${AUTOCONF_ARGS})
+# disable AUTO* tools
+	@${FIND} -E ${WRKSRC} -type f \
+		-iregex ".*(Makefile.in|configure)" \
+		| ${XARGS} -x -n 10 \
+		${REINPLACE_CMD} -E \
+			-e 's!^(AUTOCONF|AUTOHEADER|AUTOMAKE|ACLOCAL).*$$!\1=${TRUE}!'
 
 post-build:
 	@${SED} ${SED_SCRIPT} ${FILESDIR}/quagga.sh > ${WRKDIR}/quagga.sh
+	@${SED} ${SED_SCRIPT} ${FILESDIR}/watchquagga.sh > ${WRKDIR}/watchquagga.sh
 
 post-install:
 	@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 	@${ECHO} "===>     installing ${PORTNAME} startup file..."
+	@${INSTALL_SCRIPT} ${WRKDIR}/quagga.sh ${RC_DIR}/quagga${RC_SUFX}
+	@${INSTALL_SCRIPT} ${WRKDIR}/watchquagga.sh ${RC_DIR}/watchquagga${RC_SUFX}
 	@${ECHO} "Add the folliwing lines to /etc/rc.conf to enable quagga:"
 	@${ECHO} ""
 	@${ECHO} "defaultrouter=\"NO\""
@@ -150,6 +191,8 @@
 	@${ECHO} "quagga_flags=\"....\""
 	@${ECHO} "quagga_extralibs_path=\"/path1 /path2\""
 	@${ECHO} "router_enable=\"NO\""
+	@${ECHO} "watchquagga_enable=\"YES\""
+	@${ECHO} "watchquagga_flags=\"...\""
 	@${ECHO} ""
 	@${ECHO} "Note!!! Since 0.96.4_5 port uses new id for quagga user and group."
 	@${ECHO} "        So, You need to manually chown files:"
@@ -158,7 +201,6 @@
 	@${ECHO} "        if You had never do this before. Or run"
 	@${ECHO} "        make changeuser"
 	@${ECHO} ""
-	@${INSTALL_SCRIPT} ${WRKDIR}/quagga.sh ${RC_DIR}/quagga${RC_SUFX}
 
 .if !defined(BATCH)
 post-clean:
diff -ruN --exclude=CVS /usr/ports/net/quagga/Makefile.inc /usr/ports/net/quagga.new/Makefile.inc
--- /usr/ports/net/quagga/Makefile.inc	Fri Oct 29 08:28:02 2004
+++ /usr/ports/net/quagga.new/Makefile.inc	Thu Jan  1 05:00:00 1970
@@ -1 +0,0 @@
-PREFIX=   /usr/local
diff -ruN --exclude=CVS /usr/ports/net/quagga/README.html /usr/ports/net/quagga.new/README.html
--- /usr/ports/net/quagga/README.html	Tue Feb 24 00:29:27 2004
+++ /usr/ports/net/quagga.new/README.html	Fri Jan 14 16:33:26 2005
@@ -2,22 +2,22 @@
 
 <html>
   <head>
-    <title>The FreeBSD Ports Collection (net/quagga)</title>
+    <title>The FreeBSD Ports Collection (net/quagga.new)</title>
   </head>
 
   <body>
-    <h1>The FreeBSD Ports Collection (net/quagga)</h1>
+    <h1>The FreeBSD Ports Collection (net/quagga.new)</h1>
     <hr>
 
-    <p>You are now in the directory for the port "net/quagga".</p>
+    <p>You are now in the directory for the port "net/quagga.new".</p>
 
-    <p>The package name of this port is "quagga-0.96.4_3".</p>
+    <p>The package name of this port is "quagga-0.98.0".</p>
 
     <p>This is the one-line description for this port:</p>
     <hr>
 
     <p>
-Free RIPv1, RIPv2, OSPFv2, BGP4 route software (server/reflector)
+Free RIPv1, RIPv2, OSPFv2, BGP4, IS-IS route software
     </p>
     <hr>
 
@@ -28,9 +28,9 @@
     "mailto:boris@tagnet.ru">maintainer</a> of this port or the port <a href=
     "mailto:ports@FreeBSD.org">mailing-list</a>.</p>
 
-    <p>This port requires package(s) "autoconf-2.53_1 automake-1.5,1 expat-1.95.6_1 gettext-0.12.1 gmake-3.80_1 libiconv-1.9.1_3 m4-1.4_1 perl-5.6.1_15" to build.</p>
+    <p>This port requires package(s) "" to build.</p>
 
-    <p></p>
+    <p>This port requires package(s) "" to run.</p>
 
     <p>Go to the <a href="../../README.html">top of the ports tree</a> for
     a summary on how to use the ports collection.</p>
diff -ruN --exclude=CVS /usr/ports/net/quagga/distinfo /usr/ports/net/quagga.new/distinfo
--- /usr/ports/net/quagga/distinfo	Mon Sep 13 03:36:10 2004
+++ /usr/ports/net/quagga.new/distinfo	Tue Jan 11 14:55:53 2005
@@ -1,2 +1,2 @@
-MD5 (quagga-0.96.5.tar.gz) = cc84ef15cf4c2823a36097fe01775dc3
-SIZE (quagga-0.96.5.tar.gz) = 1558033
+MD5 (quagga-0.98.0.tar.gz) = 938cdf15f0ff79f797fc08316b94f449
+SIZE (quagga-0.98.0.tar.gz) = 1997631
diff -ruN --exclude=CVS /usr/ports/net/quagga/files/extra-patch-zebra.h /usr/ports/net/quagga.new/files/extra-patch-zebra.h
--- /usr/ports/net/quagga/files/extra-patch-zebra.h	Thu Jan  1 05:00:00 1970
+++ /usr/ports/net/quagga.new/files/extra-patch-zebra.h	Fri Jan 14 14:41:22 2005
@@ -0,0 +1,27 @@
+Index: lib/zebra.h
+===================================================================
+RCS file: /var/cvsroot/quagga/lib/zebra.h,v
+retrieving revision 1.27
+diff -u -b -r1.27 zebra.h
+--- lib/zebra.h	4 Jan 2005 16:24:43 -0000	1.27
++++ lib/zebra.h	10 Jan 2005 15:35:47 -0000
+@@ -97,9 +97,17 @@
+ #include <stdarg.h>
+ #if !(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
+ /* Not C99; do we need to define va_copy? */
+-#if !defined(va_copy) && defined(__va_copy)
++#ifndef va_copy
++#ifdef __va_copy
+ #define va_copy(DST,SRC) __va_copy(DST,SRC)
+-#endif /* need va_copy */
++#else
++/* Now we are desperate; this should work on many typical platforms. 
++   But this is slightly dangerous, because the standard does not require
++   va_copy to be a macro. */
++#define va_copy(DST,SRC) (DST) = (SRC)
++#warning "Not C99 and no va_copy macro available, using simple assignment..."
++#endif /* __va_copy */
++#endif /* !va_copy */
+ #endif /* !C99 */
+ #include "zassert.h"
+ 
diff -ruN --exclude=CVS /usr/ports/net/quagga/files/extra-tcpmd5-patch-bgpd::bgp_network.c /usr/ports/net/quagga.new/files/extra-tcpmd5-patch-bgpd::bgp_network.c
--- /usr/ports/net/quagga/files/extra-tcpmd5-patch-bgpd::bgp_network.c	Thu May 20 17:51:44 2004
+++ /usr/ports/net/quagga.new/files/extra-tcpmd5-patch-bgpd::bgp_network.c	Thu Jan  1 05:00:00 1970
@@ -1,42 +0,0 @@
---- bgpd/bgp_network.c.orig	Wed Aug 27 05:09:14 2003
-+++ bgpd/bgp_network.c	Wed Jan  7 14:24:34 2004
-@@ -35,6 +35,10 @@
- #include "bgpd/bgp_debug.h"
- #include "bgpd/bgp_network.h"
- 
-+#ifndef TCP_SIG_SPI_BASE
-+#define TCP_SIG_SPI_BASE 1000 /* XXX this will go away */
-+#endif
-+
- extern struct zebra_privs_t bgpd_privs;
- 
- 
-@@ -141,6 +145,15 @@
-       return ret;
-     }
- #endif /* SO_BINDTODEVICE */
-+
-+#ifdef TCP_MD5SIG
-+  if (CHECK_FLAG (peer->flags, PEER_FLAG_TCP_SIGNATURE))
-+    sockopt_tcp_signature (peer->su.sa.sa_family, peer->fd,
-+      TCP_SIG_SPI_BASE + peer->port);
-+  else
-+    sockopt_tcp_signature (peer->su.sa.sa_family, peer->fd, 0);
-+#endif /* TCP_MD5SIG */
-+
-   return 0;
- }
- 
-@@ -243,6 +256,12 @@
-   if (peer->ifname)
-     ifindex = if_nametoindex (peer->ifname);
- #endif /* HAVE_IPV6 */
-+
-+#ifdef TCP_MD5SIG
-+  if (CHECK_FLAG (peer->flags, PEER_FLAG_TCP_SIGNATURE))
-+    sockopt_tcp_signature (peer->su.sa.sa_family, peer->fd,
-+      TCP_SIG_SPI_BASE + peer->port);
-+#endif /* TCP_MD5SIG */
- 
-   if (BGP_DEBUG (events, EVENTS))
-     plog_info (peer->log, "%s [Event] Connect start to %s fd %d",
diff -ruN --exclude=CVS /usr/ports/net/quagga/files/extra-tcpmd5-patch-bgpd::bgp_vty.c /usr/ports/net/quagga.new/files/extra-tcpmd5-patch-bgpd::bgp_vty.c
--- /usr/ports/net/quagga/files/extra-tcpmd5-patch-bgpd::bgp_vty.c	Thu May 20 17:51:44 2004
+++ /usr/ports/net/quagga.new/files/extra-tcpmd5-patch-bgpd::bgp_vty.c	Thu Jan  1 05:00:00 1970
@@ -1,59 +0,0 @@
---- bgpd/bgp_vty.c.orig	Fri Oct 24 19:49:09 2003
-+++ bgpd/bgp_vty.c	Mon Jan  5 08:34:08 2004
-@@ -1352,6 +1352,45 @@
-        "AS number used as local AS\n"
-        "Do not prepend local-as to updates from ebgp peers\n")
- 
-+#ifdef TCP_MD5SIG
-+DEFUN (neighbor_password,
-+       neighbor_password_cmd,
-+       NEIGHBOR_CMD2 "password WORD",
-+       NEIGHBOR_STR
-+       NEIGHBOR_ADDR_STR2
-+       "Specify a password for TCPMD5 authentication with this peer\n")
-+{
-+  struct peer *peer;
-+  int ret;
-+
-+  peer = peer_and_group_lookup_vty (vty, argv[0]);
-+  if (! peer)
-+    return CMD_WARNING;
-+
-+  ret = peer_password_set (peer, argv[1]);
-+  return bgp_vty_return (vty, ret);
-+}
-+
-+DEFUN (no_neighbor_password,
-+       no_neighbor_password_cmd,
-+       NO_NEIGHBOR_CMD2 "password",
-+       NO_STR
-+       NEIGHBOR_STR
-+       NEIGHBOR_ADDR_STR2
-+       "Disable TCPMD5 authentication with this peer\n")
-+{
-+  struct peer *peer;
-+  int ret;
-+
-+  peer = peer_and_group_lookup_vty (vty, argv[0]);
-+  if (! peer)
-+    return CMD_WARNING;
-+
-+  ret = peer_password_unset (peer);
-+  return bgp_vty_return (vty, ret);
-+}
-+#endif /* TCP_MD5SIG */
-+
- DEFUN (neighbor_activate,
-        neighbor_activate_cmd,
-        NEIGHBOR_CMD2 "activate",
-@@ -7857,6 +7896,10 @@
-   install_element (BGP_NODE, &no_neighbor_local_as_cmd);
-   install_element (BGP_NODE, &no_neighbor_local_as_val_cmd);
-   install_element (BGP_NODE, &no_neighbor_local_as_val2_cmd);
-+
-+  /* "neighbor password" commands. */
-+  install_element (BGP_NODE, &neighbor_password_cmd);
-+  install_element (BGP_NODE, &no_neighbor_password_cmd);
- 
-   /* "neighbor activate" commands. */
-   install_element (BGP_NODE, &neighbor_activate_cmd);
diff -ruN --exclude=CVS /usr/ports/net/quagga/files/extra-tcpmd5-patch-bgpd::bgpd.c /usr/ports/net/quagga.new/files/extra-tcpmd5-patch-bgpd::bgpd.c
--- /usr/ports/net/quagga/files/extra-tcpmd5-patch-bgpd::bgpd.c	Thu May 20 17:51:44 2004
+++ /usr/ports/net/quagga.new/files/extra-tcpmd5-patch-bgpd::bgpd.c	Thu Jan  1 05:00:00 1970
@@ -1,82 +0,0 @@
---- bgpd/bgpd.c.orig	Wed Aug 27 05:09:16 2003
-+++ bgpd/bgpd.c	Wed Jan  7 14:20:48 2004
-@@ -59,6 +59,9 @@
- #ifdef HAVE_SNMP
- #include "bgpd/bgp_snmp.h"
- #endif /* HAVE_SNMP */
-+#ifndef TCP_SIG_SPI_BASE
-+#define TCP_SIG_SPI_BASE 1000 /* XXX this will go away */
-+#endif
- 
- /* BGP process wide configuration.  */
- static struct bgp_master bgp_master;
-@@ -3063,6 +3066,55 @@
-   return 0;
- }
- 
-+#ifdef TCP_MD5SIG
-+/* Set password for authenticating with the peer. */
-+int
-+peer_password_set (struct peer *peer, char *password)
-+{
-+  struct bgp *bgp = peer->bgp;
-+  int len;
-+
-+  len = strlen(password);
-+
-+  if ((len < PEER_PASSWORD_MINLEN) || (len > PEER_PASSWORD_MAXLEN))
-+    return BGP_ERR_INVALID_VALUE;
-+
-+  memcpy(peer->password, password, len);
-+
-+  /*
-+   * XXX Need to do PF_KEY operation here to add an SA entry,
-+   * and add an SP entry for this peer's packet flows also.
-+   */
-+
-+  SET_FLAG (peer->flags, PEER_FLAG_TCP_SIGNATURE);
-+
-+  if (peer->fd >= 0)
-+    sockopt_tcp_signature (peer->su.sa.sa_family, peer->fd, TCP_SIG_SPI_BASE +
-+      peer->port);
-+
-+  return 0;
-+}
-+
-+int
-+peer_password_unset (struct peer *peer)
-+{
-+  struct bgp *bgp = peer->bgp;
-+
-+  UNSET_FLAG (peer->flags, PEER_FLAG_TCP_SIGNATURE);
-+  /* Paranoia. */
-+  memset(peer->password, 0, sizeof(peer->password));
-+
-+  if (peer->fd >= 0)
-+    sockopt_tcp_signature (peer->su.sa.sa_family, peer->fd, 0);
-+
-+  /*
-+   * XXX Need to do PF_KEY operation here to remove the SA and SP.
-+   */
-+
-+  return 0;
-+}
-+#endif /* TCP_MD5SIG */
-+
- /* Set distribute list to the peer. */
- int
- peer_distribute_set (struct peer *peer, afi_t afi, safi_t safi, int direct, 
-@@ -4041,6 +4093,13 @@
-       if (peer->desc)
- 	vty_out (vty, " neighbor %s description %s%s", addr, peer->desc,
- 		 VTY_NEWLINE);
-+
-+#ifdef TCP_MD5SIG
-+      /* tcp-md5 session password. XXX the password should be obfuscated */
-+      if (CHECK_FLAG (peer->flags, PEER_FLAG_TCP_SIGNATURE))
-+	vty_out (vty, " neighbor %s password %s%s", addr, peer->password,
-+		 VTY_NEWLINE);
-+#endif /* TCP_MD5SIG */
- 
-       /* Shutdown. */
-       if (CHECK_FLAG (peer->flags, PEER_FLAG_SHUTDOWN))
diff -ruN --exclude=CVS /usr/ports/net/quagga/files/extra-tcpmd5-patch-bgpd::bgpd.h /usr/ports/net/quagga.new/files/extra-tcpmd5-patch-bgpd::bgpd.h
--- /usr/ports/net/quagga/files/extra-tcpmd5-patch-bgpd::bgpd.h	Thu May 20 17:51:44 2004
+++ /usr/ports/net/quagga.new/files/extra-tcpmd5-patch-bgpd::bgpd.h	Thu Jan  1 05:00:00 1970
@@ -1,38 +0,0 @@
---- bgpd/bgpd.h.orig	Wed Aug 27 05:09:16 2003
-+++ bgpd/bgpd.h	Wed Jan  7 14:28:38 2004
-@@ -312,6 +312,9 @@
- #define PEER_FLAG_DYNAMIC_CAPABILITY        (1 << 6) /* dynamic capability */
- #define PEER_FLAG_ENFORCE_MULTIHOP          (1 << 7) /* enforce-multihop */
- #define PEER_FLAG_LOCAL_AS_NO_PREPEND       (1 << 8) /* local-as no-prepend */
-+#ifdef TCP_MD5SIG /* XXX should move to AF_INET/SFI_UNICAST below */
-+#define PEER_FLAG_TCP_SIGNATURE             (1 << 9) /* use TCP-MD5 digest */
-+#endif /* TCP_MD5SIG */
- 
-   /* Per AF configuration flags. */
-   u_int32_t af_flags[AFI_MAX][SAFI_MAX];
-@@ -441,6 +444,13 @@
- #define PEER_RMAP_TYPE_REDISTRIBUTE   (1 << 3) /* redistribute route-map */
- #define PEER_RMAP_TYPE_DEFAULT        (1 << 4) /* default-originate route-map */
- #define PEER_RMAP_TYPE_NOSET          (1 << 5) /* not allow to set commands */
-+
-+#ifdef TCP_MD5SIG
-+  /* TCP-MD5 Password Support -- bms */
-+#define PEER_PASSWORD_MINLEN		1
-+#define PEER_PASSWORD_MAXLEN		80	/* width of password field */
-+ char password[PEER_PASSWORD_MAXLEN];
-+#endif /* TCP_MD5SIG */
- };
- 
- /* This structure's member directly points incoming packet data
-@@ -815,6 +825,11 @@
- 
- int peer_local_as_set (struct peer *, as_t, int);
- int peer_local_as_unset (struct peer *);
-+
-+#ifdef TCP_MD5SIG
-+int peer_password_set (struct peer *, char *);
-+int peer_password_unset (struct peer *);
-+#endif /* TCP_MD5SIG */
- 
- int peer_prefix_list_set (struct peer *, afi_t, safi_t, int, char *);
- int peer_prefix_list_unset (struct peer *, afi_t, safi_t, int);
diff -ruN --exclude=CVS /usr/ports/net/quagga/files/extra-tcpmd5-patch-configure.ac /usr/ports/net/quagga.new/files/extra-tcpmd5-patch-configure.ac
--- /usr/ports/net/quagga/files/extra-tcpmd5-patch-configure.ac	Thu May 20 17:51:44 2004
+++ /usr/ports/net/quagga.new/files/extra-tcpmd5-patch-configure.ac	Thu Jan  1 05:00:00 1970
@@ -1,16 +0,0 @@
---- configure.ac.orig	Thu May 20 12:31:22 2004
-+++ configure.ac	Thu May 20 12:33:06 2004
-@@ -163,6 +163,13 @@
-   AC_MSG_RESULT(no)
- fi
- 
-+AC_ARG_ENABLE(tcp-signature,
-+[  --enable-tcp-signature        enable TCP MD5 checksum capability])
-+
-+if test "${enable_tcp_signature}" = "yes"; then
-+  AC_DEFINE(TCP_MD5SIG,,TCP signatures)
-+fi
-+
- if test "${enable_user}" = "yes" || test x"${enable_user}" = x""; then
-   enable_user="quagga"
- elif test "${enable_user}" = "no"; then
diff -ruN --exclude=CVS /usr/ports/net/quagga/files/extra-tcpmd5-patch-lib::sockopt.c /usr/ports/net/quagga.new/files/extra-tcpmd5-patch-lib::sockopt.c
--- /usr/ports/net/quagga/files/extra-tcpmd5-patch-lib::sockopt.c	Thu May 20 17:51:44 2004
+++ /usr/ports/net/quagga.new/files/extra-tcpmd5-patch-lib::sockopt.c	Thu Jan  1 05:00:00 1970
@@ -1,32 +0,0 @@
---- lib/sockopt.c.orig	Fri Dec 13 20:15:29 2002
-+++ lib/sockopt.c	Mon Jan  5 08:25:17 2004
-@@ -197,3 +197,29 @@
- #endif /* #if OS_TYPE */
- 
- }
-+
-+int
-+sockopt_tcp_signature (int family, int sock, int enable)
-+{
-+  int ret;
-+
-+#ifdef TCP_MD5SIG
-+  if (family == AF_INET)
-+    {
-+      ret = setsockopt (sock, IPPROTO_TCP, TCP_MD5SIG,
-+                        (void *) &enable, sizeof (int));
-+      if (ret < 0)
-+        {
-+          zlog (NULL, LOG_WARNING, "can't set sockopt TCP_MD5SIG %d to socket %d", enable, sock);
-+          return -1;
-+        }
-+      return 0;
-+    }
-+#endif /* TCP_MD5SIG */
-+
-+  /* fallthrough */
-+
-+  zlog (NULL, LOG_WARNING, "can't set sockopt TCP_MD5SIG on socket %d with family %d",
-+                 sock, family);
-+  return -1;
-+}
diff -ruN --exclude=CVS /usr/ports/net/quagga/files/extra-tcpmd5-patch-lib::sockopt.h /usr/ports/net/quagga.new/files/extra-tcpmd5-patch-lib::sockopt.h
--- /usr/ports/net/quagga/files/extra-tcpmd5-patch-lib::sockopt.h	Thu May 20 17:51:44 2004
+++ /usr/ports/net/quagga.new/files/extra-tcpmd5-patch-lib::sockopt.h	Thu Jan  1 05:00:00 1970
@@ -1,11 +0,0 @@
---- lib/sockopt.h.orig	Fri Dec 13 20:15:29 2002
-+++ lib/sockopt.h	Mon Jan  5 08:25:17 2004
-@@ -37,5 +37,8 @@
- 			     unsigned int mcast_addr,
- 			     unsigned int ifindex);
- 
-+#ifdef TCP_MD5SIG
-+int sockopt_tcp_signature(int family, int sock, int enable);
-+#endif /* TCP_MD5SIG */
- 
- #endif /*_ZEBRA_SOCKOPT_H */
diff -ruN --exclude=CVS /usr/ports/net/quagga/files/patch-bgpd::bgp_packet.c /usr/ports/net/quagga.new/files/patch-bgpd::bgp_packet.c
--- /usr/ports/net/quagga/files/patch-bgpd::bgp_packet.c	Mon Nov 22 09:33:32 2004
+++ /usr/ports/net/quagga.new/files/patch-bgpd::bgp_packet.c	Thu Jan  1 05:00:00 1970
@@ -1,25 +0,0 @@
---- bgpd/bgp_packet.c.orig	Mon Nov 22 15:31:07 2004
-+++ bgpd/bgp_packet.c	Mon Nov 22 15:31:40 2004
-@@ -566,17 +566,22 @@
-   while (1)
-     {
-       int writenum;
-+      int val;
- 
-       s = bgp_write_packet (peer);
-       if (! s)
- 	return 0;
- 
-+      val = fcntl (peer->fd, F_GETFL, 0);
-+      fcntl (peer->fd, F_SETFL, val|O_NONBLOCK);
-+
-       /* Number of bytes to be sent.  */
-       writenum = stream_get_endp (s) - stream_get_getp (s);
- 
-       /* Call write() system call.  */
-       num = write (peer->fd, STREAM_PNT (s), writenum);
-       write_errno = errno;
-+      fcntl (peer->fd, F_SETFL, val);
-       if (num <= 0)
- 	{
- 	  /* Partial write. */
diff -ruN --exclude=CVS /usr/ports/net/quagga/files/quagga.sh /usr/ports/net/quagga.new/files/quagga.sh
--- /usr/ports/net/quagga/files/quagga.sh	Mon Sep 13 03:36:11 2004
+++ /usr/ports/net/quagga.new/files/quagga.sh	Fri Jan 14 13:57:32 2005
@@ -37,8 +37,8 @@
 quagga_enable=${quagga_enable:-"NO"}
 quagga_flags=${quagga_flags:-"-d"}
 quagga_daemons=${quagga_daemons:-"zebra ripd ripng ospfd ospf6d bgpd isisd"}
-load_rc_config $name
 quagga_extralibs_path=${quagga_extralibs_path:-""}
+load_rc_config $name
 
 quagga_cmd=$1
 
diff -ruN --exclude=CVS /usr/ports/net/quagga/files/watchquagga.sh /usr/ports/net/quagga.new/files/watchquagga.sh
--- /usr/ports/net/quagga/files/watchquagga.sh	Thu Jan  1 05:00:00 1970
+++ /usr/ports/net/quagga.new/files/watchquagga.sh	Fri Jan 14 14:00:31 2005
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+
+# PROVIDE: watchquagga
+# REQUIRE: netif routing mountcritlocal quagga
+# BEFORE:  NETWORKING
+# KEYWORD: FreeBSD NetBSD
+
+#
+# Add the following line to /etc/rc.conf to enable quagga:
+#watchquagga_enable="YES"
+#
+# You may also wish to use the following variables to fine-tune startup:
+#watchquagga_flags=""
+#
+#
+
+. %%RC_SUBR%%
+
+name="watchquagga"
+rcvar=`set_rcvar`
+
+
+stop_postcmd=stop_postcmd
+
+stop_postcmd()
+{
+  rm -f $pidfile
+}
+
+# set defaults
+
+watchquagga_enable=${watchquagga_enable:-"NO"}
+watchquagga_flags=${watchquagga_flags:-""}
+load_rc_config $name
+
+command=%%PREFIX%%/sbin/watchquagga
+pidfile=%%LOCALSTATE_DIR%%/watchquagga.pid
+run_rc_command "$1"
diff -ruN --exclude=CVS /usr/ports/net/quagga/pkg-descr /usr/ports/net/quagga.new/pkg-descr
--- /usr/ports/net/quagga/pkg-descr	Sun Sep 28 05:40:56 2003
+++ /usr/ports/net/quagga.new/pkg-descr	Fri Jan 14 14:53:32 2005
@@ -1,11 +1,11 @@
 From the website:
 
 Quagga is a routing software suite, providing implementations of
-OSPFv2, OSPFv3, RIP v1 and v2, RIPv3 and BGPv4 for Unix platforms,
-particularly FreeBSD and Linux and also NetBSD, to mention a few.
-Quagga is a fork of GNU Zebra which was developed by Kunihiro
-Ishiguro. The Quagga tree aims to build a more involved community
-around Quagga than the current centralised model of GNU Zebra.
+OSPFv2, OSPFv3, RIP v1 and v2, RIPv3, BGPv4 and experemental ISIS
+for Unix platforms, particularly FreeBSD and Linux and also NetBSD, 
+to mention a few. Quagga is a fork of GNU Zebra which was developed 
+by KunihiroIshiguro. The Quagga tree aims to build a more involved 
+community around Quagga than the current centralised model of GNU Zebra.
 
 WWW: http://quagga.net/
 
diff -ruN --exclude=CVS /usr/ports/net/quagga/pkg-install /usr/ports/net/quagga.new/pkg-install
--- /usr/ports/net/quagga/pkg-install	Mon Sep 13 03:36:11 2004
+++ /usr/ports/net/quagga.new/pkg-install	Fri Jan 14 16:42:21 2005
@@ -3,7 +3,7 @@
 PATH=/bin:/usr/sbin
 
 if [ -z "${SYSCONF_DIR}" ]; then
-    SYSCONF_DIR=/usr/local/etc/quagga
+    SYSCONF_DIR=${PREFIX}/etc/quagga
 fi
 
 if [ -z "${LOCALSTATE_DIR}" ]; then
diff -ruN --exclude=CVS /usr/ports/net/quagga/pkg-plist /usr/ports/net/quagga.new/pkg-plist
--- /usr/ports/net/quagga/pkg-plist	Mon Sep 13 03:36:11 2004
+++ /usr/ports/net/quagga.new/pkg-plist	Fri Jan 14 16:27:15 2005
@@ -1,29 +1,32 @@
 sbin/bgpd
-sbin/isisd
+%%ISISD_SBIN%%
 sbin/ospf6d
 %%OSPFAPI_SBIN%%
 sbin/ospfd
 sbin/ripd
 sbin/ripngd
+sbin/watchquagga
 sbin/zebra
 bin/vtysh
 lib/libospf.a
-%%OSPFAPI_LIB%%
+lib/libospf.so
+lib/libospf.so.0
+%%OSPFAPI_LIBA%%
+%%OSPFAPI_LIBSO%%
+%%OSPFAPI_LIBSO0%%
 lib/libzebra.a
+lib/libzebra.so
+lib/libzebra.so.0
 info/quagga.info
-info/quagga.info-1
-info/quagga.info-2
-info/quagga.info-3
-info/quagga.info-4
 include/quagga/buffer.h
 include/quagga/command.h
-include/quagga/debug.h
 include/quagga/distribute.h
 include/quagga/filter.h
 include/quagga/getopt.h
 include/quagga/hash.h
 include/quagga/if.h
 include/quagga/if_rmap.h
+include/quagga/jhash.h
 include/quagga/keychain.h
 include/quagga/linklist.h
 include/quagga/log.h
@@ -41,6 +44,7 @@
 include/quagga/ospfd/ospf_opaque.h
 include/quagga/ospfd/ospfd.h
 include/quagga/plist.h
+include/quagga/pqueue.h
 include/quagga/prefix.h
 include/quagga/privs.h
 include/quagga/routemap.h
@@ -55,17 +59,18 @@
 include/quagga/vector.h
 include/quagga/version.h
 include/quagga/vty.h
+include/quagga/zassert.h
 include/quagga/zclient.h
 include/quagga/zebra.h
-share/examples/quagga/bgpd.conf.sample
-share/examples/quagga/bgpd.conf.sample2
-share/examples/quagga/isisd.conf.sample
-share/examples/quagga/ospf6d.conf.sample
-share/examples/quagga/ospfd.conf.sample
-share/examples/quagga/ripd.conf.sample
-share/examples/quagga/ripngd.conf.sample
-share/examples/quagga/vtysh.conf.sample
-share/examples/quagga/zebra.conf.sample
+%%EXAMPLESDIR%%/bgpd.conf.sample
+%%EXAMPLESDIR%%/bgpd.conf.sample2
+%%ISISD_CONF%%
+%%EXAMPLESDIR%%/ospf6d.conf.sample
+%%EXAMPLESDIR%%/ospfd.conf.sample
+%%EXAMPLESDIR%%/ripd.conf.sample
+%%EXAMPLESDIR%%/ripngd.conf.sample
+%%EXAMPLESDIR%%/vtysh.conf.sample
+%%EXAMPLESDIR%%/zebra.conf.sample
 @unexec install-info --delete %D/info/quagga.info %D/info/dir
 @exec install-info %D/info/quagga.info %D/info/dir
 %%OSPFAPI_PATH%%
@@ -75,4 +80,5 @@
 @dirrm etc/quagga
 @cwd %%RC_DIR%%
 quagga%%RC_SUFX%%
+watchquagga%%RC_SUFX%%
 @unexec rmdir %%LOCALSTATE_DIR%% 2>/dev/null || true
diff -ruN --exclude=CVS /usr/ports/net/quagga/scripts/configure.quagga /usr/ports/net/quagga.new/scripts/configure.quagga
--- /usr/ports/net/quagga/scripts/configure.quagga	Thu Dec  2 02:12:34 2004
+++ /usr/ports/net/quagga.new/scripts/configure.quagga	Thu Jan  1 05:00:00 1970
@@ -1,94 +0,0 @@
-#!/bin/sh
-#
-# configure - quagga compile time option configurator
-# by Bruce M Simpson <bms@FreeBSD.org>
-#
-# $FreeBSD: ports/net/quagga/scripts/configure.quagga,v 1.6 2004/12/01 21:12:34 pav Exp $
-
-if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
-	exit
-fi
-
-tempfile=`mktemp -t checklist`
-
-if [ "${QUAGGA_OPTIONS}" ]; then
-	set ${QUAGGA_OPTIONS}
-fi
-
-for i; do
-	eval status_$i=ON
-done
-
-if [ -z "${BATCH}" ]; then
-	/usr/bin/dialog --title "Quagga configuration options" --clear \
-		--checklist "\n\
-Please select desired options:" -1 -1 8	\
-LIBPAM		"PAM authentication for vtysh"	"$status_LIBPAM" \
-OSPF_NSSA	"NSSA support (RFC1587)"	"$status_OSPF_NSSA" \
-OSPF_OPAQUE_LSA	"OSPF Opaque-LSA with OSPFAPI support (RFC2370)"	"$status_OSPF_OPAQUE_LSA" \
-RTADV		"IPv6 Router Advertisements"	"$status_RTADV" \
-SNMP		"SNMP support"			"$status_SNMP" \
-TCPSOCKETS	"Use TCP/IP sockets for protocol daemons"	"$status_TCPSOCKETS" \
-TCPMD5		"Support TCP-MD5 for BGP sessions"	"$status_TCPMD5" \
-2> $tempfile
-
-	retval=$?
-
-	if [ -s $tempfile ]; then
-		set `sed 's/"//g' $tempfile`
-	fi
-	rm -f $tempfile
-
-	case $retval in
-		0)      if [ -z "$*" ]; then
-				echo "Nothing selected"
-			fi
-			;;
-		1)      echo "Cancel pressed."
-			exit 1
-			;;
-	esac
-fi
-
-/bin/mkdir -p ${WRKDIRPREFIX}${CURDIR}
-exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
-
-echo "PREFIX=   ${PREFIX}"
-
-while [ "$1" ]; do
-    case $1 in
-	LIBPAM)
-		echo 'CONFIGURE_ARGS+=	--with-libpam'
-		;;
-	OSPF_NSSA)
-		echo 'CONFIGURE_ARGS+=	--enable-nssa'
-		;;
-	OSPF_OPAQUE_LSA)
-		echo 'CONFIGURE_ARGS+=	--enable-opaque-lsa'
-		;;
-	RTADV)
-		echo 'CONFIGURE_ARGS+=	--enable-rtadv'
-		;;
-	SNMP)
-		echo 'CONFIGURE_ARGS+=	--enable-snmp'
-		if [ "x${WITH_SNMP_4}" != "x" ]; then
-			echo 'LIB_DEPENDS+=snmp.4:${PORTSDIR}/net-mgmt/net-snmp4:install'
-		else
-			echo 'LIB_DEPENDS+=netsnmp.7:${PORTSDIR}/net-mgmt/net-snmp:install'
-		fi
-		;;
-	TCPMD5)
-		echo 'CONFIGURE_ARGS+=	--enable-tcp-signature'
-		echo 'EXTRA_PATCHES+=	${PATCHDIR}/extra-tcpmd5-patch-configure.ac ${PATCHDIR}/extra-tcpmd5-patch-bgpd::bgp_network.c ${PATCHDIR}/extra-tcpmd5-patch-bgpd::bgp_vty.c ${PATCHDIR}/extra-tcpmd5-patch-bgpd::bgpd.c ${PATCHDIR}/extra-tcpmd5-patch-bgpd::bgpd.h ${PATCHDIR}/extra-tcpmd5-patch-lib::sockopt.c ${PATCHDIR}/extra-tcpmd5-patch-lib::sockopt.h'
-		;;
-	TCPSOCKETS)
-		echo 'CONFIGURE_ARGS+=	--enable-tcp-zebra'
-		;;
-	*)
-		echo "Unknown option(s): $*" > /dev/stderr
-		rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
-		exit 1
-		;;
-    esac
-    shift
-done
--- quagga-0.98.0.patch ends here ---

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Sat Jan 15 02:54:34 GMT 2005 
State-Changed-Why:  
Committed, thanks! 


Responsible-Changed-From-To: freebsd-ports-bugs->pav 
Responsible-Changed-By: pav 
Responsible-Changed-When: Sat Jan 15 02:54:34 GMT 2005 
Responsible-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=76243 
>Unformatted:
