summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Popov <pinkbyte@gentoo.org>2016-08-13 10:16:13 +0300
committerSergey Popov <pinkbyte@gentoo.org>2016-08-13 10:16:13 +0300
commit1d77537a3d59537cb413358bbd23714fe8a8776a (patch)
tree06838b20951f4844cec70350aee436ecb90a3ae8 /net-misc
parentmask rails 4.0 for removal, bug 576068 (diff)
downloadgentoo-1d77537a3d59537cb413358bbd23714fe8a8776a.tar.gz
gentoo-1d77537a3d59537cb413358bbd23714fe8a8776a.tar.bz2
gentoo-1d77537a3d59537cb413358bbd23714fe8a8776a.zip
net-misc/quagga: revision bump
Currently, bgpd logs enormous amount of errors about AFI/SAFI does not set, which is wrong, so we should backport upstream patch to fix this Reported-by: Arnaud Launay <asl@launay.org> Gentoo-Bug: 589946 Package-Manager: portage-2.3.0
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/quagga/files/quagga-1.0.20160315-bgpd-logging-fix.patch30
-rw-r--r--net-misc/quagga/quagga-1.0.20160315-r3.ebuild136
2 files changed, 166 insertions, 0 deletions
diff --git a/net-misc/quagga/files/quagga-1.0.20160315-bgpd-logging-fix.patch b/net-misc/quagga/files/quagga-1.0.20160315-bgpd-logging-fix.patch
new file mode 100644
index 000000000000..7c7f54ccd258
--- /dev/null
+++ b/net-misc/quagga/files/quagga-1.0.20160315-bgpd-logging-fix.patch
@@ -0,0 +1,30 @@
+diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
+index 740b0f1..9cbb5b5 100644
+--- a/bgpd/bgp_packet.c
++++ b/bgpd/bgp_packet.c
+@@ -1631,7 +1631,7 @@ bgp_update_receive (struct peer *peer, bgp_size_t size)
+ NLRI_TYPE_MAX,
+ };
+ struct bgp_nlri nlris[NLRI_TYPE_MAX];
+-
++
+ /* Status must be Established. */
+ if (peer->status != Established)
+ {
+@@ -1645,6 +1645,7 @@ bgp_update_receive (struct peer *peer, bgp_size_t size)
+ memset (&attr, 0, sizeof (struct attr));
+ memset (&extra, 0, sizeof (struct attr_extra));
+ memset (&nlris, 0, sizeof nlris);
++
+ attr.extra = &extra;
+
+ s = peer->ibuf;
+@@ -1781,6 +1782,8 @@ bgp_update_receive (struct peer *peer, bgp_size_t size)
+ /* Parse any given NLRIs */
+ for (i = NLRI_UPDATE; i < NLRI_TYPE_MAX; i++)
+ {
++ if (!nlris[i].nlri) continue;
++
+ /* We use afi and safi as indices into tables and what not. It would
+ * be impossible, at this time, to support unknown afi/safis. And
+ * anyway, the peer needs to be configured to enable the afi/safi
diff --git a/net-misc/quagga/quagga-1.0.20160315-r3.ebuild b/net-misc/quagga/quagga-1.0.20160315-r3.ebuild
new file mode 100644
index 000000000000..5af09feee406
--- /dev/null
+++ b/net-misc/quagga/quagga-1.0.20160315-r3.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+CLASSLESS_BGP_PATCH=ht-20040304-classless-bgp.patch
+
+inherit autotools eutils flag-o-matic multilib pam readme.gentoo-r1 systemd user
+
+DESCRIPTION="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP"
+HOMEPAGE="http://quagga.net/"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz
+ bgpclassless? ( http://hasso.linux.ee/stuff/patches/quagga/${CLASSLESS_BGP_PATCH} )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~s390 ~sparc ~x86"
+
+IUSE="bgpclassless caps doc elibc_glibc ipv6 multipath ospfapi pam +readline snmp tcp-zebra"
+
+COMMON_DEPEND="
+ caps? ( sys-libs/libcap )
+ snmp? ( net-analyzer/net-snmp )
+ readline? (
+ sys-libs/readline:0
+ pam? ( sys-libs/pam )
+ )
+ !elibc_glibc? ( dev-libs/libpcre )"
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ sys-apps/gawk
+ sys-devel/libtool:2"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/iproute2"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.99.22.4-ipctl-forwarding.patch"
+ "${FILESDIR}/${P}-ripd-null-pointer-fix.patch"
+ "${FILESDIR}/${P}-ospfd-dangling-pointer-fix.patch"
+ "${FILESDIR}/${P}-bgpd-logging-fix.patch"
+)
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="Sample configuration files can be found in /usr/share/doc/${PF}/samples
+You have to create config files in /etc/quagga before
+starting one of the daemons.
+
+You can pass additional options to the daemon by setting the EXTRA_OPTS
+variable in their respective file in /etc/conf.d"
+
+pkg_setup() {
+ enewgroup quagga
+ enewuser quagga -1 -1 /var/empty quagga
+}
+
+src_prepare() {
+ # Classless prefixes for BGP
+ # http://hasso.linux.ee/doku.php/english:network:quagga
+ use bgpclassless && eapply -p0 "${DISTDIR}/${CLASSLESS_BGP_PATCH}"
+
+ epatch ${PATCHES[@]}
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+
+ # do not build PDF docs
+ export ac_cv_prog_PDFLATEX=no
+ export ac_cv_prog_LATEXMK=no
+
+ econf \
+ --enable-exampledir=/usr/share/doc/${PF}/samples \
+ --enable-irdp \
+ --enable-isisd \
+ --enable-isis-topology \
+ --enable-pimd \
+ --enable-user=quagga \
+ --enable-group=quagga \
+ --enable-vty-group=quagga \
+ --with-cflags="${CFLAGS}" \
+ --with-pkg-extra-version="-gentoo" \
+ --sysconfdir=/etc/quagga \
+ --localstatedir=/run/quagga \
+ --disable-static \
+ $(use_enable caps capabilities) \
+ $(usex snmp '--enable-snmp' '' '' '') \
+ $(use_enable !elibc_glibc pcreposix) \
+ $(use_enable tcp-zebra) \
+ $(use_enable doc) \
+ $(usex multipath $(use_enable multipath) '' '=0' '') \
+ $(usex ospfapi '--enable-opaque-lsa --enable-ospf-te --enable-ospfclient' '' '' '') \
+ $(use_enable readline vtysh) \
+ $(use_with pam libpam) \
+ $(use_enable ipv6 ripngd) \
+ $(use_enable ipv6 ospf6d) \
+ $(use_enable ipv6 rtadv)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+ readme.gentoo_create_doc
+
+ keepdir /etc/quagga
+ fowners root:quagga /etc/quagga
+ fperms 0770 /etc/quagga
+
+ # Path for PIDs before first reboot should be created here, bug #558194
+ dodir /run/quagga
+ fowners quagga:quagga /run/quagga
+ fperms 0770 /run/quagga
+
+ # Install systemd-related stuff, bug #553136
+ systemd_dotmpfilesd "${FILESDIR}/systemd/quagga.conf"
+ systemd_dounit "${FILESDIR}/systemd/zebra.service"
+
+ # install zebra as a file, symlink the rest
+ newinitd "${FILESDIR}"/quagga-services.init.3 zebra
+
+ for service in bgpd isisd ospfd pimd ripd $(use ipv6 && echo ospf6d ripngd); do
+ dosym zebra /etc/init.d/${service}
+ systemd_dounit "${FILESDIR}/systemd/${service}.service"
+ done
+
+ use readline && use pam && newpamd "${FILESDIR}/quagga.pam" quagga
+
+ insinto /etc/logrotate.d
+ newins redhat/quagga.logrotate quagga
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}