diff options
author | pav <pav@FreeBSD.org> | 2005-01-15 11:01:27 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2005-01-15 11:01:27 +0800 |
commit | ed74bba0046684d3ca3e22b0980211ab576d7a92 (patch) | |
tree | 9357bedd95003a1458e8fecfe5290149a678f3ac /net/quagga | |
parent | 7a0fadc915aa691bdc8a5c5090701947336e5c11 (diff) | |
download | freebsd-ports-graphics-ed74bba0046684d3ca3e22b0980211ab576d7a92.tar.gz freebsd-ports-graphics-ed74bba0046684d3ca3e22b0980211ab576d7a92.tar.zst freebsd-ports-graphics-ed74bba0046684d3ca3e22b0980211ab576d7a92.zip |
- Update to 0.98.0
- Kill the ultra-ugly configure script and use OPTIONS
PR: ports/76243
Submitted by: Boris Kovalenko <boris@tagnet.ru> (maintainer)
Diffstat (limited to 'net/quagga')
-rw-r--r-- | net/quagga/Makefile | 116 | ||||
-rw-r--r-- | net/quagga/distinfo | 4 | ||||
-rw-r--r-- | net/quagga/files/extra-patch-zebra.h | 27 | ||||
-rw-r--r-- | net/quagga/files/extra-tcpmd5-patch-bgpd::bgp_network.c | 42 | ||||
-rw-r--r-- | net/quagga/files/extra-tcpmd5-patch-bgpd::bgp_vty.c | 59 | ||||
-rw-r--r-- | net/quagga/files/extra-tcpmd5-patch-bgpd::bgpd.c | 82 | ||||
-rw-r--r-- | net/quagga/files/extra-tcpmd5-patch-bgpd::bgpd.h | 38 | ||||
-rw-r--r-- | net/quagga/files/extra-tcpmd5-patch-configure.ac | 16 | ||||
-rw-r--r-- | net/quagga/files/extra-tcpmd5-patch-lib::sockopt.c | 32 | ||||
-rw-r--r-- | net/quagga/files/extra-tcpmd5-patch-lib::sockopt.h | 11 | ||||
-rw-r--r-- | net/quagga/files/patch-bgpd::bgp_packet.c | 25 | ||||
-rw-r--r-- | net/quagga/files/quagga.sh | 2 | ||||
-rw-r--r-- | net/quagga/files/watchquagga.sh | 39 | ||||
-rw-r--r-- | net/quagga/pkg-descr | 10 | ||||
-rw-r--r-- | net/quagga/pkg-install | 2 | ||||
-rw-r--r-- | net/quagga/pkg-plist | 40 | ||||
-rw-r--r-- | net/quagga/scripts/configure.quagga | 94 |
17 files changed, 179 insertions, 460 deletions
diff --git a/net/quagga/Makefile b/net/quagga/Makefile index 0b79dc2549c..28c2b54ce5d 100644 --- a/net/quagga/Makefile +++ b/net/quagga/Makefile @@ -6,52 +6,99 @@ # 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 +USE_PERL5_BUILD=yes MAN1= vtysh.1 MAN8= bgpd.8 ospf6d.8 ospfd.8 ripd.8 ripngd.8 zebra.8 +OPTIONS= ISISD "Enable experimental 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 +.else +PLIST_SUB+= ISISD_SBIN="@comment" +PLIST_SUB+= ISISD_CONF="@comment" +.endif +MAN8+= isisd.8 + +.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 +125,6 @@ CONFIGURE_ARGS+=--enable-vty-group=${ENABLE_VTY_GROUP} 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,31 +161,31 @@ pre-everything:: @${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..." - @${ECHO} "Add the folliwing lines to /etc/rc.conf to enable quagga:" + @${INSTALL_SCRIPT} ${WRKDIR}/quagga.sh ${RC_DIR}/quagga${RC_SUFX} + @${INSTALL_SCRIPT} ${WRKDIR}/watchquagga.sh ${RC_DIR}/watchquagga${RC_SUFX} + @${ECHO} "Add the following lines to /etc/rc.conf to enable quagga:" @${ECHO} "" @${ECHO} "defaultrouter=\"NO\"" @${ECHO} "quagga_enable=\"YES\"" @@ -150,6 +195,8 @@ post-install: @${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 +205,6 @@ post-install: @${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 --git a/net/quagga/distinfo b/net/quagga/distinfo index b27d0fee2f9..d91d2769371 100644 --- a/net/quagga/distinfo +++ b/net/quagga/distinfo @@ -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 --git a/net/quagga/files/extra-patch-zebra.h b/net/quagga/files/extra-patch-zebra.h new file mode 100644 index 00000000000..c6bc5908e18 --- /dev/null +++ b/net/quagga/files/extra-patch-zebra.h @@ -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 --git a/net/quagga/files/extra-tcpmd5-patch-bgpd::bgp_network.c b/net/quagga/files/extra-tcpmd5-patch-bgpd::bgp_network.c deleted file mode 100644 index 31ce42a802f..00000000000 --- a/net/quagga/files/extra-tcpmd5-patch-bgpd::bgp_network.c +++ /dev/null @@ -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 --git a/net/quagga/files/extra-tcpmd5-patch-bgpd::bgp_vty.c b/net/quagga/files/extra-tcpmd5-patch-bgpd::bgp_vty.c deleted file mode 100644 index 4f70b147c48..00000000000 --- a/net/quagga/files/extra-tcpmd5-patch-bgpd::bgp_vty.c +++ /dev/null @@ -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 --git a/net/quagga/files/extra-tcpmd5-patch-bgpd::bgpd.c b/net/quagga/files/extra-tcpmd5-patch-bgpd::bgpd.c deleted file mode 100644 index 60b3b5b2137..00000000000 --- a/net/quagga/files/extra-tcpmd5-patch-bgpd::bgpd.c +++ /dev/null @@ -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 --git a/net/quagga/files/extra-tcpmd5-patch-bgpd::bgpd.h b/net/quagga/files/extra-tcpmd5-patch-bgpd::bgpd.h deleted file mode 100644 index 4edd976fccf..00000000000 --- a/net/quagga/files/extra-tcpmd5-patch-bgpd::bgpd.h +++ /dev/null @@ -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 --git a/net/quagga/files/extra-tcpmd5-patch-configure.ac b/net/quagga/files/extra-tcpmd5-patch-configure.ac deleted file mode 100644 index 5ca3d52ffad..00000000000 --- a/net/quagga/files/extra-tcpmd5-patch-configure.ac +++ /dev/null @@ -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 --git a/net/quagga/files/extra-tcpmd5-patch-lib::sockopt.c b/net/quagga/files/extra-tcpmd5-patch-lib::sockopt.c deleted file mode 100644 index 511cf9ef8a6..00000000000 --- a/net/quagga/files/extra-tcpmd5-patch-lib::sockopt.c +++ /dev/null @@ -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 --git a/net/quagga/files/extra-tcpmd5-patch-lib::sockopt.h b/net/quagga/files/extra-tcpmd5-patch-lib::sockopt.h deleted file mode 100644 index 0f439db920d..00000000000 --- a/net/quagga/files/extra-tcpmd5-patch-lib::sockopt.h +++ /dev/null @@ -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 --git a/net/quagga/files/patch-bgpd::bgp_packet.c b/net/quagga/files/patch-bgpd::bgp_packet.c deleted file mode 100644 index c54a139301a..00000000000 --- a/net/quagga/files/patch-bgpd::bgp_packet.c +++ /dev/null @@ -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 --git a/net/quagga/files/quagga.sh b/net/quagga/files/quagga.sh index 66d72674a7f..e8231d51da9 100644 --- a/net/quagga/files/quagga.sh +++ b/net/quagga/files/quagga.sh @@ -37,8 +37,8 @@ stop_postcmd() 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 --git a/net/quagga/files/watchquagga.sh b/net/quagga/files/watchquagga.sh new file mode 100644 index 00000000000..3545ecdd6f4 --- /dev/null +++ b/net/quagga/files/watchquagga.sh @@ -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 --git a/net/quagga/pkg-descr b/net/quagga/pkg-descr index 6ef55de47d0..20e0841aa43 100644 --- a/net/quagga/pkg-descr +++ b/net/quagga/pkg-descr @@ -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 --git a/net/quagga/pkg-install b/net/quagga/pkg-install index 71b2cb314b4..ffcfe38f8a9 100644 --- a/net/quagga/pkg-install +++ b/net/quagga/pkg-install @@ -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 --git a/net/quagga/pkg-plist b/net/quagga/pkg-plist index 0a8ab7d3910..2a6711f5762 100644 --- a/net/quagga/pkg-plist +++ b/net/quagga/pkg-plist @@ -1,29 +1,31 @@ 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 -info/quagga.info -info/quagga.info-1 -info/quagga.info-2 -info/quagga.info-3 -info/quagga.info-4 +lib/libzebra.so +lib/libzebra.so.0 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 +43,7 @@ include/quagga/ospfd/ospf_nsm.h 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,19 +58,21 @@ include/quagga/thread.h 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 +info/quagga.info @unexec install-info --delete %D/info/quagga.info %D/info/dir @exec install-info %D/info/quagga.info %D/info/dir +%%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 %%OSPFAPI_PATH%% @dirrm include/quagga/ospfd @dirrm include/quagga @@ -75,4 +80,5 @@ share/examples/quagga/zebra.conf.sample @dirrm etc/quagga @cwd %%RC_DIR%% quagga%%RC_SUFX%% +watchquagga%%RC_SUFX%% @unexec rmdir %%LOCALSTATE_DIR%% 2>/dev/null || true diff --git a/net/quagga/scripts/configure.quagga b/net/quagga/scripts/configure.quagga deleted file mode 100644 index 98dad9e98c1..00000000000 --- a/net/quagga/scripts/configure.quagga +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh -# -# configure - quagga compile time option configurator -# by Bruce M Simpson <bms@FreeBSD.org> -# -# $FreeBSD: /tmp/pcvs/ports/net/quagga/scripts/Attic/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 |