git: da52c06a1f31 - main - net/frr10: Add new branch 10

From: Olivier Cochard <olivier_at_FreeBSD.org>
Date: Sun, 29 Sep 2024 23:30:53 UTC
The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/ports/commit/?id=da52c06a1f31e71ca99a4b467d61469cebb1484e

commit da52c06a1f31e71ca99a4b467d61469cebb1484e
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2024-09-29 23:25:59 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2024-09-29 23:30:23 +0000

    net/frr10: Add new branch 10
    
    ChangeLog:      https://github.com/FRRouting/frr/releases/tag/frr-10.1.1
    PR:             278384
    Reported by:    pi
---
 net/Makefile                       |   2 +
 net/frr10-pythontools/Makefile     |   7 +
 net/frr10-pythontools/pkg-plist    |   3 +
 net/frr10/Makefile                 | 143 ++++++++++++++++++++
 net/frr10/distinfo                 |   3 +
 net/frr10/files/frr.in             | 246 ++++++++++++++++++++++++++++++++++
 net/frr10/files/patch-Makefile.am  |  11 ++
 net/frr10/files/patch-lib_event.c  |  14 ++
 net/frr10/files/patch-lib_libfrr.c |  14 ++
 net/frr10/files/patch-lib_libfrr.h |  11 ++
 net/frr10/pkg-descr                |   3 +
 net/frr10/pkg-message              |  17 +++
 net/frr10/pkg-plist                | 264 +++++++++++++++++++++++++++++++++++++
 net/frr8/Makefile                  |   2 +-
 net/frr9/Makefile                  |   2 +-
 15 files changed, 740 insertions(+), 2 deletions(-)

diff --git a/net/Makefile b/net/Makefile
index 4c772e99439d..3a95cda7137e 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -174,6 +174,8 @@
     SUBDIR += frr8-pythontools
     SUBDIR += frr9
     SUBDIR += frr9-pythontools
+    SUBDIR += frr10
+    SUBDIR += frr10-pythontools
     SUBDIR += fspclient
     SUBDIR += fspd
     SUBDIR += fsplib
diff --git a/net/frr10-pythontools/Makefile b/net/frr10-pythontools/Makefile
new file mode 100644
index 000000000000..c93cfb950e0b
--- /dev/null
+++ b/net/frr10-pythontools/Makefile
@@ -0,0 +1,7 @@
+COMMENT=	Provide configuration reload functionality for FRR
+
+PYTHONTOOLS=		yes
+
+MASTERDIR=	${.CURDIR}/../frr10
+
+.include "${MASTERDIR}/Makefile"
diff --git a/net/frr10-pythontools/pkg-plist b/net/frr10-pythontools/pkg-plist
new file mode 100644
index 000000000000..1304b08bdb89
--- /dev/null
+++ b/net/frr10-pythontools/pkg-plist
@@ -0,0 +1,3 @@
+sbin/frr-reload.py
+sbin/generate_support_bundle.py
+%%ETCDIR%%/support_bundle_commands.conf
diff --git a/net/frr10/Makefile b/net/frr10/Makefile
new file mode 100644
index 000000000000..6ba39b92ea97
--- /dev/null
+++ b/net/frr10/Makefile
@@ -0,0 +1,143 @@
+PORTNAME=	frr
+DISTVERSIONPREFIX=	frr-
+DISTVERSION=	10.1.1
+CATEGORIES=	net
+.if defined(PYTHONTOOLS)
+PKGNAMESUFFIX=	10-pythontools
+.else
+PKGNAMESUFFIX=	10
+.endif
+
+MAINTAINER=	olivier@FreeBSD.org
+COMMENT?=	IP routing protocol suite
+WWW=		https://frrouting.org/
+
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+.if defined(PYTHONTOOLS)
+RUN_DEPENDS=	frr-reload:net/frr10
+
+USES=	python:run shebangfix
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|/etc/frr|${ETCDIR}|g' \
+		-e 's|/usr/bin|${PREFIX}/bin|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
+
+LIB_DEPENDS=	libcares.so:dns/c-ares \
+		libjson-c.so:devel/json-c \
+		libpcre2-8.so:devel/pcre2 \
+		libprotobuf-c.so:devel/protobuf-c \
+		libyang.so.2:net/libyang2
+
+USES=		autoreconf bison compiler:c++11-lang gmake libtool makeinfo \
+		pkgconfig python:build readline shebangfix
+
+BINARY_ALIAS=	python=${PYTHON_VERSION}
+
+CONFLICTS=	frr8 frr9 openbgpd openospfd quagga zebra
+
+GNU_CONFIGURE=	yes
+GNU_CONFIGURE_MANPREFIX=	${PREFIX}/share
+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=		BACKTRACE CONFIGROLLBACKS DATACENTER FPM LDPD MANPAGES \
+			MULTIPATH PAM RPKI SHARPD SHELLACCESS SNMP TCMALLOC
+OPTIONS_DEFAULT=	BACKTRACE FPM MANPAGES RPKI
+OPTIONS_SUB=	yes
+
+BACKTRACE_DESC=		Enable backtrace
+CONFIGROLLBACKS_DESC=	Enable configuration rollback support
+DATACENTER_DESC=	Use reduced BGP timers
+FPM_DESC=		Enable Forwarding Plane Manager support
+LDPD_DESC=		Build ldpd
+MULTIPATH_DESC=		Allow 64 multipath routes (16 default)
+PAM_DESC=		Use libpam for PAM support in vtysh
+RPKI_DESC=		Add BGP RPKI (RFC 6810) support
+SHARPD_DESC=		Build sharpd
+SHELLACCESS_DESC=	Allow users to access shell/telnet/ssh
+SNMP_DESC=		SNMP support
+TCMALLOC_DESC=		Use tcmalloc
+
+USERS=	frr
+GROUPS=	frr frrvty
+
+# PIMD and PBRD compile but doesn't work on FreeBSD
+CONFIGURE_ARGS=	--enable-user=frr \
+		--enable-group=frr \
+		--enable-vty-group=frrvty \
+		--enable-vtysh \
+		--disable-doc-html \
+		--sysconfdir=${ETCDIR} \
+		--localstatedir=/var/run/frr \
+		--disable-nhrpd \
+		--disable-pathd \
+		--disable-ospfclient \
+		--disable-pimd \
+		--disable-pbrd \
+		--with-vtysh-pager=cat
+
+BACKTRACE_LIB_DEPENDS=		libunwind.so:devel/libunwind
+BACKTRACE_CONFIGURE_ENABLE=	backtrace
+CONFIGROLLBACKS_USES=	sqlite
+CONFIGROLLBACKS_CONFIGURE_ENABLE=	config-rollbacks
+DATACENTER_CONFIGURE_ENABLE=	datacenter
+FPM_CONFIGURE_ENABLE=		fpm
+LDPD_CONFIGURE_ENABLE=		ldpd
+MANPAGES_BUILD_DEPENDS=		${PYTHON_PKGNAMEPREFIX}sphinx>=0,1:textproc/py-sphinx@${PY_FLAVOR}
+MANPAGES_CONFIGURE_OFF=		--disable-doc
+MULTIPATH_CONFIGURE_ON=		--enable-multipath=64
+PAM_CONFIGURE_WITH=		libpam
+RPKI_CONFIGURE_ENABLE=		rpki
+RPKI_LIB_DEPENDS=		librtr.so:net-mgmt/rtrlib \
+				libssh.so:security/libssh
+SHARPD_CONFIGURE_ENABLE=	sharpd
+SHELLACCESS_CONFIGURE_ENABLE=	shell-access
+SNMP_CONFIGURE_ENABLE=		snmp
+SNMP_LIB_DEPENDS=		libnetsnmp.so:net-mgmt/net-snmp
+SNMP_USES=			ssl
+TCMALLOC_CONFIGURE_ENABLE=	tcmalloc
+TCMALLOC_LIB_DEPENDS=		libtcmalloc.so:devel/google-perftools
+
+USE_RC_SUBR=	frr
+
+SHEBANG_FILES=	yang/embedmodel.py
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|/etc/frr|${ETCDIR}|g' \
+		-e 's|/usr/lib/frr|${PREFIX}/sbin|g' \
+		-e 's|frr-pythontools|frr10-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/frr10/distinfo b/net/frr10/distinfo
new file mode 100644
index 000000000000..d65c514ef47f
--- /dev/null
+++ b/net/frr10/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1727640851
+SHA256 (FRRouting-frr-frr-10.1.1_GH0.tar.gz) = 76004c312de3348b6164f6ae15db4c0cf0f504945f8c69aed871c0b4dcedfa29
+SIZE (FRRouting-frr-frr-10.1.1_GH0.tar.gz) = 11044980
diff --git a/net/frr10/files/frr.in b/net/frr10/files/frr.in
new file mode 100644
index 000000000000..b17e61233bfc
--- /dev/null
+++ b/net/frr10/files/frr.in
@@ -0,0 +1,246 @@
+#!/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"
+
+# FRR's daemon management concept:
+# - watchfrr is used to manage (start/monitor/restart) all frr deamons;
+# - vtysh used to daemons boot startup configuration;
+# - mgmtd is the management plane.
+# There are a minimum of 3 daemons running: watchfrr, zebra, mgmtd
+
+# Startup details with watchfrr enabled (default):
+# 1. "service frr start" calls "service frr start watchfrr"
+# 2. watchfrr once started calls "service frr restart all"
+# 3. "restart all" need to loop the list of $frr_daemons to start each
+#    of then
+# 4. vtysh -b is executed to load boot startup configuration
+
+# Startup detail with watchfrr disabled (deprecated mode):
+# 1. "service frr start" call "service frr start all" and need to loop $frr_daemons
+
+# To select a limited set of daemons to run, use the frr_daemons.
+# Order matters: keep mgmtd first, followed by zebra.
+# Example to start only staticd and bgpd:
+#  frr_daemons="mgmtd zebra staticd bgpd"
+
+# You may also wish to use the following variables to fine-tune startup:
+# To disable integrated configuration mode, to use one configuration file per
+# daemons.
+# This mode is deprecated and not compatible with watchfrr and mgmtd
+#  frr_vtysh_boot="NO"
+#  watchfrr_enable="NO"
+
+# Global tuning
+#  frr_flags="--limit-fds 100000" (restricting fds for each daemons)
+#  frr_default_profile="datacenter" (default: traditional)
+# 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:
+# - FRR's tools/frrinit.sh.in (starting watchfrr)
+# - FRR's tools/frrcommon.sh.in (starting frr daemons)
+# - FRR's tools/etc/frr/daemons (default daemon flags)
+
+. /etc/rc.subr
+
+name=frr
+rcvar=${name}_enable
+
+start_postcmd=start_postcmd
+command_args="-d"
+
+load_rc_config $name
+: ${frr_enable:="NO"}
+: ${frr_flags:="--limit-fds 100000"}
+: ${watchfrr_enable:="YES"}
+: ${frr_daemons:="mgmtd zebra babeld bfdd bgpd eigrpd fabricd isisd ospfd ospf6d ripd ripngd staticd"}
+: ${watchfrr_flags:="-r /usr/sbin/servicebBfrrbBrestartbB%s -s /usr/sbin/servicebBfrrbBstartbB%s -k /usr/sbin/servicebBfrrbBstopbB%s -b bB -t 30"}
+: ${frr_default_profile:="traditional"}
+: ${frr_vtysh_boot:="YES"}
+: ${frr_wait_for:=""}
+: ${frr_wait_seconds:="90"}
+# Default daemons'flag restrict binding vty's to localhost
+: ${zebra_flags:="-A 127.0.0.1"}
+: ${mgmtd_flags:="-A 127.0.0.1"}
+: ${babeld_flags:="-A 127.0.0.1"}
+: ${bgpd_flags:="-A 127.0.0.1"}
+: ${eigrpd_flags:="-A 127.0.0.1"}
+: ${fabricd_flags:="-A 127.0.0.1"}
+: ${isisd_flags:="-A 127.0.0.1"}
+: ${ospfd_flags:="-A 127.0.0.1"}
+: ${ospf6d_flags:="-A ::1"}
+: ${ripd_flags:="-A 127.0.0.1"}
+: ${ripngd_flags:="-A ::1"}
+: ${staticd_flags:="-A 127.0.0.1"}
+frr_flags="${frr_flags} -F ${frr_default_profile}"
+
+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() {
+	# Entering here, global var dmn contains the daemon name
+	# $1 the daemon name (must be uniq and cannot be all)
+	local ret
+	local cmd
+	local dmn
+	ret=0
+	dmn=$1
+	if [ -n "${dmn}" ] && [ "${dmn}" != "all" ]; then
+		command=%%PREFIX%%/sbin/${dmn}
+		pidfile=/var/run/frr/${dmn}.pid
+		eval flags=\$\{${dmn}_flags:-\"\"\}
+		flags="${flags} ${frr_flags}"
+		if [ "${dmn}" = "watchfrr" ]; then
+			# watchfrr is expecting all daemon names as flags
+			flags="${flags} ${watchfrr_daemons}"
+		fi
+		name=${dmn}
+		_rc_restart_done=false
+		stop_postcmd="rm -f $pidfile"
+		run_rc_command "${frr_cmd}" || ret=1
+	else
+		echo "Bug in do_cmd(): called without argument or with all"
+		ret=1
+	fi
+	return ${ret}
+}
+
+vtysh_b () {
+	local ret
+	ret=0
+	if checkyesno frr_vtysh_boot; then
+		%%PREFIX%%/bin/vtysh -b || ret=1
+	fi
+	return ${ret}
+}
+
+loop_do_cmd() {
+	local ret
+	local daemon
+	ret=0
+	for daemon in ${frr_daemons}; do
+		do_cmd ${daemon} || ret=1
+	done
+	if ( [ ${frr_cmd} = "restart" ] || [ ${frr_cmd} = "start" ] ); then
+	    vtysh_b || ret=1
+	fi
+	return ${ret}
+}
+
+frr_cmd=$1
+
+# remove unsuported extra command
+# Example: "service frr fast start" is replaced by "service frr start"
+
+case "$1" in
+    force*)
+		frr_cmd=${frr_cmd#force}
+		;;
+    fast*)
+		frr_cmd=${frr_cmd#fast}
+		;;
+esac
+shift
+
+# If daemon specified, replace the full list by its name
+# or with watchfrr if not disabled
+# Example: extract "bgpd" from a "service frr start bgpd"
+if [ $# -ge 1 ]; then
+	if [ "$1" != "all" ]; then
+		frr_daemons=$1
+	fi
+else
+	if checkyesno watchfrr_enable; then
+		watchfrr_daemons=${frr_daemons}
+		frr_daemons=watchfrr
+	fi
+fi
+
+case "${frr_cmd}" in
+    start|quietstart)
+		if checkyesno frr_enable; then
+			if [ -n "${frr_extralibs_path}" ]; then
+				/sbin/ldconfig -m ${frr_extralibs_path}
+			fi
+			if [ -x %%PREFIX%%/etc/rc.d/watchfrr ]; then
+				echo "WARNING: Old rc.d/watchfrr detected, this file must be deleted"
+			fi
+			if checkyesno frr_vtysh_boot; then
+				echo "Checking intergrated config..."
+				if ! [ -f %%ETCDIR%%/vtysh.conf ]; then
+					mkdir -p %%ETCDIR%%
+					echo "service integrated-vtysh-config" > %%ETCDIR%%/vtysh.conf
+				fi
+				if ! [ -f %%ETCDIR%%/frr.conf ]; then
+					echo "log syslog informational" > %%ETCDIR%%/frr.conf
+				fi
+				chown -R frr:frr %%ETCDIR%%
+			fi
+			loop_do_cmd
+		fi
+		;;
+    stop)
+		if checkyesno frr_enable; then
+			# watchfrr do not stop all daemons, so need to stop it first
+			# then continuing with all others daemons
+			if [ "${frr_daemons}" = "watchfrr" ]; then
+				loop_do_cmd
+				frr_daemons=${watchfrr_daemons}
+			fi
+			frr_daemons=$(reverse_list ${frr_daemons})
+			loop_do_cmd
+		fi
+		;;
+    restart)
+		if checkyesno frr_enable; then
+			# watchfrr calls "service frr restart all" at startup
+			# to start all services
+			frr_daemons=$(reverse_list ${frr_daemons})
+			frr_cmd=stop
+			loop_do_cmd
+			frr_daemons=$(reverse_list ${frr_daemons})
+			frr_cmd=start
+			loop_do_cmd
+		fi
+		;;
+    reload)
+		if ! [ -x %%PREFIX%%/sbin/frr-reload.py ]; then
+			echo "Please install frr-pythontools package. Required for reload"
+			exit 0
+		fi
+		%%PREFIX%%/sbin/frr-reload.py --reload --confdir %%ETCDIR%% --rundir /var/run/frr %%ETCDIR%%/frr.conf
+		;;
+    *)
+		loop_do_cmd
+		;;
+esac
diff --git a/net/frr10/files/patch-Makefile.am b/net/frr10/files/patch-Makefile.am
new file mode 100644
index 000000000000..626f17a2d784
--- /dev/null
+++ b/net/frr10/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/frr10/files/patch-lib_event.c b/net/frr10/files/patch-lib_event.c
new file mode 100644
index 000000000000..96acbf3265ce
--- /dev/null
+++ b/net/frr10/files/patch-lib_event.c
@@ -0,0 +1,14 @@
+--- lib/event.c.orig	2024-09-12 07:46:05 UTC
++++ lib/event.c
+@@ -571,8 +571,9 @@ struct event_loop *event_master_create(const char *nam
+ 	}
+ 
+ 	if (rv->fd_limit > STUPIDLY_LARGE_FD_SIZE) {
+-		zlog_warn("FD Limit set: %u is stupidly large.  Is this what you intended?  Consider using --limit-fds also limiting size to %u",
+-			  rv->fd_limit, STUPIDLY_LARGE_FD_SIZE);
++		if (frr_is_daemon())
++			zlog_warn("FD Limit set: %u is stupidly large.  Is this what you intended?  Consider using --limit-fds also limiting size to %u",
++				  rv->fd_limit, STUPIDLY_LARGE_FD_SIZE);
+ 
+ 		rv->fd_limit = STUPIDLY_LARGE_FD_SIZE;
+ 	}
diff --git a/net/frr10/files/patch-lib_libfrr.c b/net/frr10/files/patch-lib_libfrr.c
new file mode 100644
index 000000000000..ece5de3d82e5
--- /dev/null
+++ b/net/frr10/files/patch-lib_libfrr.c
@@ -0,0 +1,14 @@
+--- lib/libfrr.c.orig	2024-09-12 07:46:05 UTC
++++ lib/libfrr.c
+@@ -1463,3 +1463,11 @@ const char *frr_vers2str(uint32_t version, char *buf, 
+ 
+ 	return buf;
+ }
++
++bool frr_is_daemon(void)
++{
++	if (di)
++		return true;
++
++	return false;
++}
diff --git a/net/frr10/files/patch-lib_libfrr.h b/net/frr10/files/patch-lib_libfrr.h
new file mode 100644
index 000000000000..fdc368a90369
--- /dev/null
+++ b/net/frr10/files/patch-lib_libfrr.h
@@ -0,0 +1,11 @@
+--- lib/libfrr.h.orig	2024-09-12 07:46:05 UTC
++++ lib/libfrr.h
+@@ -188,7 +188,7 @@ extern bool frr_is_startup_fd(int fd);
+ extern enum frr_cli_mode frr_get_cli_mode(void);
+ extern uint32_t frr_get_fd_limit(void);
+ extern bool frr_is_startup_fd(int fd);
+-
++extern bool frr_is_daemon(void);
+ /* call order of these hooks is as ordered here */
+ DECLARE_HOOK(frr_early_init, (struct event_loop * tm), (tm));
+ DECLARE_HOOK(frr_late_init, (struct event_loop * tm), (tm));
diff --git a/net/frr10/pkg-descr b/net/frr10/pkg-descr
new file mode 100644
index 000000000000..1e9960661fb1
--- /dev/null
+++ b/net/frr10/pkg-descr
@@ -0,0 +1,3 @@
+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.
diff --git a/net/frr10/pkg-message b/net/frr10/pkg-message
new file mode 100644
index 000000000000..d57d91ec8453
--- /dev/null
+++ b/net/frr10/pkg-message
@@ -0,0 +1,17 @@
+[
+{ type: install
+  message: <<EOM
+Beware that remote control of frr daemons over TCP sockets is enabled by
+default but listen on localhost.
+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/frr10/pkg-plist b/net/frr10/pkg-plist
new file mode 100644
index 000000000000..b8d9fec72859
--- /dev/null
+++ b/net/frr10/pkg-plist
@@ -0,0 +1,264 @@
+bin/vtysh
+include/frr/admin_group.h
+include/frr/affinitymap.h
+include/frr/agg_table.h
+include/frr/asn.h
+include/frr/assert.h
+include/frr/atomlist.h
+include/frr/base64.h
+include/frr/bfd.h
+include/frr/bfdd/bfddp_packet.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/cspf.h
+include/frr/csv.h
+include/frr/darr.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/flex_algo.h
+include/frr/freebsd-queue.h
+include/frr/frr_pthread.h
+include/frr/frratomic.h
+include/frr/frrcu.h
+include/frr/frrdistance.h
+include/frr/frrevent.h
+include/frr/frrlua.h
+include/frr/frrscript.h
+include/frr/frrsendmmsg.h
+include/frr/frrstr.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/iso.h
+include/frr/jhash.h
+include/frr/json.h
+include/frr/keychain.h
+include/frr/ldp_sync.h
+include/frr/libagentx.h
+include/frr/lib_errors.h
+include/frr/lib_vty.h
+include/frr/libfrr.h
+include/frr/libfrr_trace.h
+include/frr/libospf.h
+include/frr/link_state.h
+include/frr/linklist.h
+include/frr/log.h
+include/frr/log_vty.h
+include/frr/md5.h
+include/frr/memory.h
+include/frr/mgmt.pb-c.h
+include/frr/mgmt_be_client.h
+include/frr/mgmt_defines.h
+include/frr/mgmt_fe_client.h
+include/frr/mgmt_msg.h
+include/frr/mgmt_msg_native.h
+include/frr/mgmt_pb.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/qobj.h
+include/frr/queue.h
+include/frr/resolver.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/segment_routing.h
+include/frr/seqlock.h
+include/frr/sha256.h
+include/frr/sigevent.h
+include/frr/skiplist.h
+include/frr/smux.h
+include/frr/sockopt.h
+include/frr/sockunion.h
+include/frr/spf_backoff.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/tc.h
+include/frr/termtable.h
+include/frr/trace.h
+include/frr/typerb.h
+include/frr/typesafe.h
+include/frr/vector.h
+include/frr/version.h
+include/frr/vlan.h
+include/frr/vrf.h
+include/frr/vrf_int.h
+include/frr/vty.h
+include/frr/vxlan.h
+include/frr/wheel.h
+include/frr/workqueue.h
+include/frr/xref.h
+include/frr/yang.h
+include/frr/yang_translator.h
+include/frr/yang_wrappers.h
+include/frr/zclient.h
+include/frr/zebra.h
+include/frr/zlog.h
+include/frr/zlog_5424.h
+include/frr/zlog_live.h
+include/frr/zlog_recirculate.h
+include/frr/zlog_targets.h
+lib/libfrr.a
+lib/libfrr.so
+lib/libfrr.so.0
+lib/libfrr.so.0.0.0
+lib/libfrr_pb.a
+lib/libfrr_pb.so
+lib/libfrr_pb.so.0
+lib/libfrr_pb.so.0.0.0
+lib/libfrrcares.a
+lib/libfrrcares.so
+lib/libfrrcares.so.0
+lib/libfrrcares.so.0.0.0
+%%FPM%%lib/libfrrfpm_pb.a
+%%FPM%%lib/libfrrfpm_pb.so
+%%FPM%%lib/libfrrfpm_pb.so.0
+%%FPM%%lib/libfrrfpm_pb.so.0.0.0
+%%SNMP%%lib/libfrrsnmp.a
+%%SNMP%%lib/libfrrsnmp.so
+%%SNMP%%lib/libfrrsnmp.so.0
+%%SNMP%%lib/libfrrsnmp.so.0.0.0
+lib/libmgmt_be_nb.a
+lib/libmgmt_be_nb.so
+lib/libmgmt_be_nb.so.0
+lib/libmgmt_be_nb.so.0.0.0
+%%SNMP%%lib/frr/modules/bgpd_bmp.so
+%%RPKI%%lib/frr/modules/bgpd_rpki.so
+%%SNMP%%lib/frr/modules/bgpd_snmp.so
+%%SNMP%%lib/frr/modules/isisd_snmp.so
+%%SNMP%%%%LDPD%%lib/frr/modules/ldpd_snmp.so
+%%SNMP%%lib/frr/modules/ospf6d_snmp.so
+%%SNMP%%lib/frr/modules/ospfd_snmp.so
+%%SNMP%%lib/frr/modules/ripd_snmp.so
+%%FPM%%lib/frr/modules/zebra_fpm.so
+%%SNMP%%lib/frr/modules/zebra_snmp.so
+%%MANPAGES%%share/man/man1/frr.1.gz
+%%MANPAGES%%share/man/man8/frr-bfdd.8.gz
+%%MANPAGES%%share/man/man8/frr-eigrpd.8.gz
+%%MANPAGES%%share/man/man8/frr-isisd.8.gz
+%%MANPAGES%%share/man/man8/frr-staticd.8.gz
+%%MANPAGES%%share/man/man8/frr-watchfrr.8.gz
+%%MANPAGES%%share/man/man1/vtysh.1.gz
+%%MANPAGES%%share/man/man8/frr-bgpd.8.gz
+%%MANPAGES%%%%LDPD%%share/man/man8/frr-ldpd.8.gz
+%%MANPAGES%%share/man/man8/frr-ospf6d.8.gz
+%%MANPAGES%%share/man/man8/frr-ospfd.8.gz
+%%MANPAGES%%share/man/man8/frr-ripd.8.gz
+%%MANPAGES%%share/man/man8/frr-ripngd.8.gz
+%%MANPAGES%%%%SHARPD%%share/man/man8/frr-sharpd.8.gz
+%%MANPAGES%%share/man/man8/frr-zebra.8.gz
+sbin/babeld
+sbin/bfdd
+sbin/bgpd
+sbin/eigrpd
+sbin/fabricd
+sbin/fpm_listener
+sbin/frr-reload
+%%LDPD%%sbin/ldpd
+sbin/isisd
+sbin/mgmtd
+sbin/ospf6d
+sbin/ospfd
+sbin/ripd
+sbin/ripngd
+%%SHARPD%%sbin/sharpd
+sbin/staticd
+sbin/watchfrr
+sbin/zebra
+share/yang/frr-affinity-map.yang
+share/yang/frr-bfdd.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-deviations-ietf-key-chain.yang
+share/yang/frr-eigrpd.yang
+share/yang/frr-filter.yang
+share/yang/frr-if-rmap.yang
+share/yang/frr-interface.yang
+share/yang/frr-isisd.yang
+share/yang/frr-module-translator.yang
+share/yang/frr-nexthop.yang
+share/yang/frr-ospf-route-map.yang
+share/yang/frr-ospf6-route-map.yang
+share/yang/frr-ospfd.yang
+share/yang/frr-ripd.yang
+share/yang/frr-ripngd.yang
+share/yang/frr-route-map.yang
+share/yang/frr-route-types.yang
+share/yang/frr-routing.yang
+share/yang/frr-staticd.yang
+share/yang/frr-test-module.yang
+share/yang/frr-vrf.yang
+share/yang/frr-zebra-route-map.yang
+share/yang/frr-zebra.yang
+share/yang/ietf-bgp-types.yang
+share/yang/ietf-interfaces.yang
+share/yang/ietf-key-chain.yang
+share/yang/ietf-netconf-acm.yang
+share/yang/ietf-netconf-with-defaults.yang
+share/yang/ietf-netconf.yang
+share/yang/ietf-routing-types.yang
+@dir(frr,frr,750) /var/run/frr
diff --git a/net/frr8/Makefile b/net/frr8/Makefile
index 2647b167846a..fe8acd555ae7 100644
--- a/net/frr8/Makefile
+++ b/net/frr8/Makefile
@@ -45,7 +45,7 @@ USES=		autoreconf bison compiler:c++11-lang gmake libtool makeinfo \
 
 BINARY_ALIAS=	python=${PYTHON_VERSION}
 
-CONFLICTS=	frr9 openbgpd openospfd quagga zebra
+CONFLICTS=	frr9 frr10 openbgpd openospfd quagga zebra
 
 GNU_CONFIGURE=	yes
 GNU_CONFIGURE_MANPREFIX=	${PREFIX}/share
diff --git a/net/frr9/Makefile b/net/frr9/Makefile
index 98bc65f70895..f47a33004140 100644
--- a/net/frr9/Makefile
+++ b/net/frr9/Makefile
@@ -45,7 +45,7 @@ USES=		autoreconf bison compiler:c++11-lang gmake libtool makeinfo \
 
 BINARY_ALIAS=	python=${PYTHON_VERSION}
 
-CONFLICTS=	frr8 openbgpd openospfd quagga zebra
+CONFLICTS=	frr8 frr10 openbgpd openospfd quagga zebra
 
 GNU_CONFIGURE=	yes
 GNU_CONFIGURE_MANPREFIX=	${PREFIX}/share