diff --git a/net/frr10/Makefile b/net/frr10/Makefile index 3b564c48739b..db6683308853 100644 --- a/net/frr10/Makefile +++ b/net/frr10/Makefile @@ -1,143 +1,143 @@ PORTNAME= frr DISTVERSIONPREFIX= frr- -DISTVERSION= 10.2 +DISTVERSION= 10.2.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 diff --git a/net/frr10/distinfo b/net/frr10/distinfo index 3dbe8cf4ce78..78ff69b9f40e 100644 --- a/net/frr10/distinfo +++ b/net/frr10/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1732620979 -SHA256 (FRRouting-frr-frr-10.2_GH0.tar.gz) = f9212701a8bba9ce32b4f2d361149db7778bb7bdc053bfb27415ec1948d83a47 -SIZE (FRRouting-frr-frr-10.2_GH0.tar.gz) = 11173035 +TIMESTAMP = 1736186246 +SHA256 (FRRouting-frr-frr-10.2.1_GH0.tar.gz) = 6cbf142d0b12fb8679f5dc95f7638ba6faf848a44f38fd45bf9caeee8c12097c +SIZE (FRRouting-frr-frr-10.2.1_GH0.tar.gz) = 11178677 diff --git a/net/frr10/files/patch-lib_sockopt.c b/net/frr10/files/patch-lib_sockopt.c deleted file mode 100644 index 8c996de059ef..000000000000 --- a/net/frr10/files/patch-lib_sockopt.c +++ /dev/null @@ -1,33 +0,0 @@ ---- lib/sockopt.c.orig 2024-11-12 16:20:46 UTC -+++ lib/sockopt.c -@@ -19,7 +19,7 @@ - #define HAVE_BSD_STRUCT_IP_MREQ_HACK - #endif - --void setsockopt_so_recvbuf(int sock, int size) -+int setsockopt_so_recvbuf(int sock, int size) - { - int orig_req = size; - -@@ -34,9 +34,11 @@ void setsockopt_so_recvbuf(int sock, int size) - flog_err(EC_LIB_SOCKET, - "%s: fd %d: SO_RCVBUF set to %d (requested %d)", - __func__, sock, size, orig_req); -+ -+ return size; - } - --void setsockopt_so_sendbuf(const int sock, int size) -+int setsockopt_so_sendbuf(const int sock, int size) - { - int orig_req = size; - -@@ -51,6 +53,8 @@ void setsockopt_so_sendbuf(const int sock, int size) - flog_err(EC_LIB_SOCKET, - "%s: fd %d: SO_SNDBUF set to %d (requested %d)", - __func__, sock, size, orig_req); -+ -+ return size; - } - - int getsockopt_so_sendbuf(const int sock) diff --git a/net/frr10/files/patch-lib_sockopt.h b/net/frr10/files/patch-lib_sockopt.h deleted file mode 100644 index 7d6b615fe700..000000000000 --- a/net/frr10/files/patch-lib_sockopt.h +++ /dev/null @@ -1,13 +0,0 @@ ---- lib/sockopt.h.orig 2024-11-12 16:20:46 UTC -+++ lib/sockopt.h -@@ -12,8 +12,8 @@ extern "C" { - extern "C" { - #endif - --extern void setsockopt_so_recvbuf(int sock, int size); --extern void setsockopt_so_sendbuf(const int sock, int size); -+extern int setsockopt_so_recvbuf(int sock, int size); -+extern int setsockopt_so_sendbuf(const int sock, int size); - extern int getsockopt_so_sendbuf(const int sock); - extern int getsockopt_so_recvbuf(const int sock); - diff --git a/net/frr10/files/patch-lib_vty.c b/net/frr10/files/patch-lib_vty.c deleted file mode 100644 index 45af30dcecf5..000000000000 --- a/net/frr10/files/patch-lib_vty.c +++ /dev/null @@ -1,52 +0,0 @@ ---- lib/vty.c.orig 2024-11-12 16:20:46 UTC -+++ lib/vty.c -@@ -43,6 +43,7 @@ - #include "northbound_cli.h" - #include "printfrr.h" - #include "json.h" -+#include "sockopt.h" - - #include - #include -@@ -352,7 +353,7 @@ int vty_out(struct vty *vty, const char *format, ...) - * put the data of collective vty->obuf Linked List items on the - * socket and free the vty->obuf data. - */ -- if (vty->vty_buf_size_accumulated >= VTY_MAX_INTERMEDIATE_FLUSH) { -+ if (vty->vty_buf_size_accumulated >= vty->buf_size_intermediate) { - vty->vty_buf_size_accumulated = 0; - vtysh_flush(vty); - } -@@ -2157,15 +2158,15 @@ static void vtysh_accept(struct event *thread) - * Increasing the SEND socket buffer size so that the socket can hold - * before sending it to VTY shell. - */ -- ret = setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char *)&sndbufsize, -- sizeof(sndbufsize)); -- if (ret < 0) { -+ ret = setsockopt_so_sendbuf(sock, sndbufsize); -+ if (ret <= 0) { - flog_err(EC_LIB_SOCKET, - "Cannot set socket %d send buffer size, %s", sock, - safe_strerror(errno)); - close(sock); - return; - } -+ - set_cloexec(sock); - - #ifdef VTYSH_DEBUG -@@ -2173,6 +2174,13 @@ static void vtysh_accept(struct event *thread) - #endif /* VTYSH_DEBUG */ - - vty = vty_new(); -+ -+ vty->buf_size_set = ret; -+ if (vty->buf_size_set < VTY_MAX_INTERMEDIATE_FLUSH) -+ vty->buf_size_intermediate = vty->buf_size_set / 2; -+ else -+ vty->buf_size_intermediate = VTY_MAX_INTERMEDIATE_FLUSH; -+ - vty->fd = sock; - vty->wfd = sock; - vty->type = VTY_SHELL_SERV; diff --git a/net/frr10/files/patch-lib_vty.h b/net/frr10/files/patch-lib_vty.h deleted file mode 100644 index 397ea225cce1..000000000000 --- a/net/frr10/files/patch-lib_vty.h +++ /dev/null @@ -1,12 +0,0 @@ ---- lib/vty.h.orig 2024-11-12 16:20:46 UTC -+++ lib/vty.h -@@ -237,6 +237,9 @@ struct vty { - bool mgmt_locked_candidate_ds; - bool mgmt_locked_running_ds; - uint64_t vty_buf_size_accumulated; -+ -+ int buf_size_set; -+ uint64_t buf_size_intermediate; - }; - - static inline void vty_push_context(struct vty *vty, int node, uint64_t id) diff --git a/net/frr10/files/patch-vtysh_vtysh.c b/net/frr10/files/patch-vtysh_vtysh.c deleted file mode 100644 index a6f09b5a5980..000000000000 --- a/net/frr10/files/patch-vtysh_vtysh.c +++ /dev/null @@ -1,22 +0,0 @@ ---- vtysh/vtysh.c.orig 2024-11-12 16:20:46 UTC -+++ vtysh/vtysh.c -@@ -39,6 +39,7 @@ - #include "frrstr.h" - #include "json.h" - #include "ferr.h" -+#include "sockopt.h" - - DEFINE_MTYPE_STATIC(MVTYSH, VTYSH_CMD, "Vtysh cmd copy"); - -@@ -4694,9 +4695,8 @@ static int vtysh_connect(struct vtysh_client *vclient) - * Increasing the RECEIVE socket buffer size so that the socket can hold - * after receving from other process. - */ -- ret = setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)&rcvbufsize, -- sizeof(rcvbufsize)); -- if (ret < 0) { -+ ret = setsockopt_so_recvbuf(sock, rcvbufsize); -+ if (ret <= 0) { - #ifdef DEBUG - fprintf(stderr, "Cannot set socket %d rcv buffer size, %s\n", - sock, safe_strerror(errno));