Commit Graph

1666 Commits

Author SHA1 Message Date
Simon Wunderlich b2a330202a
Merge pull request #758 from ecsv/batadv-for-21.02
openwrt-21.02: batman-adv: Prevent use from libc headers to not build with BIG_ENDIAN
2021-11-28 17:53:16 +01:00
Hendrik Borghorst 47436b04fd batman-adv: Prevent use from libc headers to not build with BIG_ENDIAN
Commit 97d35a552ec5b6ddf7923dd2f9a8eb973526acea of musl introduced the
macros __LITTLE_ENDIAN and __BIG_ENDIAN in alltypes.h. These are pulled
into the compilation of batman-adv. This has the side effect that the
function is_multicast_ether_addr of etherdevice.h in Linux kernel is
compiled as the big endian version and so fails to work properly on
little endian devices.

This commits prevents pulling in header files of musl libc similar to
OpenWRT commit 9ac47ee46918c45b91f4e4d1fa76b1e26b9d57fe

Signed-off-by: Hendrik Borghorst <hendrikborghorst@gmail.com>
(cherry picked from commit 523821c195)
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-11-27 15:16:12 +01:00
Simon Wunderlich da7d7a0255
Merge pull request #751 from ecsv/batadv-for-21.02
openwrt-21.02: batman-adv: Merge bugfixes from 2021.4
2021-11-19 17:54:43 +01:00
Sven Eckelmann 6d10a01dfa batman-adv: Merge bugfixes from 2021.4
* fix error handling during interface initialization

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-11-19 17:05:03 +01:00
Nick Hainke 3336ecd33c naywatch: warn user
Naywatch in combination with the watchdog can be tricky and dangerous
when doing a sysupgrade. Add a warning to always stop naywatch first and
check if procd took control over the watchdog again.

Also change use_watchdog to '0'.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-11-15 19:57:06 +01:00
Nick Hainke 9e7698f20d babeld: remove unnecessray blob_buf_init calls
For some reason the buffer is initialized twice before filling it.
This does not break anything but is useless. Reduce the initialization
to only one.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 2cf253b3df)
2021-10-21 01:48:04 +02:00
Nick Hainke c524118d29 babeld: free blob-buffers that are on stack
As Felix mentioned:
If a buffer was already allocated, blob_buf_init reuses it. You can
keep reusing it as many times as you want. You only need to call
blob_buf_free if you explicitly want to free the buffer memory
(e.g. on exit, or if the blob_buf is on stack).

http://lists.openwrt.org/pipermail/openwrt-devel/2021-October/036722.html

This PR frees the blob-buffers that are on the stack.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 6d463ca97c)
2021-10-16 13:28:38 +02:00
Perry Melange 1fcda9dfa8 olsrd: wait for wireless to initialize before starting
Wait for wireless to initialize (pending="false") to ensure
that any olsrd(6) configured interfaces and their associated
devices are up.  This provides the init script the ability
to properly add all interface sections to the generated
config file /tmp/etc/olsrd(6).conf

Signed-off-by: Perry Melange <isprotejesvalkata@gmail.com>
(cherry picked from commit 0bb6aa04f6)
2021-10-13 11:35:31 +02:00
Nick Hainke d8b4457267 naywatch: fix procd handling
Sometimes, naywatch can not handover the watchdog to procd again using
ubus. We need to call the same ubus command multiple times until procd
takes over control again.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit e35255710b)
2021-10-01 12:12:47 +02:00
Rob White c30b5d5df3 opennds: Release v9.4.0 (for 21.02)
Maintainer: Rob White rob@blue-wave.net
Compile tested: arm_cortex-a7_neon-vfpv4, mipsel_24kc
Run tested: arm_cortex-a7_neon-vfpv4, mipsel_24kc, gl-inet b1300, gl-inet mt300n-v2, Snapshot, 21.02.0, 19.07.8

Description:
This version adds new functionality, and fixes some issues
  * Add - Error message in fas-aes-https if shared key is mismatched [bluewave.net]
  * Fix - and refactor error 511 page generation[bluewave.net]
  * Fix - and refactor dnsmasq configuration [bluewave.net]
  * Fix - Typographic error preventing RFC8910 disable [bluewave.net]
  * Add - gateway address and gatewayfqdn to ndsctl json output [bluewave.net]
  * Add - RFC8910 housekeeping on startup and shutdown [bluewave.net]
  * Add - correctly apply dhcp option 114 for generic Linux [bluewave.net]
  * Add - reading of configured ndsctlsocket in ndsctl utility[bluewave.net]
  * Add - use send_error 200 for MHD watchdog [bluewave.net]
  * Add - generation of page_511 html by library script [bluewave.net]
  * Add - extend debuglevel support to library scripts [bluewave.net]
  * Refactor - fas-aes-https to simplify and make customisation of http easier [bluewave.net]
  * Add - library script for error 511 page, allowing customisation [bluewave.net]
  * Add - make authmon report connection error details [bluewave.net]
  * Fix- remove unwanted debug message in ndsctl [bluewave.net]
  * Add - RFC8910 support by default [bluewave.net]
  * Add - display status page when accessing /login when authenticated [bluewave.net]
  * Add - MHD response to RFC8910 requests [bluewave.net]
  * Add - Dnsmasq RFC8910 configuration [bluewave.net]
  * Add - send error 511 in response to unsupported http method [bluewave.net]
  * Add - Check for ca-bundle on OpenWrt, if not installed, add syslog messages and terminate [bluewave.net]
  * Add - Make ndsctl use the configured value for socket path if set and deprecate -s option [bluewave.net]
  * Add - Warning message when Walled Garden port 80 is allowed [bluewave.net]
  * Fix - remove un-needed pthread_kill in termination_handler() [bluewave.net] [T-X]
  * Fix - debug messages from authmon.sh [bluewave.net]
  * Fix - Allow disabling gateway fqdn, facilitating access to router port 80 [bluewave.net]
  * Fix - Segfault in ndsctl when -s option is used incorrectly [bluewave.net] [T-X]
  * Fix - Typo making calculation of ul/dl rates incorrect [bluewave.net]
  * Fix - Allow port 80 to be configured in the Walled Garden [bluewave.net]

Signed-off-by: Rob White <rob@blue-wave.net>
2021-09-24 15:34:00 +02:00
Simon Wunderlich c30c9ffc93
Merge pull request #717 from ecsv/batadv-for-21.02
openwrt-21.02: batman-adv: Merge bugfixes from 2021.2
2021-08-20 22:46:42 +02:00
Sven Eckelmann e294a22464 batman-adv: Refresh patches with quilt
The test builds are now requiring quilt refreshed patches instead of git
patches. Otherwise the build check will not even try to build something.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-08-20 12:35:52 +02:00
Sven Eckelmann 519ef4ad29 batman-adv: Merge bugfixes from 2021.2
* Avoid WARN_ON timing related checks

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-08-20 12:35:52 +02:00
Nick Hainke 8d93475e79 olsrd: add filtergw plugin
The plugin adds a possibility to filter out gateway HNAs. This can be
very handy e.g. for faulty nodes. A gateway can be taken out directly on
a central node and all traffic is then redirected. Also the underlying
smart gateways are adapted. Currently the link multiplier is often used
to control a faulty node, but it is not necessarily the best way to do
so.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit bdec65a6d9)
2021-08-14 14:45:44 +02:00
Nick Hainke 76a7bc7555 olsrd: update to 2021-06-21
- filtergw: add plugin allow to allow/block gateways
    (even smartgateway)

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit a302ee6265)
2021-08-14 14:45:44 +02:00
Nick Hainke 3912935ab1 olsrd: use SPDX
Use SPDX license headers to be machine readable.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 1326a6c252)
2021-08-14 14:45:44 +02:00
Matt Reeve 69e2fe6651 bird2: Fix bus error on OSPF on IPQ806X
On a Netgear R7800, if ospf v2 or v3 is configured in bird.conf, it fails to start with this error:

Fri Jun 11 14:41:11 2021 daemon.info bird: Started
Fri Jun 11 14:41:11 2021 kern.err kernel: [ 3500.853248] Alignment trap: not handling instruction f44c0a1f at [<00035848>] Fri Jun 11 14:41:11 2021 kern.alert kernel: [ 3500.853283] 8<--- cut here ---
Fri Jun 11 14:41:11 2021 kern.alert kernel: [ 3500.859363] Unhandled fault: alignment exception (0x801) at 0x007e0624
Fri Jun 11 14:41:11 2021 kern.alert kernel: [ 3500.862443] pgd = 0bbef4fd
Fri Jun 11 14:41:11 2021 kern.alert kernel: [ 3500.868821] [007e0624] *pgd=5d6ca835, *pte=5c40b75f, *ppte=5c40bc7f

The problem is due to a struct not being properly aligned on the ARMv7 architecture.

This patch fixes the problem by adding the "PACKED" macro to the affected struct. Note
that upstream may later fix this in another way, in which case this patch will not be required.

Signed-off-by: Matt Reeve <matt@mreeve.com>
2021-08-11 16:17:26 +02:00
Rob White 79a8e562a3 opennds: Release v9.3.0
Maintainer: Rob White rob@blue-wave.net
Compile tested: arm_cortex-a7_neon-vfpv4, mipsel_24kc
Run tested: arm_cortex-a7_neon-vfpv4, mipsel_24kc, gl-inet b1300, gl-inet mt300n-v2, Snapshot, 21.02.0-rc3, 19.07.7

Description:
This version adds new functionality, and fixes some issues
  * Add - firewall passthrough mode for authenticated users [bluewave.net]
  * Add - use configured debuglevel in authmon [bluewave.net]
  * Add - automated log rotation and client_zone to binauth_log [bluewave.net]
  * Add - increased timeout interval for file downloads [bluewave.net]
  * Add - local interface to MeshZone and remove unneeded call to ip utility [bluewave.net]
  * Add - log_mountpoint and max_log_entries options [bluewave.net]
  * Add - config variables ext_interface and ext_gateway [bluewave.net]
  * Add - Start initial download of remotes only if online [bluewave.net]
  * Add - Router online/offline watchdog [bluewave.net]
  * Fix - Segfault when gatewayfqdn is disabled [bluewave.net]
  * Fix - missing clientmac when not using themespec [bluewave.net]
  * Fix - some compiler warnings [bluewave.net]
  * Fix - use configured value for webroot for remote image symlink to images folder [bluewave.net]
  * Fix - remove refrences to login.sh in documentation and comments [bluewave.net]
  * Fix - Prevent potential read overrun within the MHD page buffer [bluewave.net]
  * Remove - legacy get_ext_iface() function [bluewave.net]

Signed-off-by: Rob White <rob@blue-wave.net>
2021-08-09 17:07:40 +02:00
Nick Hainke 52aaf9052a naywatch: add naywatch
The network may crash on the SoCs, but the SoC itself does not. This
leads to a node no longer being accessible in a mesh network.  If the
node is placed in a location that is not easily accessible, e.g. in a
high tower, it can cause a lot of problems. Therefore we check the
link-local connectivity on the configured interfaces.

Signed-off-by: Nick Hainke <vincent@systemli.org>
Tested-by: Simon Polack <spolack+git@mailbox.org>
Signed-off-by: Simon Polack <spolack+git@mailbox.org>
(cherry picked from commit 1088e65440)
2021-08-01 22:10:59 +02:00
Nick Hainke e7e25b873b olsrd: rename general to procd
It was requested to name the section "procd".

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 87be9afac6)
2021-08-01 11:28:27 +02:00
Nick Hainke e93c57981d olsrd: make respawn_threshold configurable
Also make respawn_threshold configurable. Further, add default
values for:
- respawn_threshold 3600
- respawn_timeout 15
- respawn_retry 0

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 775d030a58)
2021-08-01 11:28:27 +02:00
Tobias Schwarz 0eb67d72d0 olsrd: improve respawn settings
This increases the amount of seconds to wait before a service restart
attempt from 5 to 15 seconds and allows unlimited retries. Olsrd
sometimes crashes together with a network interface and 5 seconds can
be too short to bring back up a crashed network interface, which is
required for olsrd to restart. It also adds the ability to configure
the wait time (respawn_timeout) and the number of retries
(respawn_retry).

Signed-off-by: Tobias Schwarz <info@tobias-schwarz.com>
(cherry picked from commit bc58bd99e8)
2021-08-01 11:28:27 +02:00
Rob White 0e24192903 opennds: [21.02] Backport of Release v9.2.0
Maintainer: Rob White rob@blue-wave.net
Compile tested: arm_cortex-a7_neon-vfpv4, mipsel_24kc
Run tested: arm_cortex-a7_neon-vfpv4, mipsel_24kc, gl-inet b1300, gl-inet mt300n-v2, Snapshot, 21.02.0-rc3, 19.07.7

Description:
This version adds new functionality, improves performance, adds documentation and fixes an issue
  * Add - new config options to ndsctl status [bluewave.net]
  * Add - Readthedocs / man documentation for configuration options [bluewave.net]
  * Add - Faster convergence of average rates to configured rate quotas [bluewave.net]
  * Add - BinAuth parse authenticated client database for client data [bluewave.net]
  * Add - Use heap allocation for http page buffer allowing large page sizes [bluewave.net]
  * Fix - fail to serve downloaded images on custom themespec [bluewave.net]

Signed-off-by: Rob White <rob@blue-wave.net>
2021-07-15 11:44:34 +02:00
Martin Hübner c53a640e44 olsrd: add olsrd-neigh.sh
This script originates from Freifunk Berlin. It prints a list of
all meshing neighbors known to olsrd on the command line.

Added: Error-checking for IPv4/IPv6-Hosts.

Signed-off-by: Martin Hübner <martin.hubner@web.de>
(cherry picked from commit eff944874c)
2021-07-11 19:53:11 +02:00
Nick Hainke 911c0cb45a olsrd: fix olsrd starting before network
Should fix #691.

Sometimes the wifi interface is not ready before olsrd tries to access
it. This leads to warnings in the form of:

daemon.info olsrd: /etc/rc.d/S65olsrd: olsrd_write_interface()
	Warning: Interface 'wireless0' not found, skipped
daemon.notice procd: /etc/rc.d/S65olsrd: olsrd: /etc/rc.d/S65olsrd:
	olsrd_write_interface() Warning: Interface 'wireless0' not found,			skipped

We make use of the "wait_for" procd command that allows us to wait for
the network before starting olsrd.

Tested-by: Noki
Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-07-07 14:56:57 +02:00
Rob White 5a09ac1180 opennds: [21.02] Backport of Release v9.1.1
Maintainer: Rob White rob@blue-wave.net
Compile tested: arm_cortex-a7_neon-vfpv4, mipsel_24kc
Run tested: arm_cortex-a7_neon-vfpv4, mipsel_24kc, gl-inet b1300, gl-inet mt300n-v2, Snapshot, 21.02.0-rc3, 19.07.7

Description:
This version fixes a compiler error, some compiler warnings and mutes a debug message
  * Fix - Compiler error, missing mode in call to open() [bluewave.net]
  * Fix - Compiler warning, ignored return value from call to lockf() [bluewave.net]
  * Fix - Compiler warning, ignored return value from call to system() [bluewave.net]
  * Fix - Compiler warning, ignored return value from call to fgets() [bluewave.net]
  * Fix - Remove debug message from call to get_client_interface library [bluewave.net]

Signed-off-by: Rob White <rob@blue-wave.net>
2021-07-06 10:11:27 +02:00
Nick Hainke ce4d4578c7 olsrd: reload if config changed via uci
Fixes:
https://github.com/openwrt/luci/issues/5139

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 64aa8866b7)
2021-06-23 16:31:27 +02:00
Nick Hainke 2baff33918 olsrd: switch to procd
Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit dc0adf7dce)
2021-06-12 16:37:24 +02:00
Paul Spooren 9f74c2cc41 README: update content and use Markdown
The repository path changed and the information to manually add the feed
is outdated, since it enabled by default.

Also use Markdown to format the README since it looks much more
appealing.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 4bf9a5d5dc)
2021-06-11 11:05:40 -10:00
Nick Hainke 79c5c33d48 babeld: add me as maintainer
I am maintaining the ubus bindings and also the luci-app-babeld.
I am very glad that ubus is included and that is why I do not want
babeld maintainer to have extra work.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit e62b8b54b9)
2021-06-10 09:23:40 +02:00
Nick Hainke c9bb4d3ebe babeld: update to 1.10
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>
(cherry picked from commit dc22d38f91)
2021-06-10 09:23:40 +02:00
Nick Hainke 13461119bc olsrd: only pud depends on libgps
As a workaround for the glibc-fix the dependency on libgps was moved
to olsrd. However, only pud is using this library.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 27ac56adc6)
2021-06-08 22:21:51 +02:00
Nick Hainke 96ba5d184a olsrd: update to 2021-06-07
- pud: fix openwrt glibc compilation

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 4f7791a1fd)
2021-06-08 22:21:51 +02:00
Nick Hainke f1f523117f olsrd: update olsrd to 2021-06-01
Update olsrd to new version.
Remove upstreamed patches:
- 010-musl.patch
- 011-bison.patch
- 012-gpsd.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 6dac4d296c)
2021-06-08 22:21:51 +02:00
Nick Hainke 435ae43565 olsrd: add me as maintainer
I am now the maintainer of olsrd. Add me also as maintainer in the
openwrt-routing feed.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit b455e1809a)
2021-06-08 22:21:51 +02:00
Nick Hainke 60874ceb56 olsrd: use $(AUTORELEASE)
Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 8c7bcb7206)
2021-06-08 22:21:51 +02:00
Nick Hainke fd950266f9 CI: fix building multi-arch-test-build
The sed is adding the package name as "PKGNAME/" and does not remove
the "/". That is why the buildchain currently fails.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2021-06-08 20:38:50 +02:00
Nick Hainke 13fce79c38 CI: copy .github from openwrt-packages
Just copy .github from openwrt enabling:
- checking of formalities
- checking of build
- issue template
- pr template

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit d1ab87b7db)
2021-06-08 20:38:50 +02:00
Simon Wunderlich 57533a25e8
Merge pull request #659 from ecsv/batadv-for-21.02
openwrt-21.02: update packages to version 2021.1
2021-05-19 08:35:37 +02:00
Sven Eckelmann 7f259642fb alfred: update to version 2021.1
* Allow to force of alfred startup when the interfaces don't work/exist (yet)
* coding style cleanups and refactoring

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-05-18 19:18:08 +02:00
Sven Eckelmann 511211431b batctl: update to version 2021.1
* add various commands to print generic netlink replies as JSON
* coding style cleanups and refactoring

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-05-18 19:17:38 +02:00
Sven Eckelmann 5d09821ed7 batman-adv: Always send iface index+name in genlmsg
The batman-adv netlink messages often contain the interface index and
interface name in the same message. This makes it easy for the receiver to
operate on the incoming data when it either needs to print something or
needs to operate on the interface index.

But one of the attributes was missing for:

* neighbor table dumps
* originator table dumps
* gateway list dumps
* query of hardif information
* query of vid information

The userspace therefore had to implement special workarounds using
SIOCGIFNAME or SIOCGIFINDEX depending on what was actually provided.
Providing both information simplifies the userspace code massively without
adding a lot of extra overhead in the kernel portion.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-05-18 19:17:19 +02:00
Sven Eckelmann 9c2452c407 batman-adv: update to version 2021.1
* support latest kernels (4.4 - 5.13)
* coding style cleanups and refactoring
* bugs squashed:

  - correctly initialize padding when sending out translation table TVLVs

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-05-18 19:17:06 +02:00
Simon Wunderlich 0fc85a4b73
Merge pull request #657 from ecsv/batadv-for-21.02
openwrt-21.02: batman-adv: Merge bugfixes from 2021.1
2021-05-18 19:09:31 +02:00
Sven Eckelmann 9beb55d8fc batman-adv: Merge bugfixes from 2021.1
* initialize "struct batadv_tvlv_tt_vlan_data"->reserved field

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-05-14 20:54:45 +02:00
Sven Eckelmann e7ea594077 alfred: use $(AUTORELEASE) for PKG_RELEASE
Use `$(AUTORELEASE)` variable rather than setting a PKG_RELEASE
on every commit manually.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-05-14 20:05:24 +02:00
Sven Eckelmann 7f513574e4 batctl: use $(AUTORELEASE) for PKG_RELEASE
Use `$(AUTORELEASE)` variable rather than setting a PKG_RELEASE
on every commit manually.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-05-14 20:05:24 +02:00
Sven Eckelmann 3f06277b92 batman-adv: use $(AUTORELEASE) for PKG_RELEASE
Use `$(AUTORELEASE)` variable rather than setting a PKG_RELEASE
on every commit manually.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2021-05-14 20:05:24 +02:00
rob 126720145b opennds: Release v9.0.0
This version introduces major new functionality, some changes and fixes.

New Themed Splash pages are introduced, enabling rapid customisation. Theme placeholders can be populated from information provided in the config file. Remote files and image sources can be defined in the config file and these will be automatically downloaded as required.

Deprecated legacy code from previous versions has been removed.

Tested on OpenWrt, OpenSuse and Debian.

Signed-off-by: rob <rob@blue-wave.net>
2021-05-14 11:44:06 +02:00
Josef Schlehofer 5b4d4c7fb6 bird2: Makefile polishing
- Just small reodering of some rows to be more consistent with packages feed
- Fix deprecated SPDX License Identifier

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit b38a46acd5)
2021-04-02 10:32:26 +02:00