diff options
author | Olivier Cochard <olivier@FreeBSD.org> | 2022-07-07 11:42:17 +0000 |
---|---|---|
committer | Olivier Cochard <olivier@FreeBSD.org> | 2022-07-07 12:12:50 +0000 |
commit | 04630d170791e12f2b698167a1002d1dad028849 (patch) | |
tree | 3d933431c03596fddc976cf97e8203745647bbb6 | |
parent | 706c1803391d13243fd84dfbaadb2b3d952259bc (diff) | |
download | ports-04630d170791e12f2b698167a1002d1dad028849.tar.gz ports-04630d170791e12f2b698167a1002d1dad028849.zip |
net/frr8: New major version 8.2.2 of FRRouting
PR: 260950
Obtained from: Bug fixes by hrs, improved by bijanebrahimi@riseup.net
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/frr8/Makefile | 146 | ||||
-rw-r--r-- | net/frr8/distinfo | 3 | ||||
-rw-r--r-- | net/frr8/files/frr.in | 168 | ||||
-rw-r--r-- | net/frr8/files/patch-Makefile.am | 11 | ||||
-rw-r--r-- | net/frr8/files/patch-backport.patch | 175 | ||||
-rw-r--r-- | net/frr8/files/watchfrr.in | 30 | ||||
-rw-r--r-- | net/frr8/pkg-descr | 5 | ||||
-rw-r--r-- | net/frr8/pkg-message | 17 | ||||
-rw-r--r-- | net/frr8/pkg-plist | 220 |
10 files changed, 776 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index 73fec1368cb6..0b9b2633d090 100644 --- a/net/Makefile +++ b/net/Makefile @@ -167,6 +167,7 @@ SUBDIR += frp SUBDIR += frr7 SUBDIR += frr7-pythontools + SUBDIR += frr8 SUBDIR += fspclient SUBDIR += fspd SUBDIR += fsplib diff --git a/net/frr8/Makefile b/net/frr8/Makefile new file mode 100644 index 000000000000..997a9863fec9 --- /dev/null +++ b/net/frr8/Makefile @@ -0,0 +1,146 @@ +PORTNAME= frr +PORTVERSION= 8.2.2 +DISTVERSIONPREFIX= frr- +CATEGORIES= net +.if defined(PYTHONTOOLS) +PKGNAMESUFFIX= 8-pythontools +.else +PKGNAMESUFFIX= 8 +.endif + +MAINTAINER= olivier@FreeBSD.org + +COMMENT?= IP routing protocol suite including BGP, IS-IS, OSPF and RIP + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +.if defined(PYTHONTOOLS) +RUN_DEPENDS= frr-reload:net/frr8 + +USES= python:run,3.6+ shebangfix + +post-patch: + @${REINPLACE_CMD} -e 's|/etc/frr|${ETCDIR}|g' \ + -e 's|/usr/bin|${PREFIX}/bin|g' \ + -e 's|/usr/local/bin/tail|${TAIL}|g' \ + ${WRKSRC}/tools/frr-reload.py + @${REINPLACE_CMD} -e 's|/etc/frr|${ETCDIR}|g' \ + ${WRKSRC}/tools/generate_support_bundle.py + +do-install: + ${MKDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_SCRIPT} ${WRKSRC}/tools/frr-reload.py ${STAGEDIR}/${PREFIX}/sbin/ + ${INSTALL_SCRIPT} ${WRKSRC}/tools/generate_support_bundle.py ${STAGEDIR}/${PREFIX}/sbin/ + ${INSTALL_DATA} ${WRKSRC}/tools/etc/frr/support_bundle_commands.conf ${STAGEDIR}${ETCDIR}/ +.else + +BUILD_DEPENDS= gawk:lang/gawk +LIB_DEPENDS= libjson-c.so:devel/json-c \ + libyang.so.2:net/libyang2 \ + libcares.so:dns/c-ares \ + libpcre2-8.so:devel/pcre2 + +USES= autoreconf bison compiler:c++11-lang gmake pkgconfig libtool \ + makeinfo python:build,3.6+ readline shebangfix + +BINARY_ALIAS= python=${PYTHON_VERSION} + +CONFLICTS= openbgpd openospfd zebra quagga + +GNU_CONFIGURE= yes +INSTALL_TARGET= install-strip +USE_LDCONFIG= yes +.endif + +USE_GITHUB= yes +GH_ACCOUNT= FRRouting + +.if defined(PYTHONTOOLS) +NO_BUILD= yes +NO_ARCH= yes + +SHEBANG_FILES= tools/frr-reload.py \ + tools/generate_support_bundle.py +PLIST= ${.CURDIR}/pkg-plist +PKGMESSAGE= "" +.else +INFO= frr + +OPTIONS_DEFINE= CONFIGROLLBACKS FPM DATACENTER LDPD PAM SHELLACCESS \ + VTYSH MANPAGES MULTIPATH TCMALLOC RPKI SHARPD SNMP +OPTIONS_DEFAULT= VTYSH RPKI FPM MANPAGES +OPTIONS_SUB= yes + +CONFIGROLLBACKS_DESC= Enable configuration rollback support +FPM_DESC= Enable Forwarding Plane Manager support +DATACENTER_DESC= Use reduced BGP timers +LDPD_DESC= Build ldpd +MULTIPATH_DESC= Enable multipath function +PAM_DESC= Use libpam for PAM support in vtysh +RPKI_DESC= Add BGP RPKI (RFC 6810) support +SHELLACCESS_DESC= Allow users to access shell/telnet/ssh +SNMP_DESC= SNMP support +SHARPD_DESC= Build sharpd +TCMALLOC_DESC= Use tcmalloc +VTYSH_DESC= Build integrated vty shell + +USERS= frr +GROUPS= frr frrvty + +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib + +# PIM compile but didn't work on FreeBSD +CONFIGURE_ARGS= --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --disable-doc-html \ + --sysconfdir=${ETCDIR} \ + --localstatedir=/var/run/frr \ + --disable-backtrace \ + --disable-nhrpd \ + --disable-pathd \ + --disable-ospfclient \ + --disable-pimd \ + --disable-vrrpd \ + --with-vtysh-pager=cat + +MANPAGES_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=0,1:textproc/py-sphinx@${PY_FLAVOR} +MANPAGES_CONFIGURE_OFF= --disable-doc +CONFIGROLLBACKS_LIB_DEPENDS= libsqlite3.so:databases/sqlite3 +CONFIGROLLBACKS_CONFIGURE_ENABLE= config-rollbacks +DATACENTER_CONFIGURE_ENABLE= datacenter +SHELLACCESS_CONFIGURE_ENABLE= shell-access +FPM_CONFIGURE_ENABLE= fpm +PAM_CONFIGURE_WITH= libpam +LDPD_CONFIGURE_ENABLE= ldpd +MULTIPATH_CONFIGURE_ON= --enable-multipath=64 +RPKI_CONFIGURE_ENABLE= rpki +RPKI_LIB_DEPENDS= librtr.so:net-mgmt/rtrlib \ + libssh.so:security/libssh +TCMALLOC_CONFIGURE_ENABLE= tcmalloc +TCMALLOC_LIB_DEPENDS= libtcmalloc.so:devel/google-perftools +SNMP_CONFIGURE_ENABLE= snmp +SNMP_CFLAGS= "-std=gnu99" +SNMP_LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp +SNMP_USES= ssl +SHARPD_CONFIGURE_ENABLE= sharpd +VTYSH_CONFIGURE_ENABLE= vtysh + +USE_RC_SUBR= frr watchfrr + +SHEBANG_FILES= yang/embedmodel.py + +post-patch: + @${REINPLACE_CMD} -e 's|/etc/frr|${ETCDIR}|g' \ + -e 's|/usr/lib/|${PREFIX}/lib/|g' \ + -e 's|frr-pythontools|frr8-pythontools|g' \ + ${WRKSRC}/tools/frr-reload + +post-install: + ${MKDIR} ${STAGEDIR}/var/run/frr + ${INSTALL_SCRIPT} ${WRKSRC}/tools/frr-reload ${STAGEDIR}${PREFIX}/sbin +.endif + +.include <bsd.port.mk> diff --git a/net/frr8/distinfo b/net/frr8/distinfo new file mode 100644 index 000000000000..a66f71561ac9 --- /dev/null +++ b/net/frr8/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1648249835 +SHA256 (FRRouting-frr-frr-8.2.2_GH0.tar.gz) = 33e974e2a622618e139983f65d93e92e7f1a735936ef18b18244403b15be002f +SIZE (FRRouting-frr-frr-8.2.2_GH0.tar.gz) = 9439460 diff --git a/net/frr8/files/frr.in b/net/frr8/files/frr.in new file mode 100644 index 000000000000..222e56234729 --- /dev/null +++ b/net/frr8/files/frr.in @@ -0,0 +1,168 @@ +#!/bin/sh + +# PROVIDE: frr dynamicrouting +# REQUIRE: netif routing +# KEYWORD: nojailvnet shutdown + +# Add the following line to /etc/rc.conf to enable frr: +# frr_enable="YES" +# +# You may also wish to use the following variables to fine-tune startup: +# Enable Integrated configuration mode (using the single configuration file +# frr.conf in place of one file for each dameon) +# frr_vtysh_boot="YES" +# Selecting limited set of daemons to run +# frr_daemons="zebra babeld bfdd bgpd eigrpd fabricd isisd ospfd ospf6d ripd ripngd staticd" +# Global tuning +# frr_flags="" +# Per daemon tuning may be done with daemon_name_flags +# zebra_flags="-P 0" +# bgpd_flags="-nrP 0" and so on +# If you want to give the routing daemons a chance to catchup before +# continuing, set frr_wait_for to a "default" or certain prefix. +# frr_wait_for="default" +# Set the time limit for the wait. +# frr_wait_seconds="90" +# +# If the frr daemons require additional shared libraries to start, +# use the following variable to run ldconfig(8) in advance: +# frr_extralibs_path="/usr/local/lib ..." +# +# This RC script was adapted from the net/quagga port + +. /etc/rc.subr + +name=frr +rcvar=${name}_enable + +start_postcmd=start_postcmd +stop_postcmd="rm -f $pidfile" +configtest_cmd=check_config +extra_commands=configtest +command_args="-d" + +load_rc_config $name +: ${frr_enable:="NO"} +: ${frr_flags:=""} +: ${frr_daemons:="zebra babeld bfdd bgpd eigrpd fabricd isisd ospfd ospf6d ripd ripngd staticd"} +: ${frr_vtysh_boot:="NO"} +: ${frr_wait_for:=""} +: ${frr_wait_seconds:="90"} + +check_config() +{ + echo "Checking $daemon.conf" + # pimd doesn't support -C + if [ "$daemon" = "pimd" ]; then + echo "Ignored" + else + $command $daemon_flags -C + result=$? + if [ "$result" -eq "0" ]; then + echo "OK" + else + echo "FAILED" + exit + fi + fi +} + +start_postcmd() +{ + local waited_for + waited_for=0 + # Wait only when last daemon has started. + if [ "${frr_daemons}" = "${frr_daemons% ${name}}" ]; then + return; + fi + if [ -n "${frr_wait_for}" ]; then + echo Waiting for ${frr_wait_for} route... + while [ ${waited_for} -lt ${frr_wait_seconds} ]; do + /sbin/route -n get ${frr_wait_for} >/dev/null 2>&1 && break; + waited_for=$((waited_for+1)) + sleep 1; + done + [ ${waited_for} -lt ${frr_wait_seconds} ] || echo Giving up... + fi +} + +do_cmd() +{ + local ret + ret=0 + frr_cmd=$1 + if checkyesno frr_vtysh_boot && ( [ ${frr_cmd} = "restart" ] || [ ${frr_cmd} = "start" ] ); then + echo "Checking intergrated config..." + daemon="vtysh" + daemon_flags="" + command=%%PREFIX%%/bin/${daemon} + if ! [ -f %%ETCDIR%%/vtysh.conf ]; then + touch %%ETCDIR%%/vtysh.conf + fi + check_config + fi + for daemon in ${frr_daemons}; do + command=%%PREFIX%%/sbin/${daemon} + pidfile=/var/run/frr/${daemon}.pid + if ! checkyesno frr_vtysh_boot; then + required_files=%%ETCDIR%%/${daemon}.conf + if [ ${frr_cmd} = "restart" ] || [ ${frr_cmd} = "start" ]; then + check_config + fi + if [ ${frr_cmd} = "start" ] && ! [ -f ${required_files} ]; then + continue + fi + fi + if [ ${frr_cmd} = "stop" ] && [ -z "$(check_process ${command})" ]; then + continue + fi + eval flags=\$\{${daemon}_flags:-\"${frr_flags}\"\} + name=${daemon} + _rc_restart_done=false + run_rc_command "$1" || ret=1 + done + if checkyesno frr_vtysh_boot && ( [ ${frr_cmd} = "restart" ] || [ ${frr_cmd} = "start" ] ); then + echo "Booting for integrated-vtysh-config..." + %%PREFIX%%/bin/vtysh -b + fi + return ${ret} +} + +frr_cmd=$1 + +case "$1" in + force*) + frr_cmd=${frr_cmd#force} + ;; + fast*) + frr_cmd=${frr_cmd#fast} + ;; +esac +shift + +if [ $# -ge 1 -a "$1" != "all" ]; then + frr_daemons="$*" +fi + +case "${frr_cmd}" in + start|quietstart) + if [ -n "${frr_extralibs_path}" ]; then + /sbin/ldconfig -m ${frr_extralibs_path} + fi + # Why should I need to add this check ? + checkyesno frr_enable && do_cmd "start" + ;; + stop) + frr_daemons=$(reverse_list ${frr_daemons}) + do_cmd "stop" + ;; + restart) + frr_daemons=$(reverse_list ${frr_daemons}) + do_cmd "stop" + frr_daemons=$(reverse_list ${frr_daemons}) + checkyesno frr_enable && do_cmd "start" + ;; + *) + do_cmd "${frr_cmd}" + ;; +esac diff --git a/net/frr8/files/patch-Makefile.am b/net/frr8/files/patch-Makefile.am new file mode 100644 index 000000000000..626f17a2d784 --- /dev/null +++ b/net/frr8/files/patch-Makefile.am @@ -0,0 +1,11 @@ +--- Makefile.am.orig 2021-11-08 12:44:24.000000000 +0900 ++++ Makefile.am 2021-12-23 09:23:13.400659000 +0900 +@@ -168,7 +168,7 @@ + include qpb/subdir.am + include fpm/subdir.am + include grpc/subdir.am +-include tools/subdir.am ++# include tools/subdir.am + + include bgpd/subdir.am + include bgpd/rfp-example/librfp/subdir.am diff --git a/net/frr8/files/patch-backport.patch b/net/frr8/files/patch-backport.patch new file mode 100644 index 000000000000..434a37a08aa6 --- /dev/null +++ b/net/frr8/files/patch-backport.patch @@ -0,0 +1,175 @@ +From 5362aa8ce565554973b282e47084e8b3cacabadb Mon Sep 17 00:00:00 2001 +From: Bijan <bijanebrahimi@riseup.net> +Date: Tue, 1 Feb 2022 11:03:00 +0330 +Subject: [PATCH 1/2] zebra: Keep the interface flags safe on multiple ioctl + calls + +Trying to call multiple ioctl calls on ifreq will result in +overwriting ifreq with garbage data. On if_get_flags call, +try to keep the flags field safe from another possible ioctl +call before applying the flags field. + +Modified code as per Code Review, done by Donald Sharp. + +Signed-off-by: Bijan <bijanebrahimi@riseup.net> +(cherry picked from commit 16dca7cec5f47b7a6f83822a1e681652b7d2d60d) +--- + zebra/ioctl.c | 25 ++++++++++++++----------- + 1 file changed, 14 insertions(+), 11 deletions(-) + +diff --git zebra/ioctl.c zebra/ioctl.c +index 8b30eea9f11..9b6aaf1d85a 100644 +--- zebra/ioctl.c ++++ zebra/ioctl.c +@@ -410,11 +410,14 @@ int if_unset_prefix_ctx(const struct zebra_dplane_ctx *ctx) + void if_get_flags(struct interface *ifp) + { + int ret; +- struct ifreq ifreq; ++ struct ifreq ifreqflags; ++ struct ifreq ifreqdata; + +- ifreq_set_name(&ifreq, ifp); ++ ifreq_set_name(&ifreqflags, ifp); ++ ifreq_set_name(&ifreqdata, ifp); + +- ret = vrf_if_ioctl(SIOCGIFFLAGS, (caddr_t)&ifreq, ifp->vrf->vrf_id); ++ ret = vrf_if_ioctl(SIOCGIFFLAGS, (caddr_t)&ifreqflags, ++ ifp->vrf->vrf_id); + if (ret < 0) { + flog_err_sys(EC_LIB_SYSTEM_CALL, + "vrf_if_ioctl(SIOCGIFFLAGS %s) failed: %s", +@@ -448,8 +451,8 @@ void if_get_flags(struct interface *ifp) + struct if_data ifd = {.ifi_link_state = 0}; + struct if_data *ifdata = &ifd; + +- ifreq.ifr_data = (caddr_t)ifdata; +- ret = vrf_if_ioctl(SIOCGIFDATA, (caddr_t)&ifreq, ifp->vrf->vrf_id); ++ ifreqdata.ifr_data = (caddr_t)ifdata; ++ ret = vrf_if_ioctl(SIOCGIFDATA, (caddr_t)&ifreqdata, ifp->vrf->vrf_id); + #endif + + if (ret == -1) +@@ -459,12 +462,12 @@ void if_get_flags(struct interface *ifp) + safe_strerror(errno)); + else { + if (ifdata->ifi_link_state >= LINK_STATE_UP) +- SET_FLAG(ifreq.ifr_flags, IFF_RUNNING); ++ SET_FLAG(ifreqflags.ifr_flags, IFF_RUNNING); + else if (ifdata->ifi_link_state == LINK_STATE_UNKNOWN) + /* BSD traditionally treats UNKNOWN as UP */ +- SET_FLAG(ifreq.ifr_flags, IFF_RUNNING); ++ SET_FLAG(ifreqflags.ifr_flags, IFF_RUNNING); + else +- UNSET_FLAG(ifreq.ifr_flags, IFF_RUNNING); ++ UNSET_FLAG(ifreqflags.ifr_flags, IFF_RUNNING); + } + + #elif defined(HAVE_BSD_LINK_DETECT) +@@ -489,14 +492,14 @@ void if_get_flags(struct interface *ifp) + ifp->name, safe_strerror(errno)); + } else if (ifmr.ifm_status & IFM_AVALID) { /* media state is valid */ + if (ifmr.ifm_status & IFM_ACTIVE) /* media is active */ +- SET_FLAG(ifreq.ifr_flags, IFF_RUNNING); ++ SET_FLAG(ifreqflags.ifr_flags, IFF_RUNNING); + else +- UNSET_FLAG(ifreq.ifr_flags, IFF_RUNNING); ++ UNSET_FLAG(ifreqflags.ifr_flags, IFF_RUNNING); + } + #endif /* HAVE_BSD_LINK_DETECT */ + + out: +- if_flags_update(ifp, (ifreq.ifr_flags & 0x0000ffff)); ++ if_flags_update(ifp, (ifreqflags.ifr_flags & 0x0000ffff)); + } + + /* Set interface flags */ + +From f26e0528634a8ad8e401ba8d9f708335a9349be1 Mon Sep 17 00:00:00 2001 +From: Donald Sharp <sharpd@nvidia.com> +Date: Thu, 24 Mar 2022 12:57:01 -0400 +Subject: [PATCH 2/2] zebra: Don't send uninited data to kernel on FreeBSD + +When running zebra w/ valgrind, it was noticed that there +was a bunch of passing uninitialized data to the kernel: + +==38194== Syscall param ioctl(generic) points to uninitialised byte(s) +==38194== at 0x4CDF88A: ioctl (in /lib/libc.so.7) +==38194== by 0x49A4031: vrf_ioctl (vrf.c:860) +==38194== by 0x2AFE29: vrf_if_ioctl (ioctl.c:91) +==38194== by 0x2AFF39: if_get_mtu (ioctl.c:161) +==38194== by 0x2B12C3: ifm_read (kernel_socket.c:653) +==38194== by 0x2A7F76: interface_list (if_sysctl.c:129) +==38194== by 0x2E9958: zebra_ns_enable (zebra_ns.c:127) +==38194== by 0x2E9958: zebra_ns_init (zebra_ns.c:214) +==38194== by 0x2B3F82: main (main.c:401) +==38194== Address 0x7fc000967 is on thread 1's stack +==38194== in frame #3, created by if_get_mtu (ioctl.c:155) +==38194== +==38194== Syscall param ioctl(generic) points to uninitialised byte(s) +==38194== at 0x4CDF88A: ioctl (in /lib/libc.so.7) +==38194== by 0x49A4031: vrf_ioctl (vrf.c:860) +==38194== by 0x2AFE29: vrf_if_ioctl (ioctl.c:91) +==38194== by 0x2AFED9: if_get_metric (ioctl.c:143) +==38194== by 0x2B12CB: ifm_read (kernel_socket.c:655) +==38194== by 0x2A7F76: interface_list (if_sysctl.c:129) +==38194== by 0x2E9958: zebra_ns_enable (zebra_ns.c:127) +==38194== by 0x2E9958: zebra_ns_init (zebra_ns.c:214) +==38194== by 0x2B3F82: main (main.c:401) +==38194== Address 0x7fc000967 is on thread 1's stack +==38194== in frame #3, created by if_get_metric (ioctl.c:137) +==38194== +==38194== Syscall param ioctl(generic) points to uninitialised byte(s) +==38194== at 0x4CDF88A: ioctl (in /lib/libc.so.7) +==38194== by 0x49A4031: vrf_ioctl (vrf.c:860) +==38194== by 0x2AFE29: vrf_if_ioctl (ioctl.c:91) +==38194== by 0x2B052D: if_get_flags (ioctl.c:419) +==38194== by 0x2B1CF1: ifam_read (kernel_socket.c:930) +==38194== by 0x2A7F57: interface_list (if_sysctl.c:132) +==38194== by 0x2E9958: zebra_ns_enable (zebra_ns.c:127) +==38194== by 0x2E9958: zebra_ns_init (zebra_ns.c:214) +==38194== by 0x2B3F82: main (main.c:401) +==38194== Address 0x7fc000707 is on thread 1's stack +==38194== in frame #3, created by if_get_flags (ioctl.c:411) + +Valgrind is no longer reporting these issues. + +Signed-off-by: Donald Sharp <sharpd@nvidia.com> +(cherry picked from commit ceacdc721682cdc929835ff3adc1e0f824f83dcb) +--- + zebra/ioctl.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git zebra/ioctl.c zebra/ioctl.c +index 9b6aaf1d85a..a895ed94100 100644 +--- zebra/ioctl.c ++++ zebra/ioctl.c +@@ -136,7 +136,7 @@ static int if_ioctl_ipv6(unsigned long request, caddr_t buffer) + void if_get_metric(struct interface *ifp) + { + #ifdef SIOCGIFMETRIC +- struct ifreq ifreq; ++ struct ifreq ifreq = {}; + + ifreq_set_name(&ifreq, ifp); + +@@ -153,7 +153,7 @@ void if_get_metric(struct interface *ifp) + /* get interface MTU */ + void if_get_mtu(struct interface *ifp) + { +- struct ifreq ifreq; ++ struct ifreq ifreq = {}; + + ifreq_set_name(&ifreq, ifp); + +@@ -410,8 +410,8 @@ int if_unset_prefix_ctx(const struct zebra_dplane_ctx *ctx) + void if_get_flags(struct interface *ifp) + { + int ret; +- struct ifreq ifreqflags; +- struct ifreq ifreqdata; ++ struct ifreq ifreqflags = {}; ++ struct ifreq ifreqdata = {}; + + ifreq_set_name(&ifreqflags, ifp); + ifreq_set_name(&ifreqdata, ifp); diff --git a/net/frr8/files/watchfrr.in b/net/frr8/files/watchfrr.in new file mode 100644 index 000000000000..f3a36434e7f6 --- /dev/null +++ b/net/frr8/files/watchfrr.in @@ -0,0 +1,30 @@ +#!/bin/sh + +# PROVIDE: watchfrr +# REQUIRE: NETWORKING frr +# KEYWORD: nojailvtnet shutdown + +# Add the following line to /etc/rc.conf to enable watchfrr: +# watchfrr_enable="YES" +# +# You may also wish to use the following variables to fine-tune startup: +# watchfrr_flags +# Example of flags usage: +# watchfrr_flags=" -d -r /usr/sbin/servicebBfrrbBrestartbB%s -s /usr/sbin/servicebBfrrbBstartbB%s -k /usr/sbin/servicebBfrrbBstopbB%s -b bB -t 30 zebra ripd ripngd ospfd ospf6d bgpd isisd eigrpd babeld bfdd staticd" + +. /etc/rc.subr + +name=watchfrr +rcvar=${name}_enable + +load_rc_config $name + +stop_postcmd="rm -f $pidfile" + +watchfrr_enable=${watchfrr_enable:-"NO"} +watchfrr_flags=${watchfrr_flags:-"-d -r /usr/sbin/servicebBfrrbBrestartbB%s -s /usr/sbin/servicebBfrrbBstartbB%s -k /usr/sbin/servicebBfrrbBstopbB%s -b bB -t 30 zebra babeld bfdd bgpd eigrpd fabricd isisd ospfd ospf6d ripd ripngd staticd"} + +command=%%PREFIX%%/sbin/watchfrr +pidfile=/var/run/frr/watchfrr.pid + +run_rc_command "$1" diff --git a/net/frr8/pkg-descr b/net/frr8/pkg-descr new file mode 100644 index 000000000000..6ac4ad877355 --- /dev/null +++ b/net/frr8/pkg-descr @@ -0,0 +1,5 @@ +FRRouting (FRR) is an IP routing protocol suite for Linux and Unix platforms +which includes protocol daemons for BGP, IS-IS, OSPF and RIP. FRR has its roots +in the Quagga project. + +WWW: https://frrouting.org/ diff --git a/net/frr8/pkg-message b/net/frr8/pkg-message new file mode 100644 index 000000000000..3db74b88e26c --- /dev/null +++ b/net/frr8/pkg-message @@ -0,0 +1,17 @@ +[ +{ type: install + message: <<EOM +Beware that remote control of frr8 daemons over TCP sockets is enabled by +default. +Use daemon flags in /etc/rc.conf to disable it if unneeded, for example: +zebra_flags="-P0" +ospfd_flags="-P0" + +FRR's OSPF daemons tries to allocate big socket buffer, so generate warning +messages like: +"setsockopt_so_sendbuf: fd 6: SO_SNDBUF set to 1048576 (requested 8388608)" +To prevent such message kern.ipc.maxsockbuf can be increased: +sysctl kern.ipc.maxsockbuf=16777216 +EOM +} +] diff --git a/net/frr8/pkg-plist b/net/frr8/pkg-plist new file mode 100644 index 000000000000..102b9985eefc --- /dev/null +++ b/net/frr8/pkg-plist @@ -0,0 +1,220 @@ +%%VTYSH%%bin/vtysh +%%SHARPD%%sbin/sharpd +include/frr/agg_table.h +include/frr/atomlist.h +include/frr/assert.h +include/frr/bfdd/bfddp_packet.h +include/frr/libfrr_trace.h +include/frr/link_state.h +include/frr/resolver.h +include/frr/trace.h +include/frr/xref.h +include/frr/yang.h +include/frr/yang_translator.h +include/frr/yang_wrappers.h +include/frr/bfd.h +include/frr/bitfield.h +include/frr/buffer.h +include/frr/checksum.h +include/frr/command.h +include/frr/command_graph.h +include/frr/command_match.h +include/frr/compiler.h +include/frr/csv.h +include/frr/db.h +include/frr/debug.h +include/frr/defaults.h +include/frr/distribute.h +include/frr/eigrpd/eigrp_dump.h +include/frr/eigrpd/eigrp_topology.h +include/frr/eigrpd/eigrpd.h +include/frr/ferr.h +include/frr/filter.h +include/frr/freebsd-queue.h +include/frr/frr_pthread.h +include/frr/frratomic.h +include/frr/frrcu.h +include/frr/frrlua.h +include/frr/frrstr.h +include/frr/frrscript.h +include/frr/getopt.h +include/frr/graph.h +include/frr/hash.h +include/frr/hook.h +include/frr/iana_afi.h +include/frr/id_alloc.h +include/frr/if.h +include/frr/if_rmap.h +include/frr/imsg.h +include/frr/ipaddr.h +include/frr/jhash.h +include/frr/json.h +include/frr/keychain.h +include/frr/ldp_sync.h +include/frr/lib_errors.h +include/frr/lib_vty.h +include/frr/libfrr.h +include/frr/libospf.h +include/frr/linklist.h +include/frr/log.h +include/frr/log_vty.h +include/frr/md5.h +include/frr/memory.h +include/frr/mlag.h +include/frr/module.h +include/frr/monotime.h +include/frr/mpls.h +include/frr/network.h +include/frr/nexthop.h +include/frr/nexthop_group.h +include/frr/nexthop_group_private.h +include/frr/northbound.h +include/frr/northbound_cli.h +include/frr/northbound_db.h +include/frr/ns.h +include/frr/openbsd-queue.h +include/frr/openbsd-tree.h +include/frr/ospfd/ospf_api.h +include/frr/ospfd/ospf_asbr.h +include/frr/ospfd/ospf_dump.h +include/frr/ospfd/ospf_dump_api.h +include/frr/ospfd/ospf_ism.h +include/frr/ospfd/ospf_lsa.h +include/frr/ospfd/ospf_lsdb.h +include/frr/ospfd/ospf_nsm.h +include/frr/ospfd/ospf_opaque.h +include/frr/ospfd/ospfd.h +include/frr/pbr.h +include/frr/plist.h +include/frr/prefix.h +include/frr/printfrr.h +include/frr/privs.h +include/frr/ptm_lib.h +include/frr/pullwr.h +include/frr/pw.h +include/frr/queue.h +include/frr/qobj.h +include/frr/ringbuf.h +include/frr/route_opaque.h +include/frr/route_types.h +include/frr/routemap.h +include/frr/routing_nb.h +include/frr/sbuf.h +include/frr/seqlock.h +include/frr/sha256.h +include/frr/sigevent.h +include/frr/smux.h +include/frr/spf_backoff.h +include/frr/skiplist.h +include/frr/sockopt.h +include/frr/sockunion.h +include/frr/srcdest_table.h +include/frr/srte.h +include/frr/srv6.h +include/frr/stream.h +include/frr/systemd.h +include/frr/table.h +include/frr/termtable.h +include/frr/thread.h +include/frr/typerb.h +include/frr/typesafe.h +include/frr/vector.h +include/frr/version.h +include/frr/vlan.h +include/frr/vrf_int.h +include/frr/vrf.h +include/frr/vty.h +include/frr/vxlan.h +include/frr/wheel.h +include/frr/workqueue.h +include/frr/zclient.h +include/frr/zebra.h +include/frr/zlog.h +include/frr/zlog_targets.h +lib/libfrr.a +lib/libfrr.so +lib/libfrr.so.0 +lib/libfrr.so.0.0.0 +lib/libfrrcares.a +lib/libfrrcares.so +lib/libfrrcares.so.0 +lib/libfrrcares.so.0.0.0 +%%SNMP%%lib/frr/modules/bgpd_snmp.so +%%SNMP%%lib/frr/modules/bgpd_bmp.so +%%SNMP%%lib/frr/modules/ospf6d_snmp.so +%%SNMP%%lib/frr/modules/ospfd_snmp.so +%%SNMP%%lib/frr/modules/ripd_snmp.so +%%SNMP%%lib/frr/modules/zebra_snmp.so +%%FPM%%lib/frr/modules/zebra_fpm.so +%%SNMP%%lib/libfrrsnmp.a +%%SNMP%%lib/libfrrsnmp.so +%%SNMP%%lib/libfrrsnmp.so.0 +%%SNMP%%lib/libfrrsnmp.so.0.0.0 +%%RPKI%%lib/frr/modules/bgpd_rpki.so +%%MANPAGES%%man/man1/frr.1.gz +%%MANPAGES%%man/man8/frr-bfdd.8.gz +%%MANPAGES%%man/man8/frr-eigrpd.8.gz +%%MANPAGES%%man/man8/frr-isisd.8.gz +%%MANPAGES%%man/man8/frr-staticd.8.gz +%%MANPAGES%%man/man8/frr-watchfrr.8.gz +%%MANPAGES%%%%VTYSH%%man/man1/vtysh.1.gz +%%MANPAGES%%man/man8/frr-bgpd.8.gz +%%MANPAGES%%%%LDPD%%man/man8/frr-ldpd.8.gz +%%MANPAGES%%man/man8/frr-ospf6d.8.gz +%%MANPAGES%%man/man8/frr-ospfd.8.gz +%%MANPAGES%%man/man8/frr-pbrd.8.gz +%%MANPAGES%%man/man8/frr-ripd.8.gz +%%MANPAGES%%man/man8/frr-ripngd.8.gz +%%MANPAGES%%man/man8/frr-zebra.8.gz +sbin/babeld +sbin/bfdd +sbin/bgpd +%%LDPD%%sbin/ldpd +sbin/eigrpd +sbin/fabricd +sbin/frr-reload +sbin/ospf6d +sbin/ospfd +sbin/pbrd +sbin/ripd +sbin/ripngd +sbin/staticd +sbin/zebra +sbin/isisd +sbin/watchfrr +share/yang/ietf-bgp-types.yang +share/yang/frr-bgp-bmp.yang +share/yang/frr-bgp-common-multiprotocol.yang +share/yang/frr-bgp-common-structure.yang +share/yang/frr-bgp-common.yang +share/yang/frr-bgp-filter.yang +share/yang/frr-bgp-neighbor.yang +share/yang/frr-bgp-peer-group.yang +share/yang/frr-bgp-route-map.yang +share/yang/frr-bgp-rpki.yang +share/yang/frr-bgp-types.yang +share/yang/frr-bgp.yang +share/yang/frr-deviations-bgp-datacenter.yang +share/yang/frr-ospf-route-map.yang +share/yang/frr-ospf6-route-map.yang +share/yang/frr-ospfd.yang +share/yang/frr-bfdd.yang +share/yang/frr-eigrpd.yang +share/yang/frr-interface.yang +share/yang/frr-isisd.yang +share/yang/frr-module-translator.yang +share/yang/frr-ripd.yang +share/yang/frr-ripngd.yang +share/yang/frr-route-types.yang +share/yang/frr-test-module.yang +share/yang/frr-filter.yang +share/yang/frr-nexthop.yang +share/yang/frr-route-map.yang +share/yang/frr-routing.yang +share/yang/frr-staticd.yang +share/yang/frr-vrf.yang +share/yang/frr-zebra.yang +share/yang/frr-zebra-route-map.yang +share/yang/ietf-interfaces.yang +share/yang/ietf-routing-types.yang +@dir(frr,frr,750) /var/run/frr |