babeld: update to 1.10
authorNick Hainke <vincent@systemli.org>
Sat, 29 May 2021 17:17:32 +0000 (19:17 +0200)
committerBaptiste Jonglez <git@bitsofnetworks.org>
Wed, 2 Jun 2021 19:24:13 +0000 (21:24 +0200)
25 April 2021: babeld-1.10
  * Removed the disambiguation code: source-specific routing is no longer
    supported for IPv4, and for IPv6 only on Linux 3.11 or later.
  * Fixed an issue handling of retractions with no next hop, which caused
    interoperability problems with BIRD.  Thanks to Fabian Bläse.
  * If skip-kernel-setup is set, we no longer disable the rp_filter, which
    makes babeld work in containers.  Thanks to Martin Weinelt.

Remove upstreamed part of ubus patch:
-  local: make local_kind function accessible

Signed-off-by: Nick Hainke <vincent@systemli.org>
babeld/Makefile
babeld/patches/600-add-ubus.patch
babeld/src/ubus.c

index 0f0aaa498b507cd9771efeb22520ba6689e1ebce..24779bdd814cfc9d830311fcbb17494536880e84 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=babeld
-PKG_VERSION:=1.9.2
+PKG_VERSION:=1.10
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.irif.fr/~jch/software/files/
-PKG_HASH:=154f00e0a8bf35d6ea9028886c3dc5c3c342dd1a367df55ef29a547b75867f07
+PKG_HASH:=a5f54a08322640e97399bf4d1411a34319e6e277fbb6fc4966f38a17d72a8dea
 
 PKG_MAINTAINER:=Gabriel Kerneis <gabriel@kerneis.info>, \
        Baptiste Jonglez <openwrt-pkg@bitsofnetworks.org>
index 956ec66bde0e566b000f20e23168df2f89969854..252a299b129361cf45b909333c084df204fe8505 100644 (file)
@@ -1,7 +1,7 @@
 --- a/babeld.c
 +++ b/babeld.c
-@@ -55,6 +55,8 @@ THE SOFTWARE.
- #include "rule.h"
+@@ -54,6 +54,8 @@ THE SOFTWARE.
+ #include "local.h"
  #include "version.h"
  
 +#include "ubus.h"
@@ -9,7 +9,7 @@
  struct timeval now;
  
  unsigned char myid[8];
-@@ -536,6 +538,9 @@ main(int argc, char **argv)
+@@ -518,6 +520,9 @@ main(int argc, char **argv)
          }
      }
  
@@ -19,7 +19,7 @@
      init_signals();
      rc = resize_receive_buffer(1500);
      if(rc < 0)
-@@ -635,6 +640,8 @@ main(int argc, char **argv)
+@@ -613,6 +618,8 @@ main(int argc, char **argv)
                  FD_SET(local_sockets[i].fd, &readfds);
                  maxfd = MAX(maxfd, local_sockets[i].fd);
              }
@@ -28,7 +28,7 @@
              rc = select(maxfd + 1, &readfds, NULL, NULL, &tv);
              if(rc < 0) {
                  if(errno != EINTR) {
-@@ -703,6 +710,9 @@ main(int argc, char **argv)
+@@ -680,6 +687,9 @@ main(int argc, char **argv)
              i++;
          }
  
          if(reopening) {
              kernel_dump_time = now.tv_sec;
              check_neighbours_timeout = now;
---- a/Makefile
-+++ b/Makefile
-@@ -11,11 +11,11 @@ LDLIBS = -lrt
- SRCS = babeld.c net.c kernel.c util.c interface.c source.c neighbour.c \
-        route.c xroute.c message.c resend.c configuration.c local.c \
--       disambiguation.c rule.c
-+       disambiguation.c rule.c ubus.c
- OBJS = babeld.o net.o kernel.o util.o interface.o source.o neighbour.o \
-        route.o xroute.o message.o resend.o configuration.o local.o \
--       disambiguation.o rule.o
-+       disambiguation.o rule.o ubus.o
- babeld: $(OBJS)
-       $(CC) $(CFLAGS) $(LDFLAGS) -o babeld $(OBJS) $(LDLIBS)
 --- a/generate-version.sh
 +++ b/generate-version.sh
 @@ -10,4 +10,4 @@ else
 +echo "#define BABELD_VERSION \"$version-ubus-mod\""
 --- a/configuration.c
 +++ b/configuration.c
-@@ -41,6 +41,7 @@ THE SOFTWARE.
+@@ -41,6 +41,8 @@ THE SOFTWARE.
  #include "kernel.h"
  #include "configuration.h"
- #include "rule.h"
-+#include "ubus.h"
  
++#include "ubus.h"
++
  static struct filter *input_filters = NULL;
  static struct filter *output_filters = NULL;
-@@ -850,7 +851,8 @@ parse_option(int c, gnc_t gnc, void *clo
+ static struct filter *redistribute_filters = NULL;
+@@ -849,7 +851,8 @@ parse_option(int c, gnc_t gnc, void *clo
                strcmp(token, "daemonise") == 0 ||
                strcmp(token, "skip-kernel-setup") == 0 ||
                strcmp(token, "ipv6-subtrees") == 0 ||
@@ -82,7 +67,7 @@
          int b;
          c = getbool(c, &b, gnc, closure);
          if(c < -1)
-@@ -868,6 +870,8 @@ parse_option(int c, gnc_t gnc, void *clo
+@@ -867,6 +870,8 @@ parse_option(int c, gnc_t gnc, void *clo
              has_ipv6_subtrees = b;
          else if(strcmp(token, "reflect-kernel-metric") == 0)
              reflect_kernel_metric = b;
  int local_server_socket = -1;
  struct local_socket local_sockets[MAX_LOCAL_SOCKETS];
  int num_local_sockets = 0;
-@@ -80,7 +82,7 @@ write_timeout(int fd, const void *buf, i
-     }
- }
--static const char *
-+const char *
- local_kind(int kind)
- {
-     switch(kind) {
 @@ -191,6 +193,8 @@ local_notify_neighbour(struct neighbour
          if(local_sockets[i].monitor)
              local_notify_neighbour_1(&local_sockets[i], neigh, kind);
  }
  
  static void
---- a/local.h
-+++ b/local.h
-@@ -55,3 +55,4 @@ int local_read(struct local_socket *s);
- int local_header(struct local_socket *s);
- struct local_socket *local_socket_create(int fd);
- void local_socket_destroy(int i);
-+const char * local_kind(int kind);
+--- a/Makefile
++++ b/Makefile
+@@ -10,10 +10,10 @@ CFLAGS = $(CDEBUGFLAGS) $(DEFINES) $(EXT
+ LDLIBS = -lrt
+ SRCS = babeld.c net.c kernel.c util.c interface.c source.c neighbour.c \
+-       route.c xroute.c message.c resend.c configuration.c local.c
++       route.c xroute.c message.c resend.c configuration.c local.c ubus.c
+ OBJS = babeld.o net.o kernel.o util.o interface.o source.o neighbour.o \
+-       route.o xroute.o message.o resend.o configuration.o local.o
++       route.o xroute.o message.o resend.o configuration.o local.o ubus.o
+ babeld: $(OBJS)
+       $(CC) $(CFLAGS) $(LDFLAGS) -o babeld $(OBJS) $(LDLIBS)
index e6d6d68c0047576851af1150ae755a66996da04e..c1a4945276c5cfa5fdb871fbb2cdd20bd3a6060a 100644 (file)
@@ -23,7 +23,6 @@
 #include "net.h"
 #include "resend.h"
 #include "route.h"
-#include "rule.h"
 #include "source.h"
 #include "util.h"
 #include "version.h"
@@ -209,7 +208,7 @@ static int babeld_ubus_get_routes(struct ubus_context *ctx_local,
 
   blob_buf_init(&b, 0);
 
-  routes = route_stream(ROUTE_ALL);
+  routes = route_stream(0);
   if (routes) {
     while (1) {
       struct babel_route *route = route_stream_next(routes);