Merge pull request #913 from ecsv/batadv-for-22.03
authorSimon Wunderlich <sw@simonwunderlich.de>
Mon, 24 Oct 2022 08:44:32 +0000 (10:44 +0200)
committerGitHub <noreply@github.com>
Mon, 24 Oct 2022 08:44:32 +0000 (10:44 +0200)
openwrt-22.03: alfred/batman-adv: Rebuild on CONFIG*_ALFRED_*/CONFIG_BATMAN_ADV_ changes

14 files changed:
babeld/Makefile
babeld/patches/600-add-ubus.patch
bird2/Makefile
cjdns/Makefile
cjdns/lua/cjdns/uci.lua
cjdns/patches/001-five-mins-builder-zonk.patch
cjdns/patches/010-musl-12x.patch [deleted file]
cjdns/patches/020-prefer-python2.patch [new file with mode: 0644]
luci-app-cjdns/Makefile
luci-app-cjdns/luasrc/model/cbi/cjdns/peering.lua
mesh11sd/Makefile
naywatch/files/naywatch.sh
olsrd/patches/102-olsrd-prevent-storm-patches.patch [new file with mode: 0644]
opennds/Makefile

index 3a7145c21143911a8e8da8e898298bb9b3848a6b..92e3659f3ffb0f3800f85d4e30caf301e5ae38f4 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=babeld
-PKG_VERSION:=1.11
+PKG_VERSION:=1.12.1
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.irif.fr/~jch/software/files/
-PKG_HASH:=99315aeaf2ea207f177c16855ffa34fc354af1b5988c070e0f2fca3a0d4d0fa5
+PKG_HASH:=9ab59d7ac741f3630df23f9c3b67c60294d8b34ab622398f9b89773a878ecb1e
 
 PKG_MAINTAINER:=Gabriel Kerneis <gabriel@kerneis.info>, \
        Baptiste Jonglez <openwrt-pkg@bitsofnetworks.org>, \
@@ -35,7 +35,7 @@ define Package/babeld/description
   with fast convergence properties. It is based on the ideas in DSDV, AODV and
   Cisco's EIGRP, but is designed to work well not only in wired networks but
   also in wireless mesh networks, and has been extended with support for
-  overlay networks. Babel is in the process of becoming an IETF Standard.
+  overlay networks. Babel is an IETF standard protocol (RFC 8966).
 endef
 
 define Package/babeld/conffiles
index e285ecfb3d91fa3e4febde165e94d53dcc6b2a6b..469b6e8134b81209b085044d284a1a94613b4dc3 100644 (file)
@@ -9,7 +9,7 @@
  struct timeval now;
  
  unsigned char myid[8];
-@@ -518,6 +520,9 @@ main(int argc, char **argv)
+@@ -521,6 +523,9 @@ main(int argc, char **argv)
          }
      }
  
@@ -19,7 +19,7 @@
      init_signals();
      rc = resize_receive_buffer(1500);
      if(rc < 0)
-@@ -613,6 +618,8 @@ main(int argc, char **argv)
+@@ -616,6 +621,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) {
-@@ -681,6 +688,9 @@ main(int argc, char **argv)
+@@ -684,6 +691,9 @@ main(int argc, char **argv)
              i++;
          }
  
@@ -57,7 +57,7 @@
  static struct filter *input_filters = NULL;
  static struct filter *output_filters = NULL;
  static struct filter *redistribute_filters = NULL;
-@@ -1029,7 +1031,8 @@ parse_option(int c, gnc_t gnc, void *clo
+@@ -1036,7 +1038,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 ||
@@ -67,7 +67,7 @@
          int b;
          c = getbool(c, &b, gnc, closure);
          if(c < -1)
-@@ -1047,6 +1050,8 @@ parse_option(int c, gnc_t gnc, void *clo
+@@ -1054,6 +1057,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;
index 9fee377639e9ae34c3da4087498761851fa293e4..f4c146ef68acaf4c95979f3aaaf2c323d2427a12 100644 (file)
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bird2
-PKG_VERSION:=2.0.8
-PKG_RELEASE:=2
+PKG_VERSION:=2.0.10
+PKG_RELEASE:=1
 
 PKG_SOURCE:=bird-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://bird.network.cz/pub/bird
-PKG_HASH:=19d2de83ee25a307b9e5b9e58797dd68766d439bcee33e3ac617ed502370e7f6
+PKG_HASH:=7ed341ddd8dc87fa9736586b3515447a8436fec442d65f4022155ab9de1ffd5a
 
 PKG_MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
 PKG_LICENSE:=GPL-2.0-or-later
index 61ecf926c2820f569ab63428e43f9354fbbd1278..1f8592b60eb1fb66164decf7823e06e79a516f52 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cjdns
-PKG_VERSION:=v21
-PKG_RELEASE:=3
+PKG_VERSION:=v21.1
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/cjdelisle/cjdns/tar.gz/$(PKG_NAME)-$(PKG_VERSION)?
-PKG_HASH:=6dfb1fe18c9689324f36c8d33e660972aac5af4579fcaa9c4730179bc8d67c69
+PKG_HASH:=a6158ce7847159aa44e86f74ccc7b6ded6910a230ed8f3830db53cda5838f0b0
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_MAINTAINER:=William Fleurant <meshnet@protonmail.com>
index f4716b772bf89e219980d7e707d37b35f306a4b2..d6b6633e9968a69c30bd68075f93b5f649782c55 100644 (file)
@@ -53,6 +53,10 @@ function UCI.get()
     obj.router.interface.tunDevice = config.tun_device
   end
 
+  cursor:foreach("cjdns", "supernodes", function(supernodes)
+    table.insert(obj.router.supernodes, supernodes.public_key)
+  end)
+
   for i,section in pairs(obj.security) do
     if type(section.seccomp) == "number" then
       obj.security[i].seccomp = tonumber(config.seccomp)
index 3128fb8bd2429b5a35b764c7d7d349699c644ac0..c53c62f4d7abceb20f9ce7c311774c6cc0170af1 100644 (file)
@@ -1,13 +1,13 @@
 --- a/node_build/builder.js
 +++ b/node_build/builder.js
-@@ -215,8 +215,8 @@ var execJs = function (js, builder, file
-     js = qs.join("'");
+@@ -277,8 +277,8 @@ const execJs = function (js, ctx, file,
+     js = '"use strict";' + qs.join("'");
  
-     var to = setTimeout(function () {
+     const to = setTimeout(function () {
 -        throw new Error("Inline JS did not return after 120 seconds [" + js + "]");
 -    }, 120000);
 +        throw new Error("Inline JS did not return after 5 minutes [" + js + "]");
 +    }, 300000);
  
-     var REQUIRE = function (str) {
-         if (typeof(str) !== 'string') {
+     nThen(function (waitFor) {
diff --git a/cjdns/patches/010-musl-12x.patch b/cjdns/patches/010-musl-12x.patch
deleted file mode 100644 (file)
index d82a144..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/memory/Allocator.c
-+++ b/memory/Allocator.c
-@@ -57,7 +57,7 @@ static void unroll(struct Allocator_pvt*
-     struct Allocator_Allocation_pvt* allocation = context->allocations;
-     while (allocation && includeAllocations) {
-         writeUnroller(&childUnroller);
--        fprintf(stderr, "%s:%ld [%lu] bytes at [0x%lx]\n",
-+        fprintf(stderr, "%s:%tu [%tu] bytes at [0x%lx]\n",
-                 allocation->fileName,
-                 allocation->lineNum,
-                 allocation->pub.size,
diff --git a/cjdns/patches/020-prefer-python2.patch b/cjdns/patches/020-prefer-python2.patch
new file mode 100644 (file)
index 0000000..5bb8624
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/node_build/FindPython.js
++++ b/node_build/FindPython.js
+@@ -23,7 +23,7 @@ var Fs = require('fs');
+ // de-prioritize because the testing script accepts ANY python3 version
+ // (as of this writing, we don't know what python3 versions actually work)
+ // whereas we know that python2.7 is the only working python2 version.
+-var PYTHONS = ["python3.7", "python3", "python2.7", "python2", "python"];
++var PYTHONS = ["python2", "python2.7", "python3.7", "python3.8", "python3.9", "python3"]
+ var SCRIPT = [
+     'import sys',
index 9396528017e3dd2cec64c256eb0d6d3df8ef3584..0b6485a1264a5f18d1972928a3a503ec4490b63a 100644 (file)
@@ -18,7 +18,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luci-app-cjdns
 PKG_VERSION:=1.3
-PKG_RELEASE:=8
+PKG_RELEASE:=9
 
 PKG_MAINTAINER:=William Fleurant <meshnet@protonmail.com>
 PKG_LICENSE:=GPL-3.0-or-later
index 2b1fc1be95e2682826e5cbebcf977c514f106404..3526afe03f2766814d337c9ed50182a1d4446ce2 100644 (file)
@@ -70,4 +70,13 @@ eth_peers:option(Value, "address", translate("MAC address")).datatype = "macaddr
 eth_peers:option(Value, "public_key", translate("Public key"))
 eth_peers:option(Value, "password", translate("Password"))
 
+-- Supernodes
+supernodes = m:section(TypedSection, "supernodes", translate("List of Supernodes"),
+  translate("If none are specified they'll be taken from your peers"))
+supernodes.anonymous = true
+supernodes.addremove = true
+supernodes.template  = "cbi/tblsection"
+
+supernodes:option(Value, "public_key", translate("Public Key")).size = 55
+
 return m
index 4101c4a93d25f9b90dfceade34636d257b7aa13a..567e06d25cf953be741a8f323a8880c21eef64db 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mesh11sd
-PKG_VERSION:=1.0.0
+PKG_VERSION:=1.2.0
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_MAINTAINER:=Rob White <rob@blue-wave.net>
@@ -17,7 +17,7 @@ PKG_LICENSE_FILES:=LICENSE
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/opennds/mesh11sd/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=a9f2ac4e1cdf5c4fe933ad68adf7c62d6d4a5e20a7f61f79dfa26a309f97049e
+PKG_HASH:=b719eaacf63eb3684d0cd6a026f4357a4f400f2339f5d5a6cf74ba3744fe30d8
 PKG_BUILD_DIR:=$(BUILD_DIR)/mesh11sd-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
@@ -48,9 +48,9 @@ define Package/mesh11sd/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_DIR) $(1)/etc/config
        $(INSTALL_DIR) $(1)/etc/init.d
-       $(CP) $(PKG_BUILD_DIR)/src/mesh11sd $(1)/usr/sbin
-       $(CP) $(PKG_BUILD_DIR)/linux_openwrt/mesh11sd/files/etc/config/mesh11sd $(1)/etc/config/
-       $(CP) $(PKG_BUILD_DIR)/linux_openwrt/mesh11sd/files/etc/init.d/mesh11sd $(1)/etc/init.d/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mesh11sd $(1)/usr/sbin
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/linux_openwrt/mesh11sd/files/etc/config/mesh11sd $(1)/etc/config/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/linux_openwrt/mesh11sd/files/etc/init.d/mesh11sd $(1)/etc/init.d/
 endef
 
 define Package/mesh11sd/conffiles
index 78c8dd42cc4b4f92b1f357335e0a786dbedd6b50..73f5ff056085d3373efb44c4df90eb090ff29cb3 100644 (file)
@@ -88,6 +88,9 @@ no_neighbors() {
 log "Naywatch Started!"
 
 neighbors() {
+    if [ $ACTIVE -eq 0 ]; then
+        log "Naywatch Activated!"
+    fi
     ACTIVE=1
     NO_NEIGHBORS_COUNT=0
     if [ $USE_WATCHDOG -eq 1 ]; then
diff --git a/olsrd/patches/102-olsrd-prevent-storm-patches.patch b/olsrd/patches/102-olsrd-prevent-storm-patches.patch
new file mode 100644 (file)
index 0000000..69d5952
--- /dev/null
@@ -0,0 +1,83 @@
+From 4dabd94d598dd893aaaffbd71c315923c8827a14 Mon Sep 17 00:00:00 2001
+From: Nick Hainke <vincent@systemli.org>
+Date: Wed, 22 Jun 2022 14:08:04 +0200
+Subject: [PATCH] olsrd: prevent storm patches
+
+As described in the PR:
+
+  Limit the positive sequence number difference which is considered valid,
+  and prevent network storms.
+  Source: https://github.com/aredn/aredn_packages/pull/5
+
+Signed-off-by: Nick Hainke <vincent@systemli.org>
+---
+ src/duplicate_set.c | 16 ++++++++--------
+ src/duplicate_set.h |  5 +++--
+ 2 files changed, 11 insertions(+), 10 deletions(-)
+
+--- a/src/duplicate_set.c
++++ b/src/duplicate_set.c
+@@ -70,7 +70,7 @@ void olsr_cleanup_duplicates(union olsr_
+   entry = (struct dup_entry *)olsrd_avl_find(&duplicate_set, orig);
+   if (entry != NULL) {
+-    entry->too_low_counter = DUP_MAX_TOO_LOW - 2;
++    entry->out_of_bounds_counter = DUP_MAX_OUT_OF_BOUNDS - 2;
+   }
+ }
+@@ -82,7 +82,7 @@ olsr_create_duplicate_entry(void *ip, ui
+   if (entry != NULL) {
+     memcpy(&entry->ip, ip, olsr_cnf->ip_version == AF_INET ? sizeof(entry->ip.v4) : sizeof(entry->ip.v6));
+     entry->seqnr = seqnr;
+-    entry->too_low_counter = 0;
++    entry->out_of_bounds_counter = 0;
+     entry->olsrd_avl.key = &entry->ip;
+     entry->array = 0;
+   }
+@@ -160,12 +160,12 @@ olsr_message_is_duplicate(union olsr_mes
+   }
+   diff = olsr_seqno_diff(seqnr, entry->seqnr);
+-  if (diff < -31) {
+-    entry->too_low_counter++;
++  if (diff < -31 || diff > DUP_SEQNR_DIFF_HIGH_LIMIT) {
++    entry->out_of_bounds_counter++;
+-    // client did restart with a lower number ?
+-    if (entry->too_low_counter > DUP_MAX_TOO_LOW) {
+-      entry->too_low_counter = 0;
++    // client did restart with a too low or too high number ?
++    if (entry->out_of_bounds_counter > DUP_MAX_OUT_OF_BOUNDS) {
++      entry->out_of_bounds_counter = 0;
+       entry->seqnr = seqnr;
+       entry->array = 1;
+       return false;             /* start with a new sequence number, so NO duplicate */
+@@ -174,7 +174,7 @@ olsr_message_is_duplicate(union olsr_mes
+     return true;                /* duplicate ! */
+   }
+-  entry->too_low_counter = 0;
++  entry->out_of_bounds_counter = 0;
+   if (diff <= 0) {
+     uint32_t bitmask = 1u << ((uint32_t) (-diff));
+--- a/src/duplicate_set.h
++++ b/src/duplicate_set.h
+@@ -54,13 +54,14 @@
+ #define DUPLICATE_CLEANUP_INTERVAL 15000
+ #define DUPLICATE_CLEANUP_JITTER 25
+ #define DUPLICATE_VTIME 120000
+-#define DUP_MAX_TOO_LOW 16
++#define DUP_MAX_OUT_OF_BOUNDS 16
++#define DUP_SEQNR_DIFF_HIGH_LIMIT 0x2000
+ struct dup_entry {
+   struct olsrd_avl_node olsrd_avl;
+   union olsr_ip_addr ip;
+   uint16_t seqnr;
+-  uint16_t too_low_counter;
++  uint16_t out_of_bounds_counter;
+   uint32_t array;
+   uint32_t valid_until;
+ };
index 773e7585c07cf8da157fb76d7d9dc1ad25540e73..88b2fb885e7e31712f9748443e0499564e7e80ef 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=opennds
-PKG_VERSION:=9.7.0
-PKG_RELEASE:=2
+PKG_VERSION:=9.9.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/opennds/opennds/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=3059911743edeec7b89c289d40382696273646a632e2e7cdcb43067d0396b347
+PKG_HASH:=fd32ffce4a082ac0c40d4627fc1219b5c8cfcb5d73e70166bf3cf82cda91ac8e
 PKG_BUILD_DIR:=$(BUILD_DIR)/openNDS-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Rob White <rob@blue-wave.net>
@@ -30,17 +30,14 @@ define Package/opennds
   DEPENDS:=+iptables-nft +kmod-ipt-conntrack +kmod-ipt-nat +libmicrohttpd-no-ssl
   TITLE:=Open public network gateway daemon
   URL:=https://github.com/opennds/opennds
-  CONFLICTS:=nodogsplash nodogsplash2
+  CONFLICTS:=nodogsplash
 endef
 
 define Package/opennds/description
-  openNDS is a Captive Portal solution that offers an instant way to provide restricted access to the Internet.
-  With little or no configuration, a dynamically generated and adaptive splash page sequence is automatically served.
-  Both client driven Captive Portal Detection (CPD) and gateway driven Captive Portal Identification (CPI - RFC 8910 and RFC 8908) are supported.
-  Internet access is granted by either a click to continue button, or after credential verification as a result of filling in a login form.
-  The package incorporates the FAS API allowing many flexible customisation options.
-  The creation of sophisticated third party authentication applications is fully supported.
-  Internet hosted https portals can be implemented with no security errors, to inspire maximum user confidence.
+  openNDS (open Network Demarcation Service) is a high performance, small footprint, Captive Portal.
+  It provides a border control gateway between a public local area network and the Internet.
+  It supports all ranges between small stand alone venues through to large mesh networks with multiple portal entry points.
+  Both the client driven Captive Portal Detection (CPD) method and gateway driven Captive Portal Identification method (CPI - RFC 8910 and RFC 8908) are supported.
   This version requires iptables-nft.
 endef
 
@@ -71,6 +68,7 @@ define Package/opennds/install
        $(CP) $(PKG_BUILD_DIR)/forward_authentication_service/libs/unescape.sh $(1)/usr/lib/opennds/
        $(CP) $(PKG_BUILD_DIR)/forward_authentication_service/libs/authmon.sh $(1)/usr/lib/opennds/
        $(CP) $(PKG_BUILD_DIR)/forward_authentication_service/libs/dnsconfig.sh $(1)/usr/lib/opennds/
+       $(CP) $(PKG_BUILD_DIR)/forward_authentication_service/libs/download_resources.sh $(1)/usr/lib/opennds/
        $(CP) $(PKG_BUILD_DIR)/forward_authentication_service/libs/post-request.php $(1)/usr/lib/opennds/
        $(CP) $(PKG_BUILD_DIR)/forward_authentication_service/fas-aes/fas-aes.php $(1)/etc/opennds/
        $(CP) $(PKG_BUILD_DIR)/forward_authentication_service/fas-hid/fas-hid.php $(1)/etc/opennds/