frr: update to 10.2.1
authorLucian CRISTIAN <lucian.cristian@gmail.com>
Thu, 23 Jan 2025 19:47:21 +0000 (21:47 +0200)
committerTianling Shen <cnsztl@gmail.com>
Fri, 24 Jan 2025 09:30:13 +0000 (17:30 +0800)
update to current stable branch

Signed-off-by: Lucian CRISTIAN <lucian.cristian@gmail.com>
net/frr/Makefile
net/frr/patches/098-fix_mips_libyang.patch
net/frr/patches/900-gcc-14-compatibility.patch [deleted file]
net/frr/patches/997-reverse_python_test.patch
net/frr/patches/998-lib-fix-error-on-MacOS.patch [deleted file]

index 40cdd200e45148f0d8d54d3fb5622a758f7bd71f..de69a07b690e79d536e62e31431a81d39dc52bf2 100644 (file)
@@ -7,15 +7,15 @@
 
 include $(TOPDIR)/rules.mk
 PKG_NAME:=frr
-PKG_VERSION:=9.0.0
-PKG_RELEASE:=7
-PKG_SOURCE_DATE:=2023-08-12
+PKG_VERSION:=10.2.1
+PKG_RELEASE:=1
+PKG_SOURCE_DATE:=2025-01-21
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
-PKG_SOURCE_VERSION:=9852228d1e87bdbad13e0fed8313203f00bf26af
+PKG_SOURCE_VERSION:=989328c7e47c7bbcf3364d5424ac17f49fd05c57
 PKG_SOURCE_URL:=https://codeload.github.com/FRRouting/frr/tar.gz/$(PKG_SOURCE_VERSION)?
 
-PKG_HASH:=6e611cd86ae9787a4b8d71411fdc38ad1fe843a839756c9c386848ffde81f6cf
+PKG_HASH:=d8ea2bad243cfcfd96b9b4a5dd524fe1deeb577cd535529babe24a02cae26f06
 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
index b69b6e4373eb1da761f4701b395e60b8ce08df4c..39a84a7647642d49f84e097f32a0ef01fa46d455 100644 (file)
@@ -1,6 +1,6 @@
 --- a/lib/northbound.h
 +++ b/lib/northbound.h
-@@ -627,11 +627,7 @@ struct frr_yang_module_info {
+@@ -665,11 +665,7 @@ struct frr_yang_module_info {
  
                /* Priority - lower priorities are processed first. */
                uint32_t priority;
diff --git a/net/frr/patches/900-gcc-14-compatibility.patch b/net/frr/patches/900-gcc-14-compatibility.patch
deleted file mode 100644 (file)
index 789402a..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-From d286461971735a0b81a53039f38f66c47c632196 Mon Sep 17 00:00:00 2001
-From: Georgi Valkov <gvalkov@gmail.com>
-Date: Mon, 27 May 2024 17:30:54 +0300
-Subject: [PATCH] zebra: fix compilation with GCC14
-
-Fixes:
-zebra/zebra_netns_notify.c: In function 'zebra_ns_ready_read':
-zebra/zebra_netns_notify.c:265:40: error: implicit declaration of function 'basename' [-Wimplicit-function-declaration]
-  265 |         if (strmatch(VRF_DEFAULT_NAME, basename(netnspath))) {
-      |                                        ^~~~~~~~
-
-Fixed by including libgen.h, then since basename may modify its
-parameter, allocate a copy on the stack, using strdupa, and pass the
-temporary string to basename.
-
-According to the man page for basename:
-With glibc, one gets the POSIX version of basename() when
-<libgen.h> is included, and the GNU version otherwise.
-
-The POSIX version of basename may modify the contents of path,
-so we should to pass a copy when calling this function.
-
-[1] https://man7.org/linux/man-pages/man3/basename.3.html
-
-Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
----
---- a/zebra/zebra_netns_notify.c
-+++ b/zebra/zebra_netns_notify.c
-@@ -14,6 +14,7 @@
- #include <sched.h>
- #endif
- #include <dirent.h>
-+#include <libgen.h>
- #include <sys/inotify.h>
- #include <sys/stat.h>
-@@ -233,6 +234,7 @@ static void zebra_ns_ready_read(struct e
- {
-       struct zebra_netns_info *zns_info = EVENT_ARG(t);
-       const char *netnspath;
-+      const char *netnspath_basename;
-       int err, stop_retry = 0;
-       if (!zns_info)
-@@ -260,23 +262,24 @@ static void zebra_ns_ready_read(struct e
-               zebra_ns_continue_read(zns_info, stop_retry);
-               return;
-       }
-+      netnspath_basename = basename(strdupa(netnspath));
-       /* check default name is not already set */
--      if (strmatch(VRF_DEFAULT_NAME, basename(netnspath))) {
--              zlog_warn("NS notify : NS %s is already default VRF.Cancel VRF Creation", basename(netnspath));
-+      if (strmatch(VRF_DEFAULT_NAME, netnspath_basename)) {
-+              zlog_warn("NS notify : NS %s is already default VRF.Cancel VRF Creation", netnspath_basename);
-               zebra_ns_continue_read(zns_info, 1);
-               return;
-       }
--      if (zebra_ns_notify_is_default_netns(basename(netnspath))) {
-+      if (zebra_ns_notify_is_default_netns(netnspath_basename)) {
-               zlog_warn(
-                       "NS notify : NS %s is default VRF. Ignore VRF creation",
--                      basename(netnspath));
-+                      netnspath_basename);
-               zebra_ns_continue_read(zns_info, 1);
-               return;
-       }
-       /* success : close fd and create zns context */
--      zebra_ns_notify_create_context_from_entry_name(basename(netnspath));
-+      zebra_ns_notify_create_context_from_entry_name(netnspath_basename);
-       zebra_ns_continue_read(zns_info, 1);
- }
-@@ -395,7 +398,7 @@ void zebra_ns_notify_parse(void)
-                       continue;
-               }
-               /* check default name is not already set */
--              if (strmatch(VRF_DEFAULT_NAME, basename(dent->d_name))) {
-+              if (strmatch(VRF_DEFAULT_NAME, basename(strdupa(dent->d_name)))) {
-                       zlog_warn("NS notify : NS %s is already default VRF.Cancel VRF Creation", dent->d_name);
-                       continue;
-               }
index aa3e0f87df554ea9b8eba81298259d0792cf47be..16232c410a3839f003827b79932fceb2324498ae 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -855,7 +855,6 @@ fi
+@@ -913,7 +913,6 @@ AC_DEFINE_UNQUOTED([DFLT_NAME], ["$DFLT_
  #
  
  AS_IF([test "$host" = "$build"], [
diff --git a/net/frr/patches/998-lib-fix-error-on-MacOS.patch b/net/frr/patches/998-lib-fix-error-on-MacOS.patch
deleted file mode 100644 (file)
index 6ee727b..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-From ad26e0926d1fa20bfdd9b5f63cec4db9837f880a Mon Sep 17 00:00:00 2001
-From: Ruben Kerkhof <ruben@rubenkerkhof.com>
-Date: Wed, 18 Mar 2020 15:40:39 +0100
-Subject: [PATCH] lib: fix error on MacOS
-
-Sections use a different syntax for Mach-O executables.
-
-Fixes:
-
-lib/bfd.c:35:1: error: argument to 'section' attribute is not valid for this target: mach-o section specifier requires a segment and section separated by a
-      comma
-DEFINE_MTYPE_STATIC(LIB, BFD_INFO, "BFD info")
-^
-./lib/memory.h:140:2: note: expanded from macro 'DEFINE_MTYPE_STATIC'
-        DEFINE_MTYPE_ATTR(group, name, static, desc)                           \
-        ^
-./lib/memory.h:110:26: note: expanded from macro 'DEFINE_MTYPE_ATTR'
-                __attribute__((section(".data.mtypes"))) = { {                 \
-                                       ^
-1 error generated.
-
-Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
-Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
----
- lib/memory.h | 43 +++++++++++++++++++++++++++----------------
- 1 file changed, 27 insertions(+), 16 deletions(-)
-
---- a/lib/compiler.h
-+++ b/lib/compiler.h
-@@ -447,6 +447,12 @@ _Static_assert(sizeof(_uint64_t) == 8 &&
- #define unlikely(_x) !!(_x)
- #endif
-+#ifdef __MACH__
-+#define _DATA_SECTION(name) __attribute__((section("__DATA," name)))
-+#else
-+#define _DATA_SECTION(name) __attribute__((section(".data." name)))
-+#endif
-+
- #ifdef __cplusplus
- }
- #endif
---- a/lib/memory.h
-+++ b/lib/memory.h
-@@ -69,14 +69,12 @@ struct memgroup {
- #define DECLARE_MGROUP(name) extern struct memgroup _mg_##name
- #define _DEFINE_MGROUP(mname, desc, ...)                                       \
--      struct memgroup _mg_##mname                                            \
--              __attribute__((section(".data.mgroups"))) = {                  \
--                      .name = desc,                                          \
--                      .types = NULL,                                         \
--                      .next = NULL,                                          \
--                      .insert = NULL,                                        \
--                      .ref = NULL,                                           \
--                      __VA_ARGS__                                            \
-+      struct memgroup _mg_##mname _DATA_SECTION("mgroups") = {               \
-+              .name = desc,                                                  \
-+              .types = NULL,                                                 \
-+              .next = NULL,                                                  \
-+              .insert = NULL,                                                \
-+              .ref = NULL,                                                   \
-       };                                                                     \
-       static void _mginit_##mname(void) __attribute__((_CONSTRUCTOR(1000))); \
-       static void _mginit_##mname(void)                                      \
-@@ -105,13 +103,12 @@ struct memgroup {
-       /* end */
- #define DEFINE_MTYPE_ATTR(group, mname, attr, desc)                            \
--      attr struct memtype MTYPE_##mname[1]                                   \
--              __attribute__((section(".data.mtypes"))) = { {                 \
--                      .name = desc,                                          \
--                      .next = NULL,                                          \
--                      .n_alloc = 0,                                          \
--                      .size = 0,                                             \
--                      .ref = NULL,                                           \
-+      attr struct memtype MTYPE_##mname[1] _DATA_SECTION("mtypes") = { {     \
-+              .name = desc,                                                  \
-+              .next = NULL,                                                  \
-+              .n_alloc = 0,                                                  \
-+              .size = 0,                                                     \
-+              .ref = NULL,                                                   \
-       } };                                                                   \
-       static void _mtinit_##mname(void) __attribute__((_CONSTRUCTOR(1001))); \
-       static void _mtinit_##mname(void)                                      \