net-misc/frr: Backporting ::gentoo ebuild

Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr
This commit is contained in:
Alarig Le Lay 2021-08-23 10:06:00 +02:00
parent 9b4eed3981
commit 6a538d98ee
Signed by: alarig
GPG key ID: 7AFE62C6DF8BCDEC
2 changed files with 31 additions and 4 deletions

View file

@ -0,0 +1,22 @@
Fix for missing definitions on some Hardened configurations
Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=437292
diff -Naur quagga-0.99.16.orig/zebra/ipforward_sysctl.c quagga-0.99.16/zebra/ipforward_sysctl.c
--- quagga-0.99.16.orig/zebra/ipforward_sysctl.c 2010-03-11 12:11:32.000000000 -0500
+++ quagga-0.99.16/zebra/ipforward_sysctl.c 2010-03-11 12:11:39.000000000 -0500
@@ -31,6 +31,15 @@
#define MIB_SIZ 4
+/* Fix for recent (2.6.14) kernel headers */
+#ifndef IPCTL_FORWARDING
+ #define IPCTL_FORWARDING NET_IPV4_FORWARD
+#endif
+
+#ifndef IP6CTL_FORWARDING
+ #define IP6CTL_FORWARDING NET_IPV6_FORWARDING
+#endif
+
extern struct zebra_privs_t zserv_privs;
/* IPv4 forwarding control MIB. */

View file

@ -3,7 +3,7 @@
EAPI=7 EAPI=7
PYTHON_COMPAT=( python3_{7..10} ) PYTHON_COMPAT=( python3_{8..10} )
inherit autotools pam python-single-r1 systemd inherit autotools pam python-single-r1 systemd
DESCRIPTION="The FRRouting Protocol Suite" DESCRIPTION="The FRRouting Protocol Suite"
@ -31,7 +31,8 @@ COMMON_DEPEND="
nhrp? ( net-dns/c-ares:0= ) nhrp? ( net-dns/c-ares:0= )
pam? ( sys-libs/pam ) pam? ( sys-libs/pam )
rpki? ( >=net-libs/rtrlib-0.6.3[ssh] ) rpki? ( >=net-libs/rtrlib-0.6.3[ssh] )
snmp? ( net-analyzer/net-snmp:= )" snmp? ( net-analyzer/net-snmp:= )
"
BDEPEND=" BDEPEND="
doc? ( dev-python/sphinx ) doc? ( dev-python/sphinx )
@ -43,12 +44,16 @@ BDEPEND="
DEPEND=" DEPEND="
${COMMON_DEPEND} ${COMMON_DEPEND}
test? ( $(python_gen_cond_dep 'dev-python/pytest[${PYTHON_USEDEP}]') )" test? ( $(python_gen_cond_dep 'dev-python/pytest[${PYTHON_USEDEP}]') )
"
RDEPEND=" RDEPEND="
${COMMON_DEPEND} ${COMMON_DEPEND}
$(python_gen_cond_dep 'dev-python/ipaddr[${PYTHON_USEDEP}]') $(python_gen_cond_dep 'dev-python/ipaddr[${PYTHON_USEDEP}]')
!net-misc/quagga" !net-misc/quagga
"
PATCHES=( "${FILESDIR}"/${PN}-7.5-ipctl-forwarding.patch )
src_prepare() { src_prepare() {
default default