Browse Source

frr: update to 7.3

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
lilik-openwrt-22.03
Lucian Cristian 4 years ago
parent
commit
684b68a8fd
6 changed files with 3 additions and 183 deletions
  1. +2
    -3
      net/frr/Makefile
  2. +1
    -1
      net/frr/patches/001-vti_interface_fix.patch
  3. +0
    -53
      net/frr/patches/003-corss_cares_fix.patch
  4. +0
    -27
      net/frr/patches/004-cross_libcap_fix.patch
  5. +0
    -71
      net/frr/patches/006-Revert_usage_of_asm-code.patch
  6. +0
    -28
      net/frr/patches/007-fix_memory_sanitizer_test.patch

+ 2
- 3
net/frr/Makefile View File

@ -7,12 +7,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=frr
PKG_VERSION:=7.2.1
PKG_VERSION:=7.3
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://github.com/FRRouting/frr/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_HASH:=774585564dc00e67c4eb51521cb2a8e584031364916514860227af07b638a408
PKG_HASH:=529e1bbc3a20d55e94c38a95513bcf971d4b403ecb00afdaf0c229e3f560b2b6
PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
PKG_DAEMON_AVAILABLE:= \
@ -46,7 +46,6 @@ PKG_CONFIG_DEPENDS:= \
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=python3/host
PKG_FIXUP:=autoreconf
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk


+ 1
- 1
net/frr/patches/001-vti_interface_fix.patch View File

@ -1,6 +1,6 @@
--- a/zebra/zebra_nhg.c 2019-10-18 01:59:17.582282539 +0300
+++ b/zebra/zebra_nhg.c 2019-10-18 02:00:17.501997253 +0300
@@ -226,20 +226,9 @@
@@ -1456,20 +1456,9 @@
while (rn) {
route_unlock_node(rn);


+ 0
- 53
net/frr/patches/003-corss_cares_fix.patch View File

@ -1,53 +0,0 @@
From 2163a630eb737b9afe3277dccf44070ef55dea12 Mon Sep 17 00:00:00 2001
From: Lucian Cristian <lucian.cristian@gmail.com>
Date: Fri, 13 Sep 2019 07:12:34 +0300
Subject: [PATCH] clippy: CARES fail only if !enable_clippy_only test for CARES
otherwise config will fail with conditional "CARES" not defined
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
---
configure.ac | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 6c1b35b5f2..9f37b3e9a9 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1452,6 +1452,12 @@ if test "x$enable_pcreposix" = "xyes"; then
fi
AC_SUBST([HAVE_LIBPCREPOSIX])
+dnl ##########################################################################
+dnl test "${enable_clippy_only}" != "yes"
+fi
+dnl END OF LARGE if block
+dnl ##########################################################################
+
dnl ------------------
dnl check C-Ares library
dnl ------------------
@@ -1462,12 +1468,6 @@ PKG_CHECK_MODULES([CARES], [libcares], [
])
AM_CONDITIONAL([CARES], [$c_ares_found])
-dnl ##########################################################################
-dnl test "${enable_clippy_only}" != "yes"
-fi
-dnl END OF LARGE if block
-dnl ##########################################################################
-
dnl ----------------------------------------------------------------------------
dnl figure out if domainname is available in the utsname struct (GNU extension).
@@ -1535,9 +1535,11 @@ case "$host_os" in
no)
;;
yes)
+ if test "${enable_clippy_only}" != "yes"; then
if test "$c_ares_found" != "true" ; then
AC_MSG_ERROR([nhrpd requires libcares. Please install c-ares and its -dev headers.])
fi
+ fi
NHRPD="nhrpd"
;;
*)

+ 0
- 27
net/frr/patches/004-cross_libcap_fix.patch View File

@ -1,27 +0,0 @@
From 2cd3abe419dab2ee32227c0870f96f805d870fe6 Mon Sep 17 00:00:00 2001
From: Lucian Cristian <lucian.cristian@gmail.com>
Date: Fri, 13 Sep 2019 07:16:18 +0300
Subject: [PATCH] clippy: fail libcap test only when !enable_clippy_only when
building native clippy we don't need libcap
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
---
configure.ac | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configure.ac b/configure.ac
index 9f37b3e9a9..be3a9c763d 100755
--- a/configure.ac
+++ b/configure.ac
@@ -2043,9 +2043,11 @@ if test "${enable_capabilities}" != "no"; then
case "$host_os" in
linux*)
+ if test "${enable_clippy_only}" != "yes"; then
if test "$frr_ac_lcaps" != "yes"; then
AC_MSG_ERROR([libcap and/or its headers were not found. Running FRR without libcap support built in causes a huge performance penalty.])
fi
+ fi
;;
esac
else

+ 0
- 71
net/frr/patches/006-Revert_usage_of_asm-code.patch View File

@ -1,71 +0,0 @@
From 4d8ebeddc56f49aa0b4d7cec506cab14320e1bb4 Mon Sep 17 00:00:00 2001
From: Juergen Werner <juergen@opensourcerouting.org>
Date: Tue, 1 Oct 2019 14:24:20 +0200
Subject: [PATCH] lib: Revert usage of asm-code in MTYPE definitions
The asm-code was interpreted inconsistently for different platforms.
In particular for AArch64 this caused UB, if multiple static MTYPEs
where defined in one file. All static MTYPE_* could point to the same
memory location (namely the first defined MTYPE) OR to their respective
(correct) locations depending on the context of their usage.
Signed-off-by: Juergen Werner <juergen@opensourcerouting.org>
---
doc/developer/memtypes.rst | 2 +-
lib/memory.h | 16 ++++------------
2 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/doc/developer/memtypes.rst b/doc/developer/memtypes.rst
index 13f6b43bbf..1af871963a 100644
--- a/doc/developer/memtypes.rst
+++ b/doc/developer/memtypes.rst
@@ -48,7 +48,7 @@ Definition
should be used to create these, but in some cases it is useful to pass a
``struct memtype *`` pointer to some helper function.
- The ``MTYPE_name`` created by the macros is declared as an array, i.e.
+ The ``MTYPE_name`` created by the macros is declared as a pointer, i.e.
a function taking a ``struct memtype *`` argument can be called with an
``MTYPE_name`` argument (as opposed to ``&MTYPE_name``.)
diff --git a/lib/memory.h b/lib/memory.h
index 14cd76f2f5..8de5c4c2bf 100644
--- a/lib/memory.h
+++ b/lib/memory.h
@@ -101,14 +101,9 @@ struct memgroup {
*_mg_##mname.ref = _mg_##mname.next; \
}
-
-/* the array is a trick to make the "MTYPE_FOO" name work as a pointer without
- * putting a & in front of it, so we can do "XMALLOC(MTYPE_FOO, ...)" instead
- * of "XMALLOC(&MTYPE_FOO, ...)".
- */
#define DECLARE_MTYPE(name) \
extern struct memtype _mt_##name; \
- extern struct memtype MTYPE_##name[1]; \
+ extern struct memtype *const MTYPE_##name; \
/* end */
#define DEFINE_MTYPE_ATTR(group, mname, attr, desc) \
@@ -138,17 +133,14 @@ struct memgroup {
} \
/* end */
-/* can't quite get gcc to emit the alias correctly, so asm-alias it is :/ */
#define DEFINE_MTYPE(group, name, desc) \
DEFINE_MTYPE_ATTR(group, name, , desc) \
- __asm__(".equiv MTYPE_" #name ", _mt_" #name "\n\t" \
- ".global MTYPE_" #name "\n"); \
+ struct memtype *const MTYPE_##name = &_mt_##name; \
/* end */
-/* and this one's borked on clang, it drops static on aliases :/, so... asm */
+
#define DEFINE_MTYPE_STATIC(group, name, desc) \
DEFINE_MTYPE_ATTR(group, name, static, desc) \
- extern struct memtype MTYPE_##name[1]; \
- __asm__(".equiv MTYPE_" #name ", _mt_" #name "\n"); \
+ static struct memtype *const MTYPE_##name = &_mt_##name; \
/* end */
DECLARE_MGROUP(LIB)

+ 0
- 28
net/frr/patches/007-fix_memory_sanitizer_test.patch View File

@ -1,28 +0,0 @@
From 65209e4fbf30d09dda89aa4b1d831461506848d7 Mon Sep 17 00:00:00 2001
From: Rafael Zalamena <rzalamena@opensourcerouting.org>
Date: Tue, 8 Oct 2019 20:47:38 -0300
Subject: [PATCH] configure.ac: fix memory sanitizer test
We should test for `-fsanitize=memory` instead of `-fsanitize=thread`
when enabling memory sanitizer. While here, fix the error message.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 88f1c4f627..730e2ae6f0 100755
--- a/configure.ac
+++ b/configure.ac
@@ -328,8 +328,8 @@ if test "$enable_thread_sanitizer" = "yes"; then
])
fi
if test "$enable_memory_sanitizer" = "yes"; then
- AC_C_FLAG([-fsanitize=thread -fPIE -pie], [
- AC_MSG_ERROR([$CC does not support Thread Sanitizer.])
+ AC_C_FLAG([-fsanitize=memory -fPIE -pie], [
+ AC_MSG_ERROR([$CC does not support Memory Sanitizer.])
], [
SAN_FLAGS="-fsanitize=memory -fPIE -pie"
])

Loading…
Cancel
Save