mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-21 04:53:07 -04:00
net-misc/openbgpd: New ebuild
Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
This commit is contained in:
12
net-misc/openbgpd/files/openbgpd-6.6_p0-config.c.patch
Normal file
12
net-misc/openbgpd/files/openbgpd-6.6_p0-config.c.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
--- src/bgpd/config.c 2020-03-20 17:55:04.089577745 +0100
|
||||
+++ src/bgpd/config.c 2020-03-20 17:56:01.480205070 +0100
|
||||
@@ -343,7 +343,8 @@
|
||||
fatal("getifaddrs");
|
||||
|
||||
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
|
||||
- if (ifa->ifa_addr->sa_family != AF_INET)
|
||||
+ if (ifa->ifa_addr == NULL ||
|
||||
+ ifa->ifa_addr->sa_family != AF_INET)
|
||||
continue;
|
||||
cur = ((struct sockaddr_in *)ifa->ifa_addr)->sin_addr.s_addr;
|
||||
if ((cur & localnet) == localnet) /* skip 127/8 */
|
||||
12
net-misc/openbgpd/files/openbgpd-9999-config.c.patch
Normal file
12
net-misc/openbgpd/files/openbgpd-9999-config.c.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
--- openbsd/src/usr.sbin/bgpd/config.c 2020-03-20 17:55:04.089577745 +0100
|
||||
+++ openbsd/src/usr.sbin/bgpd/config.c 2020-03-20 17:56:01.480205070 +0100
|
||||
@@ -343,7 +343,8 @@
|
||||
fatal("getifaddrs");
|
||||
|
||||
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
|
||||
- if (ifa->ifa_addr->sa_family != AF_INET)
|
||||
+ if (ifa->ifa_addr == NULL ||
|
||||
+ ifa->ifa_addr->sa_family != AF_INET)
|
||||
continue;
|
||||
cur = ((struct sockaddr_in *)ifa->ifa_addr)->sin_addr.s_addr;
|
||||
if ((cur & localnet) == localnet) /* skip 127/8 */
|
||||
13
net-misc/openbgpd/files/openbgpd-9999-update.patch
Normal file
13
net-misc/openbgpd/files/openbgpd-9999-update.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
--- update.sh 2020-03-20 15:14:46.462983445 +0100
|
||||
+++ update.sh 2020-03-20 15:14:56.473090379 +0100
|
||||
@@ -13,10 +13,6 @@
|
||||
git clone "${OPENBGPD_GIT}/openbsd"
|
||||
fi
|
||||
fi
|
||||
-(cd openbsd
|
||||
- git fetch
|
||||
- git checkout "${openbsd_branch}"
|
||||
- git pull --rebase)
|
||||
|
||||
# setup source paths
|
||||
dir=`pwd`
|
||||
7
net-misc/openbgpd/files/openbgpd-conf.d
Normal file
7
net-misc/openbgpd/files/openbgpd-conf.d
Normal file
@@ -0,0 +1,7 @@
|
||||
# /etc/conf.d/bgpd: config file for openbsd's bgpd
|
||||
|
||||
# See bgpd(8) man page ... some popular options:
|
||||
# -f file Use file as the configuration file, instead of the default
|
||||
# /etc/bgpd.conf.
|
||||
#
|
||||
BGPD_OPTS=""
|
||||
22
net-misc/openbgpd/files/openbgpd-init.d
Executable file
22
net-misc/openbgpd/files/openbgpd-init.d
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
name="bgpd daemon"
|
||||
description="OpenBGPD is a free implementation of BGPv4"
|
||||
command=/usr/sbin/bgpd
|
||||
command_args="${BGPD_OPTS}"
|
||||
|
||||
extra_started_commands="reload"
|
||||
|
||||
depend() {
|
||||
use net
|
||||
use logger
|
||||
}
|
||||
|
||||
reload() {
|
||||
${command} -n || return 1
|
||||
ebegin "Reloading bgpd"
|
||||
/usr/sbin/bgpctl reload
|
||||
eend $?
|
||||
}
|
||||
12
net-misc/openbgpd/files/openbgpd.service
Normal file
12
net-misc/openbgpd/files/openbgpd.service
Normal file
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=OpenBGPD Routing Daemon
|
||||
Documentation=man:bgpd.conf(5) man:bgpctl(8) man:bgpd(8)
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/sbin/bgpd -f /etc/bgpd.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user