diff options
Diffstat (limited to 'net-misc/quagga')
-rw-r--r-- | net-misc/quagga/Manifest | 3 | ||||
-rw-r--r-- | net-misc/quagga/files/quagga-1.2.2-ipv6-bgp.patch | 42 | ||||
-rw-r--r-- | net-misc/quagga/files/quagga-1.2.2-sparc-tests.patch | 31 | ||||
-rw-r--r-- | net-misc/quagga/quagga-1.2.2-r1.ebuild | 137 |
4 files changed, 213 insertions, 0 deletions
diff --git a/net-misc/quagga/Manifest b/net-misc/quagga/Manifest index 653bd3d8efac..d32415cc6766 100644 --- a/net-misc/quagga/Manifest +++ b/net-misc/quagga/Manifest @@ -1,4 +1,6 @@ AUX quagga-0.99.22.4-ipctl-forwarding.patch 731 BLAKE2B 9c97d7fdc7b7facb59a73f4b693c285ebd91cb0ba8f7fea0ef49d5eddd8660100315ca7d74ece8d553cdd8ad79a9a0b1a4c173c6dedf90e0be2bdc72d948b2be SHA512 56bdeb8a1f350fea3ad8ed0cdba28964b00384878853e584746d8ce80c6f9ea5ca5adc4539e314f7fd82203c08d5f2ce6adeec61dac9a7a28282131d0d371447 +AUX quagga-1.2.2-ipv6-bgp.patch 1749 BLAKE2B ba798e22dd81472f8d57289f23ab4aa648376e24aac708e6918ce421642ab26b9c0038411dbe1c5ab545eae7b2d5e1683c47e34ad010b02925e8c279976bb018 SHA512 780547ed801e493d8f237750b7c715c66320e88600e660364bee23782e22580c73883571b27284f3f7c7ed1734c54377226da02217465e1b08ea2bc457fc5236 +AUX quagga-1.2.2-sparc-tests.patch 1158 BLAKE2B 7f0071c55b2766330b9c32a9800db5f1723718d6a405b5d88e989c7d6222cb5b6beca173cd46e4d2566ddebe18b77eba26b83b63250b4efe0366cc2ef632bf54 SHA512 61f1a4ef9e2e116f32a524814d9aca818d11f03682f6284f175d478e5e29c8a69fcd9d9824a385dba07acfd44122698739755243165ecd466d83d3365e12ce4a AUX quagga-services.init.3 1072 BLAKE2B b4c3c8d6399c6c60cedfffad65f3cde56a46c9b97a62b04709660c9ff9023dd4254e7d5c78c9672bcd83c678c57c921605afbaaf9961df94d5e00abd7bb00211 SHA512 03ce5cf77612ece73d3df85c6afa747dab479949299458b5c6f59dcf778b60314fd0a9c7987be289cc0b8363dcc6e337ab5309e0a86f716208ddfc5f12b8a4b3 AUX quagga.pam 975 BLAKE2B 71fba18cca8f1a12399556f8247a04e9a1750ef178092c6066c3f93383baff25ddfa9aae495ab20a5d068586bcc6032dde31c590aebdc639e8ad7681e0b56417 SHA512 92dc6c68146d46046c6f5ff410629a2a7170e81e9657b7a2aebe1d94c8fa267acdcac9d8d8596fb54dbbacc0566502e82d900ea33f8824c07fba497b7e0f1efe AUX systemd/bgpd.service 347 BLAKE2B 96902e15c0d8cc6f800f31abe085b8447f7607fe1322f181fb251da18bc3ebdf371fe38f285e2d973f63881e18efa647812b0fc89b4a798903f1d3fabbf5e3c5 SHA512 dfefd7b758fd41ccaeb024c0ba4f08400086e05f44c1985cb387d0dfb0c0e19844879b49f84c350282e0d5d56dd1c65c8ac33f65e06543a20aacdfbba593606b @@ -15,5 +17,6 @@ DIST ht-20040304-classless-bgp.patch 1581 BLAKE2B 64df9a86c235c4f6d35be0f19fe1b0 DIST quagga-1.2.1.tar.gz 2922514 BLAKE2B ab0a59c1162bb4ac8ba3a75c015a433e2022bc35cd2a4678dbc7c80510f8c687d944b5e2bac03e9d3362bdb20badb2c17228dfd4172eebc6c87b24b2be2276e4 SHA512 ab7693ccb0cfa0f9ed90cc2b626dcd27aa6cc52e626646a2a37914a01f4b38dd80bf8d0e35d8a6a113718e82024203dbc3704c017f7c5c07bcdc2fe0109e89eb DIST quagga-1.2.2.tar.gz 2986142 BLAKE2B 2c2326e015ed4ce7364a960b56108bbd04c184b7cd78dca0cac528cd2869e65e6efbd40c303ce2b6eb29eed809e8b384baa36329b365ae6799a5b25fa21daa4c SHA512 861f6524bcdc01d1a895762bf1904744c12ae4dfc7c3583ecb7e55b3978c98187bde76df0ff85093c744139be9d5cf324fec75b5ba86cf1fdbce70d923710d14 EBUILD quagga-1.2.1.ebuild 3679 BLAKE2B c71ad696b777ddec0bdfcee4fbb142fc7c55aa7b3d676d1caf56515915aa0fef6d8c825da864c23a685d02f977b0cb9b6eec5335c2a952facaad136ec7efef2e SHA512 c17c0b0d74088b0dd05ca2c3a7fddc471ff5b1fcbb888b94c0117d73f4e74842e21e832923a050cef3fb3666fbba4d20d1a13b0a75836a902fc4b1a1da60d516 +EBUILD quagga-1.2.2-r1.ebuild 3754 BLAKE2B d02a64634572f06acb61b27a0dd3c15f7ebc9e2a901614b60a1fd5fee14ba2ffd53bc1aeaceb363572c63ee56abbc99a6e311f7358a4311a7b62b1d639baaede SHA512 e2c9a1a1f8a11149d9704b68ff1dfeb051f158cdec5e5e38f16899d2a31a81d5ea5ff8dcf8b32da7b5c00da50d1b18ac71dfc22f15d0f83ae8ce85dd79d0854a EBUILD quagga-1.2.2.ebuild 3677 BLAKE2B c00173db06bc9d1e9a17b8cdbbcb8aec3d6dc0a1ba25a9a8a9c37faa23b52d2b59f2cefc3f8e8d23c5309f144a2d725610087b76de0a3ab4d984366e607cd8f2 SHA512 1d4638973eacf1e985f59182d4d98c6c2e339f13caa387d7aed8302a99b2f208e78fe5d902219839b9cad71b4306130c4bc6dbe6d608fd4022a64abe0f8640f7 MISC metadata.xml 2375 BLAKE2B c3bb85308f39337c4bfe74dc7f373dbf3999fa38ee800d63b543f00771d580f52db69005227f778105209b703e1fa7e1ce88e4a6549f5fc673e8defcce4cd97b SHA512 77ae3e9edac846d80a8b9bf2cc6c7582bffbf9b43cffc0649dfdd1f3dcf528ebf0c99ebd70c4fe27c524f98ba453798de7f320d50f7b76287623b8ac8265a6db diff --git a/net-misc/quagga/files/quagga-1.2.2-ipv6-bgp.patch b/net-misc/quagga/files/quagga-1.2.2-ipv6-bgp.patch new file mode 100644 index 000000000000..0ee5f322f76c --- /dev/null +++ b/net-misc/quagga/files/quagga-1.2.2-ipv6-bgp.patch @@ -0,0 +1,42 @@ +commit 1db1b9baea511995b67a9b282d5c97e87479fe5d +Author: Mathieu Jadin <mathjadin@gmail.com> +Date: Thu Dec 14 17:53:53 2017 +0100 + + bgpd: Fix mistake in NHT of connected IPv6 next-hops preventing route advertisement + + Since quagga-1.2.0, the Next Hop validation for directly connected peers + using IPv6 does not work. + + In this setup, BGP updates contain two next hops: a global IPv6 address and + a link-local IPv6 address (a correct behavior according to RFC 2545). This + means that the length of the next hop attribute is 32 and not 16. + + The problem comes from the function "make_prefix()" in "bgpd/bgp_nht.c". It + refuses to build a prefix structure for a route when the length of the + [Anext hop attribute is different from 16, even if a valid global IPv6 + address is available. + + The route is mistakenly considered invalid and thus, it is not installed in + the routing table. + + Details: "make_prefix()" was not modified in quagga-1.2.0 but its + interpretation was changed in commit + 3dda6b3eccb9a2a88d607372c83c04c796e7daac. Before this commit, the failure + of "make_prefix()" was interpreted as a successful validation of the next + hop. + +diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c +index 1158ab15..d734c201 100644 +--- a/bgpd/bgp_nht.c ++++ b/bgpd/bgp_nht.c +@@ -409,8 +409,8 @@ make_prefix (int afi, struct bgp_info *ri, struct prefix *p) + break; + #ifdef HAVE_IPV6 + case AFI_IP6: +- if (ri->attr->extra->mp_nexthop_len != 16 +- || IN6_IS_ADDR_LINKLOCAL (&ri->attr->extra->mp_nexthop_global)) ++ if (ri->attr->extra->mp_nexthop_len == 16 ++ && IN6_IS_ADDR_LINKLOCAL (&ri->attr->extra->mp_nexthop_global)) + return -1; + + p->family = AF_INET6; diff --git a/net-misc/quagga/files/quagga-1.2.2-sparc-tests.patch b/net-misc/quagga/files/quagga-1.2.2-sparc-tests.patch new file mode 100644 index 000000000000..054d15f03554 --- /dev/null +++ b/net-misc/quagga/files/quagga-1.2.2-sparc-tests.patch @@ -0,0 +1,31 @@ +commit adda534f95ec87206c9dfd1b3bae05221dc29730 +Author: Rolf Eike Beer <eike@sf-mail.de> +Date: Mon Dec 4 18:36:21 2017 +0100 + + bgpd: fix SIGBUS + + There is one test failure in the testsuite on sparc: + + Running ./bgpd.tests/testbgpcap.exp ... + failed: testbgpcap ORF: ORF, simple, single entry, single tuple -- testbgpcap aborted! + + The error is a SIGBUS in bgp_capability_mp_data() because of an unaligned + memory access. Use memcpy() instead of direct assignments. Compilers on + platforms that support unaligned accesses should be clever enough to + optimize the function call away and do the direct store, so this should not + hurt there. + +diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c +index 28004230..d9ec4bef 100644 +--- a/bgpd/bgp_open.c ++++ b/bgpd/bgp_open.c +@@ -120,7 +120,8 @@ bgp_capability_vty_out (struct vty *vty, struct peer *peer) + static void + bgp_capability_mp_data (struct stream *s, struct capability_mp_data *mpc) + { +- mpc->afi = stream_getw (s); ++ afi_t afi = stream_getw (s); ++ memcpy(&mpc->afi, &afi, sizeof(mpc->afi)); + mpc->reserved = stream_getc (s); + mpc->safi = stream_getc (s); + } diff --git a/net-misc/quagga/quagga-1.2.2-r1.ebuild b/net-misc/quagga/quagga-1.2.2-r1.ebuild new file mode 100644 index 000000000000..5e0fc3e952d3 --- /dev/null +++ b/net-misc/quagga/quagga-1.2.2-r1.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +CLASSLESS_BGP_PATCH=ht-20040304-classless-bgp.patch + +inherit autotools eutils flag-o-matic multilib pam readme.gentoo-r1 systemd tmpfiles user + +DESCRIPTION="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP" +HOMEPAGE="http://quagga.net/" +SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz + 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 fpm doc elibc_glibc ipv6 multipath nhrpd ospfapi pam protobuf +readline snmp tcp-zebra test" + +COMMON_DEPEND=" + caps? ( sys-libs/libcap ) + nhrpd? ( net-dns/c-ares:0= ) + protobuf? ( dev-libs/protobuf-c:0= ) + readline? ( + sys-libs/readline:0= + pam? ( sys-libs/pam ) + ) + snmp? ( net-analyzer/net-snmp ) + !elibc_glibc? ( dev-libs/libpcre )" +DEPEND="${COMMON_DEPEND} + sys-apps/gawk + sys-devel/libtool:2 + test? ( dev-util/dejagnu )" +RDEPEND="${COMMON_DEPEND} + sys-apps/iproute2" + +PATCHES=( + "${FILESDIR}/${PN}-0.99.22.4-ipctl-forwarding.patch" + "${FILESDIR}/${P}-ipv6-bgp.patch" + "${FILESDIR}/${P}-sparc-tests.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}" + + eapply "${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 fpm) \ + $(use_enable tcp-zebra) \ + $(use_enable doc) \ + $(usex multipath $(use_enable multipath) '' '=0' '') \ + $(usex ospfapi '--enable-ospfclient' '' '' '') \ + $(use_enable readline vtysh) \ + $(use_with pam libpam) \ + $(use_enable nhrpd) \ + $(use_enable protobuf) \ + $(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 + + # Install systemd-related stuff, bug #553136 + dotmpfiles "${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) $(use nhrpd && echo nhrpd); 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() { + # Path for PIDs before first reboot should be created here, bug #558194 + tmpfiles_process quagga.conf + + readme.gentoo_print_elog +} |