frr: update to latest
authorLucian Cristian <lucian.cristian@gmail.com>
Tue, 18 Jan 2022 21:08:25 +0000 (23:08 +0200)
committerRosen Penev <rosenp@gmail.com>
Wed, 19 Jan 2022 05:29:39 +0000 (21:29 -0800)
also fix mips compile

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
net/frr/Makefile
net/frr/patches/998-endian_fix.patch [new file with mode: 0644]

index ea1b76f3b9669a7ffd482925e7673c04bdbf12ae..f89c2f3d56bf408e3a0c55e5b55ecbaad2c2cb68 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 PKG_NAME:=frr
 PKG_VERSION:=8.1.0
-PKG_RELEASE:=1
-PKG_SOURCE_DATE:=2021-11-12
+PKG_RELEASE:=2
+PKG_SOURCE_DATE:=2022-01-17
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
-PKG_SOURCE_VERSION:=c18235d5b1e33fad9d3181aa29fefa48b8c6ff3f
+PKG_SOURCE_VERSION:=4757da741a81ba48a4ba1601a1e9c9380def66ef
 PKG_SOURCE_URL:=https://codeload.github.com/FRRouting/frr/tar.gz/$(PKG_SOURCE_VERSION)?
 
 
-PKG_HASH:=95922586d6c39565b3eec362563e031fd4cb2b6d6c0012256e345b364de1ae82
+PKG_HASH:=e9d45fb55276b74363c78977f467b88ed77b071ad2d54c6495eed1344d406ed5
 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
diff --git a/net/frr/patches/998-endian_fix.patch b/net/frr/patches/998-endian_fix.patch
new file mode 100644 (file)
index 0000000..5d599b5
--- /dev/null
@@ -0,0 +1,58 @@
+From cfc45e911e21820bc8b703b37e947a6a7e5d798a Mon Sep 17 00:00:00 2001
+From: David Lamparter <equinox@opensourcerouting.org>
+Date: Tue, 18 Jan 2022 09:50:25 +0100
+Subject: [PATCH] lib/clippy: don't endian-convert twice
+
+elf_getdata_rawchunk() already endian-converts; doing it again is, uh,
+counterproductive.
+
+Fixes: #10051
+Reported-by: Lucian Cristian <lucian.cristian@gmail.com>
+Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
+---
+ lib/elf_py.c | 29 ++++++++++++++---------------
+ 1 file changed, 14 insertions(+), 15 deletions(-)
+
+--- a/lib/elf_py.c
++++ b/lib/elf_py.c
+@@ -1071,26 +1071,25 @@ static void elffile_add_dynreloc(struct
+                        * always be a pointer...
+                        */
+                       if (elffile_virt2file(w, rel->r_offset, &offs)) {
+-                              Elf_Data *ptr, *conv;
+-                              GElf_Addr tmp;
+-                              Elf_Data mem = {
+-                                      .d_buf = (void *)&tmp,
+-                                      .d_type = ELF_T_ADDR,
+-                                      .d_version = EV_CURRENT,
+-                                      .d_size = sizeof(tmp),
+-                                      .d_off = 0,
+-                                      .d_align = 0,
+-                              };
++                              Elf_Data *ptr;
++                              /* NB: this endian-converts! */
+                               ptr = elf_getdata_rawchunk(w->elf, offs,
+                                                          w->elfclass / 8,
+                                                          ELF_T_ADDR);
+-                              conv = gelf_xlatetom(w->elf, &mem, ptr,
+-                                                   w->mmap[EI_DATA]);
+-                              if (conv) {
+-                                      memcpy(&rel_offs, conv->d_buf,
+-                                             conv->d_size);
++                              if (ptr) {
++                                      char *dst = (char *)&rel_offs;
++
++                                      /* sigh.  it endian-converts.  but
++                                       * doesn't size-convert.
++                                       */
++                                      if (BYTE_ORDER == BIG_ENDIAN &&
++                                          ptr->d_size < sizeof(rel_offs))
++                                              dst += sizeof(rel_offs) -
++                                                     ptr->d_size;
++
++                                      memcpy(dst, ptr->d_buf, ptr->d_size);
+                                       relw->relative = false;
+                                       relw->rela->r_addend = rel_offs;