forked from freifunk-franken/firmware
Compare commits
61 Commits
Author | SHA1 | Date |
---|---|---|
Christian Dresel | 6be3fce0a2 | |
Christian Dresel | 7c04935465 | |
Christian Dresel | 9d82530dbe | |
Christian Dresel | 0adfa6a155 | |
Christian Dresel | 264645950b | |
Christian Dresel | 513301620d | |
Christian Dresel | 9bc3b5d76e | |
Christian Dresel | 1a5714d73f | |
Fabian Bläse | 20d12f943e | |
Fabian Bläse | 90c58d575b | |
Fabian Bläse | bc3c0b717d | |
Robert Langhammer | f3b1604ff3 | |
Fabian Bläse | 57408f5dfb | |
Fabian Bläse | b26399283a | |
Fabian Bläse | 20ecca34c0 | |
Fabian Bläse | 880d56d52c | |
Robert Langhammer | 0f67aa2504 | |
Fabian Bläse | 4bf14292f7 | |
Robert Langhammer | 25e227c6b9 | |
Robert Langhammer | a317557320 | |
Robert Langhammer | 4cd3b17714 | |
Robert Langhammer | 7947107ed3 | |
Robert Langhammer | 378163d834 | |
Robert Langhammer | 405e0a43d5 | |
Fabian Bläse | 41b4168290 | |
Fabian Bläse | 0234203bed | |
Fabian Bläse | 240a506ee7 | |
Fabian Bläse | f89503660d | |
Robert Langhammer | 7a5bef0d7d | |
Robert Langhammer | 8e127a3936 | |
Christian Dresel | 2bc21aa63f | |
Fabian Bläse | a43b37e9f6 | |
Fabian Bläse | 803e2746df | |
Fabian Bläse | 71d137d4f1 | |
Fabian Bläse | 128a748626 | |
Fabian Bläse | 9a3b499cae | |
Johannes Kimmel | 87d923c1ef | |
Christian Dresel | 0e8c32a363 | |
Fabian Bläse | a5ad4a9b00 | |
Fabian Bläse | 17bc1a7e62 | |
Fabian Bläse | 330ed1b52d | |
Fabian Bläse | 5b23824344 | |
Fabian Bläse | 5424eb728c | |
Fabian Bläse | 209c9debbf | |
Fabian Bläse | 1c3328e64a | |
Fabian Bläse | a8ce8e1ad6 | |
Fabian Bläse | 3f765e4ba7 | |
Fabian Bläse | 1917c8a1df | |
Fabian Bläse | c2f80c9999 | |
Adrian Schmutzler | 27baecaf37 | |
Christian Dresel | 825d760bd8 | |
Fabian Bläse | 51ec3648cf | |
Fabian Bläse | 8ef6dba5a1 | |
Robert Langhammer | a6b90f1a83 | |
Robert Langhammer | 085dbb64fe | |
Robert Langhammer | 12f60419cd | |
Robert Langhammer | 1febd2a9b2 | |
Johannes Kimmel | feeead6c43 | |
Johannes Kimmel | 9d745d0d5c | |
Fabian Bläse | 7c3f3230ff | |
Fabian Bläse | a3d62c7fcc |
|
@ -0,0 +1,45 @@
|
||||||
|
clone:
|
||||||
|
git:
|
||||||
|
image: woodpeckerci/plugin-git
|
||||||
|
settings:
|
||||||
|
tags: true
|
||||||
|
|
||||||
|
pipeline:
|
||||||
|
buildall-layer3:
|
||||||
|
image: openwrtorg/imagebuilder
|
||||||
|
commands:
|
||||||
|
- export HOME=/home/build/openwrt
|
||||||
|
- sudo chown -R build:build .
|
||||||
|
- git config --global user.email "ci@fff.community"
|
||||||
|
- git config --global user.name "FFF CI"
|
||||||
|
- ./buildscript selectvariant layer3
|
||||||
|
- ./buildscript selectbsp bsp/ath79-generic.bsp
|
||||||
|
- ./buildscript prepare
|
||||||
|
- ./buildscript buildall
|
||||||
|
|
||||||
|
buildall-node:
|
||||||
|
image: openwrtorg/imagebuilder
|
||||||
|
commands:
|
||||||
|
- export HOME=/home/build/openwrt
|
||||||
|
- sudo chown -R build:build .
|
||||||
|
- git config --global user.email "ci@fff.community"
|
||||||
|
- git config --global user.name "FFF CI"
|
||||||
|
- ./buildscript selectvariant node
|
||||||
|
- ./buildscript selectbsp bsp/ath79-generic.bsp
|
||||||
|
- ./buildscript prepare
|
||||||
|
- ./buildscript buildall
|
||||||
|
|
||||||
|
distribute:
|
||||||
|
image: alpine/git
|
||||||
|
volumes:
|
||||||
|
- /var/lib/woodpecker/artifacts:/var/run/artifacts
|
||||||
|
commands:
|
||||||
|
- rm -rf /var/run/artifacts/$(git describe --tags)
|
||||||
|
- mkdir -p /var/run/artifacts/$(git describe --tags)
|
||||||
|
- cp -r bin/* /var/run/artifacts/$(git describe --tags)/
|
||||||
|
- echo
|
||||||
|
- echo
|
||||||
|
- echo "You can download the built firmware images here:"
|
||||||
|
- echo "https://ci.fff.community/artifacts/$(git describe --tags)"
|
||||||
|
|
||||||
|
branches: [ master ]
|
|
@ -7,11 +7,11 @@ CONFIG_TARGET_MULTI_PROFILE=y
|
||||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_glinet_gl-ar150=y
|
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_glinet_gl-ar150=y
|
||||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_glinet_gl-ar150=""
|
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_glinet_gl-ar150=""
|
||||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c25-v1=y
|
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c25-v1=y
|
||||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c25-v1="-kmod-ath10k-ct-smallbuffers kmod-ath10k -ath10k-firmware-qca9887-ct ath10k-firmware-qca9887"
|
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c25-v1="-kmod-ath10k-ct-smallbuffers kmod-ath10k-smallbuffers -ath10k-firmware-qca9887-ct ath10k-firmware-qca9887"
|
||||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c60-v1=y
|
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c60-v1=y
|
||||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c60-v1="-kmod-ath10k-ct-smallbuffers kmod-ath10k -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888"
|
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c60-v1="-kmod-ath10k-ct-smallbuffers kmod-ath10k-smallbuffers -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888"
|
||||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c60-v2=y
|
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c60-v2=y
|
||||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c60-v2="-kmod-ath10k-ct-smallbuffers kmod-ath10k -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888"
|
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c60-v2="-kmod-ath10k-ct-smallbuffers kmod-ath10k-smallbuffers -ath10k-firmware-qca9888-ct ath10k-firmware-qca9888"
|
||||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c7-v2=y
|
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c7-v2=y
|
||||||
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c7-v2="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x"
|
CONFIG_TARGET_DEVICE_PACKAGES_ath79_generic_DEVICE_tplink_archer-c7-v2="-kmod-ath10k-ct kmod-ath10k -ath10k-firmware-qca988x-ct ath10k-firmware-qca988x"
|
||||||
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c7-v5=y
|
CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_tplink_archer-c7-v5=y
|
||||||
|
@ -88,6 +88,7 @@ CONFIG_PACKAGE_wpad-mini=m
|
||||||
CONFIG_PACKAGE_ath10k-firmware-qca9887=m
|
CONFIG_PACKAGE_ath10k-firmware-qca9887=m
|
||||||
CONFIG_PACKAGE_ath10k-firmware-qca9888=m
|
CONFIG_PACKAGE_ath10k-firmware-qca9888=m
|
||||||
CONFIG_PACKAGE_ath10k-firmware-qca988x=m
|
CONFIG_PACKAGE_ath10k-firmware-qca988x=m
|
||||||
|
CONFIG_PACKAGE_kmod-ath10k-smallbuffers=m
|
||||||
CONFIG_PACKAGE_kmod-ath10k=m
|
CONFIG_PACKAGE_kmod-ath10k=m
|
||||||
CONFIG_PACKAGE_ath10k-firmware-qca9887-ct=m
|
CONFIG_PACKAGE_ath10k-firmware-qca9887-ct=m
|
||||||
CONFIG_PACKAGE_ath10k-firmware-qca9888-ct=m
|
CONFIG_PACKAGE_ath10k-firmware-qca9888-ct=m
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
chipset=x86
|
||||||
|
subtarget=64
|
||||||
|
images=("openwrt-${chipset}-${subtarget}-generic-squashfs-combined-*"
|
||||||
|
)
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated using "./buildscript config openwrt".
|
||||||
|
# Do no edit manually
|
||||||
|
#
|
||||||
|
CONFIG_TARGET_x86=y
|
||||||
|
CONFIG_TARGET_x86_64=y
|
||||||
|
CONFIG_TARGET_x86_64_DEVICE_generic=y
|
||||||
|
# CONFIG_TARGET_ROOTFS_EXT4FS is not set
|
||||||
|
CONFIG_BUSYBOX_CUSTOM=y
|
||||||
|
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
|
||||||
|
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
|
||||||
|
# CONFIG_BUSYBOX_CONFIG_CROND is not set
|
||||||
|
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
|
||||||
|
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
|
||||||
|
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
|
||||||
|
CONFIG_CLEAN_IPKG=y
|
||||||
|
# CONFIG_PACKAGE_ALFRED_VIS is not set
|
||||||
|
CONFIG_PACKAGE_opkg=m
|
||||||
|
CONFIG_STRIP_KERNEL_EXPORTS=y
|
|
@ -1,890 +0,0 @@
|
||||||
From 0b7311300b01d9975e9996327ee469e4f66fb2ec Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
|
||||||
Date: Sat, 6 Nov 2021 19:29:39 +0000
|
|
||||||
Subject: [PATCH] kernel: bump 5.4 to 5.4.158
|
|
||||||
|
|
||||||
Removed upstreamed:
|
|
||||||
generic/backport-5.4/790-v5.7-net-switchdev-do-not-propagate-bridge-updates-across.patch
|
|
||||||
|
|
||||||
All others updated automatically.
|
|
||||||
|
|
||||||
Compile-tested on: lantiq/xrx200, armvirt/64
|
|
||||||
Runtime-tested on: lantiq/xrx200, armvirt/64
|
|
||||||
|
|
||||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|
||||||
---
|
|
||||||
include/kernel-version.mk | 4 +-
|
|
||||||
...mware-loader-for-uPD720201-and-uPD72.patch | 10 ++--
|
|
||||||
.../802-usb-xhci-force-msi-renesas-xhci.patch | 2 +-
|
|
||||||
...Show-that-the-VIA-VL805-supports-LPM.patch | 2 +-
|
|
||||||
...-for-updating-interrupt-endpoint-int.patch | 4 +-
|
|
||||||
...hci_fixup_endpoint-for-interval-adju.patch | 4 +-
|
|
||||||
...or-host-controllers-that-don-t-updat.patch | 6 +-
|
|
||||||
...-0504-mmc-sdhci-Silence-MMC-warnings.patch | 4 +-
|
|
||||||
...-quirks-add-link-TRB-quirk-for-VL805.patch | 4 +-
|
|
||||||
...ast-GRO-for-skbs-with-Ethernet-heade.patch | 2 +-
|
|
||||||
...-net-phy-add-core-phylib-sfp-support.patch | 4 +-
|
|
||||||
...-not-propagate-bridge-updates-across.patch | 60 -------------------
|
|
||||||
...sfs-attributes-for-VPD-pages-0h-and-.patch | 10 ++--
|
|
||||||
.../generic/hack-5.4/220-gc_sections.patch | 2 +-
|
|
||||||
.../generic/hack-5.4/721-phy_packets.patch | 2 +-
|
|
||||||
...ng-with-source-address-failed-policy.patch | 26 ++++----
|
|
||||||
...T-skip-GRO-for-foreign-MAC-addresses.patch | 10 ++--
|
|
||||||
...dd-support-for-threaded-NAPI-polling.patch | 14 ++---
|
|
||||||
.../811-pci_disable_usb_common_quirks.patch | 2 +-
|
|
||||||
...arch-arm-force-ZRELADDR-on-arch-qcom.patch | 2 +-
|
|
||||||
...Mangle-bootloader-s-kernel-arguments.patch | 2 +-
|
|
||||||
.../900-arm-add-cmdline-override.patch | 2 +-
|
|
||||||
...5-NET-MIPS-lantiq-adds-xrx200-legacy.patch | 2 +-
|
|
||||||
...move-EH-SINGLE_STEP_SET_FEATURE-impl.patch | 4 +-
|
|
||||||
...host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch | 4 +-
|
|
||||||
...host-xhci-do-not-return-error-status.patch | 2 +-
|
|
||||||
...-host-xhci-add-.bus_suspend-override.patch | 2 +-
|
|
||||||
.../901-fix_irq_type_of_pca953x.patch | 2 +-
|
|
||||||
...Mangle-bootloader-s-kernel-arguments.patch | 2 +-
|
|
||||||
...Mangle-bootloader-s-kernel-arguments.patch | 2 +-
|
|
||||||
.../patches-5.4/200-add-ralink-eth.patch | 2 +-
|
|
||||||
.../990-NET-no-auto-carrier-off-support.patch | 4 +-
|
|
||||||
...net-add-support-for-rtl838x-ethernet.patch | 2 +-
|
|
||||||
33 files changed, 73 insertions(+), 133 deletions(-)
|
|
||||||
delete mode 100644 target/linux/generic/backport-5.4/790-v5.7-net-switchdev-do-not-propagate-bridge-updates-across.patch
|
|
||||||
|
|
||||||
diff --git a/include/kernel-version.mk b/include/kernel-version.mk
|
|
||||||
index 83bfcd8ff2..688660cbbd 100644
|
|
||||||
--- a/include/kernel-version.mk
|
|
||||||
+++ b/include/kernel-version.mk
|
|
||||||
@@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL
|
|
||||||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
|
||||||
endif
|
|
||||||
|
|
||||||
-LINUX_VERSION-5.4 = .154
|
|
||||||
+LINUX_VERSION-5.4 = .158
|
|
||||||
|
|
||||||
-LINUX_KERNEL_HASH-5.4.154 = 058994f4666b6b0474a4d5228583e394594e406783b7e93d487c2a66c35f3c06
|
|
||||||
+LINUX_KERNEL_HASH-5.4.158 = 6e018fecdc8fc24553756e582d83b82d65b10a6b03ef36262a24911f839b8d59
|
|
||||||
|
|
||||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
|
||||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
|
||||||
diff --git a/target/linux/apm821xx/patches-5.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch b/target/linux/apm821xx/patches-5.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch
|
|
||||||
index 980a0407db..220e5da73b 100644
|
|
||||||
--- a/target/linux/apm821xx/patches-5.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch
|
|
||||||
+++ b/target/linux/apm821xx/patches-5.4/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch
|
|
||||||
@@ -48,7 +48,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
|
|
||||||
|
|
||||||
#include "xhci.h"
|
|
||||||
#include "xhci-trace.h"
|
|
||||||
-@@ -64,6 +66,44 @@
|
|
||||||
+@@ -65,6 +67,44 @@
|
|
||||||
#define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142
|
|
||||||
#define PCI_DEVICE_ID_ASMEDIA_3242_XHCI 0x3242
|
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
|
|
||||||
static const char hcd_name[] = "xhci_hcd";
|
|
||||||
|
|
||||||
static struct hc_driver __read_mostly xhci_pci_hc_driver;
|
|
||||||
-@@ -309,6 +349,873 @@ static void xhci_pme_acpi_rtd3_enable(st
|
|
||||||
+@@ -311,6 +351,873 @@ static void xhci_pme_acpi_rtd3_enable(st
|
|
||||||
static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { }
|
|
||||||
#endif /* CONFIG_ACPI */
|
|
||||||
|
|
||||||
@@ -967,7 +967,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
|
|
||||||
/* called during probe() after chip reset completes */
|
|
||||||
static int xhci_pci_setup(struct usb_hcd *hcd)
|
|
||||||
{
|
|
||||||
-@@ -350,6 +1257,27 @@ static int xhci_pci_probe(struct pci_dev
|
|
||||||
+@@ -352,6 +1259,27 @@ static int xhci_pci_probe(struct pci_dev
|
|
||||||
struct hc_driver *driver;
|
|
||||||
struct usb_hcd *hcd;
|
|
||||||
|
|
||||||
@@ -995,7 +995,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
|
|
||||||
driver = (struct hc_driver *)id->driver_data;
|
|
||||||
|
|
||||||
/* Prevent runtime suspending between USB-2 and USB-3 initialization */
|
|
||||||
-@@ -411,6 +1339,16 @@ static void xhci_pci_remove(struct pci_d
|
|
||||||
+@@ -413,6 +1341,16 @@ static void xhci_pci_remove(struct pci_d
|
|
||||||
{
|
|
||||||
struct xhci_hcd *xhci;
|
|
||||||
|
|
||||||
@@ -1012,7 +1012,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
|
|
||||||
xhci = hcd_to_xhci(pci_get_drvdata(dev));
|
|
||||||
xhci->xhc_state |= XHCI_STATE_REMOVING;
|
|
||||||
|
|
||||||
-@@ -550,6 +1488,11 @@ static int xhci_pci_resume(struct usb_hc
|
|
||||||
+@@ -552,6 +1490,11 @@ static int xhci_pci_resume(struct usb_hc
|
|
||||||
if (pdev->vendor == PCI_VENDOR_ID_INTEL)
|
|
||||||
usb_enable_intel_xhci_ports(pdev);
|
|
||||||
|
|
||||||
diff --git a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch
|
|
||||||
index 4217a1e949..6980ce80ee 100644
|
|
||||||
--- a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch
|
|
||||||
+++ b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch
|
|
||||||
@@ -13,7 +13,7 @@ produce a noisy warning.
|
|
||||||
|
|
||||||
--- a/drivers/usb/host/xhci-pci.c
|
|
||||||
+++ b/drivers/usb/host/xhci-pci.c
|
|
||||||
-@@ -288,6 +288,7 @@ static void xhci_pci_quirks(struct devic
|
|
||||||
+@@ -290,6 +290,7 @@ static void xhci_pci_quirks(struct devic
|
|
||||||
pdev->device == 0x0015) {
|
|
||||||
xhci->quirks |= XHCI_RESET_ON_RESUME;
|
|
||||||
xhci->quirks |= XHCI_ZERO_64B_REGS;
|
|
||||||
diff --git a/target/linux/bcm27xx/patches-5.4/950-0211-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch b/target/linux/bcm27xx/patches-5.4/950-0211-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch
|
|
||||||
index 5679126103..cf3cb58362 100644
|
|
||||||
--- a/target/linux/bcm27xx/patches-5.4/950-0211-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch
|
|
||||||
+++ b/target/linux/bcm27xx/patches-5.4/950-0211-usb-xhci-Show-that-the-VIA-VL805-supports-LPM.patch
|
|
||||||
@@ -10,7 +10,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
|
||||||
|
|
||||||
--- a/drivers/usb/host/xhci-pci.c
|
|
||||||
+++ b/drivers/usb/host/xhci-pci.c
|
|
||||||
-@@ -257,6 +257,10 @@ static void xhci_pci_quirks(struct devic
|
|
||||||
+@@ -259,6 +259,10 @@ static void xhci_pci_quirks(struct devic
|
|
||||||
pdev->device == 0x3432)
|
|
||||||
xhci->quirks |= XHCI_BROKEN_STREAMS;
|
|
||||||
|
|
||||||
diff --git a/target/linux/bcm27xx/patches-5.4/950-0218-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch b/target/linux/bcm27xx/patches-5.4/950-0218-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch
|
|
||||||
index 9e886ee2df..f654cd8a57 100644
|
|
||||||
--- a/target/linux/bcm27xx/patches-5.4/950-0218-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch
|
|
||||||
+++ b/target/linux/bcm27xx/patches-5.4/950-0218-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch
|
|
||||||
@@ -81,7 +81,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
|
||||||
extern int usb_driver_set_configuration(struct usb_device *udev, int config);
|
|
||||||
--- a/include/linux/usb/hcd.h
|
|
||||||
+++ b/include/linux/usb/hcd.h
|
|
||||||
-@@ -384,6 +384,11 @@ struct hc_driver {
|
|
||||||
+@@ -382,6 +382,11 @@ struct hc_driver {
|
|
||||||
* or bandwidth constraints.
|
|
||||||
*/
|
|
||||||
void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *);
|
|
||||||
@@ -93,7 +93,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
|
||||||
/* Returns the hardware-chosen device address */
|
|
||||||
int (*address_device)(struct usb_hcd *, struct usb_device *udev);
|
|
||||||
/* prepares the hardware to send commands to the device */
|
|
||||||
-@@ -445,6 +450,8 @@ extern void usb_hcd_unmap_urb_setup_for_
|
|
||||||
+@@ -443,6 +448,8 @@ extern void usb_hcd_unmap_urb_setup_for_
|
|
||||||
extern void usb_hcd_unmap_urb_for_dma(struct usb_hcd *, struct urb *);
|
|
||||||
extern void usb_hcd_flush_endpoint(struct usb_device *udev,
|
|
||||||
struct usb_host_endpoint *ep);
|
|
||||||
diff --git a/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
|
|
||||||
index 1016627521..b316ef8180 100644
|
|
||||||
--- a/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
|
|
||||||
+++ b/target/linux/bcm27xx/patches-5.4/950-0219-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
|
|
||||||
@@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
|
||||||
|
|
||||||
--- a/drivers/usb/host/xhci.c
|
|
||||||
+++ b/drivers/usb/host/xhci.c
|
|
||||||
-@@ -1469,6 +1469,103 @@ command_cleanup:
|
|
||||||
+@@ -1468,6 +1468,103 @@ command_cleanup:
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -119,7 +119,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
|
||||||
* non-error returns are a promise to giveback() the urb later
|
|
||||||
* we drop ownership so next owner (or urb unlink) can get it
|
|
||||||
*/
|
|
||||||
-@@ -5358,6 +5455,7 @@ static const struct hc_driver xhci_hc_dr
|
|
||||||
+@@ -5362,6 +5459,7 @@ static const struct hc_driver xhci_hc_dr
|
|
||||||
.endpoint_reset = xhci_endpoint_reset,
|
|
||||||
.check_bandwidth = xhci_check_bandwidth,
|
|
||||||
.reset_bandwidth = xhci_reset_bandwidth,
|
|
||||||
diff --git a/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch b/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
|
|
||||||
index 947b00b398..683f0905ef 100644
|
|
||||||
--- a/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
|
|
||||||
+++ b/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
|
|
||||||
@@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
|
||||||
|
|
||||||
--- a/drivers/usb/host/xhci-pci.c
|
|
||||||
+++ b/drivers/usb/host/xhci-pci.c
|
|
||||||
-@@ -258,8 +258,10 @@ static void xhci_pci_quirks(struct devic
|
|
||||||
+@@ -260,8 +260,10 @@ static void xhci_pci_quirks(struct devic
|
|
||||||
xhci->quirks |= XHCI_BROKEN_STREAMS;
|
|
||||||
|
|
||||||
if (pdev->vendor == PCI_VENDOR_ID_VIA &&
|
|
||||||
@@ -37,7 +37,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
|
||||||
pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI)
|
|
||||||
--- a/drivers/usb/host/xhci-ring.c
|
|
||||||
+++ b/drivers/usb/host/xhci-ring.c
|
|
||||||
-@@ -550,7 +550,10 @@ void xhci_find_new_dequeue_state(struct
|
|
||||||
+@@ -556,7 +556,10 @@ void xhci_find_new_dequeue_state(struct
|
|
||||||
struct xhci_virt_ep *ep = &dev->eps[ep_index];
|
|
||||||
struct xhci_ring *ep_ring;
|
|
||||||
struct xhci_segment *new_seg;
|
|
||||||
@@ -48,7 +48,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
|
||||||
dma_addr_t addr;
|
|
||||||
u64 hw_dequeue;
|
|
||||||
bool cycle_found = false;
|
|
||||||
-@@ -588,7 +591,28 @@ void xhci_find_new_dequeue_state(struct
|
|
||||||
+@@ -594,7 +597,28 @@ void xhci_find_new_dequeue_state(struct
|
|
||||||
hw_dequeue = xhci_get_hw_deq(xhci, dev, ep_index, stream_id);
|
|
||||||
new_seg = ep_ring->deq_seg;
|
|
||||||
new_deq = ep_ring->dequeue;
|
|
||||||
diff --git a/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch b/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch
|
|
||||||
index 89fd58dca0..ba815eecfd 100644
|
|
||||||
--- a/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch
|
|
||||||
+++ b/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch
|
|
||||||
@@ -22,7 +22,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
|
||||||
|
|
||||||
#define MAX_TUNING_LOOP 40
|
|
||||||
|
|
||||||
-@@ -2762,7 +2762,7 @@ static void sdhci_timeout_timer(struct t
|
|
||||||
+@@ -2768,7 +2768,7 @@ static void sdhci_timeout_timer(struct t
|
|
||||||
spin_lock_irqsave(&host->lock, flags);
|
|
||||||
|
|
||||||
if (host->cmd && !sdhci_data_line_cmd(host->cmd)) {
|
|
||||||
@@ -31,7 +31,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
|
||||||
mmc_hostname(host->mmc));
|
|
||||||
sdhci_dumpregs(host);
|
|
||||||
|
|
||||||
-@@ -2784,7 +2784,7 @@ static void sdhci_timeout_data_timer(str
|
|
||||||
+@@ -2790,7 +2790,7 @@ static void sdhci_timeout_data_timer(str
|
|
||||||
|
|
||||||
if (host->data || host->data_cmd ||
|
|
||||||
(host->cmd && sdhci_data_line_cmd(host->cmd))) {
|
|
||||||
diff --git a/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
|
|
||||||
index 627ec30f06..cc05573eb0 100644
|
|
||||||
--- a/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
|
|
||||||
+++ b/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
|
|
||||||
@@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
|
||||||
|
|
||||||
--- a/drivers/usb/host/xhci-pci.c
|
|
||||||
+++ b/drivers/usb/host/xhci-pci.c
|
|
||||||
-@@ -261,6 +261,7 @@ static void xhci_pci_quirks(struct devic
|
|
||||||
+@@ -263,6 +263,7 @@ static void xhci_pci_quirks(struct devic
|
|
||||||
pdev->device == 0x3483) {
|
|
||||||
xhci->quirks |= XHCI_LPM_SUPPORT;
|
|
||||||
xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS;
|
|
||||||
@@ -32,7 +32,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
|
||||||
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
|
||||||
--- a/drivers/usb/host/xhci-ring.c
|
|
||||||
+++ b/drivers/usb/host/xhci-ring.c
|
|
||||||
-@@ -647,6 +647,16 @@ void xhci_find_new_dequeue_state(struct
|
|
||||||
+@@ -653,6 +653,16 @@ void xhci_find_new_dequeue_state(struct
|
|
||||||
|
|
||||||
} while (!cycle_found || !td_last_trb_found);
|
|
||||||
|
|
||||||
diff --git a/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch b/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch
|
|
||||||
index eeea18bb9c..13f0d9d000 100644
|
|
||||||
--- a/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch
|
|
||||||
+++ b/target/linux/generic/backport-5.4/700-v5.5-net-core-allow-fast-GRO-for-skbs-with-Ethernet-heade.patch
|
|
||||||
@@ -66,7 +66,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
||||||
|
|
||||||
--- a/net/core/dev.c
|
|
||||||
+++ b/net/core/dev.c
|
|
||||||
-@@ -5423,8 +5423,7 @@ static inline void skb_gro_reset_offset(
|
|
||||||
+@@ -5429,8 +5429,7 @@ static inline void skb_gro_reset_offset(
|
|
||||||
NAPI_GRO_CB(skb)->frag0 = NULL;
|
|
||||||
NAPI_GRO_CB(skb)->frag0_len = 0;
|
|
||||||
|
|
||||||
diff --git a/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch b/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch
|
|
||||||
index 11da9540e9..edfe151725 100644
|
|
||||||
--- a/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch
|
|
||||||
+++ b/target/linux/generic/backport-5.4/737-v5.5-net-phy-add-core-phylib-sfp-support.patch
|
|
||||||
@@ -24,7 +24,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
|
||||||
#include <linux/workqueue.h>
|
|
||||||
#include <linux/mdio.h>
|
|
||||||
#include <linux/io.h>
|
|
||||||
-@@ -843,6 +844,9 @@ void phy_stop(struct phy_device *phydev)
|
|
||||||
+@@ -863,6 +864,9 @@ void phy_stop(struct phy_device *phydev)
|
|
||||||
|
|
||||||
mutex_lock(&phydev->lock);
|
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
|
||||||
phydev->state = PHY_HALTED;
|
|
||||||
|
|
||||||
mutex_unlock(&phydev->lock);
|
|
||||||
-@@ -905,6 +909,9 @@ void phy_state_machine(struct work_struc
|
|
||||||
+@@ -925,6 +929,9 @@ void phy_state_machine(struct work_struc
|
|
||||||
|
|
||||||
old_state = phydev->state;
|
|
||||||
|
|
||||||
diff --git a/target/linux/generic/backport-5.4/790-v5.7-net-switchdev-do-not-propagate-bridge-updates-across.patch b/target/linux/generic/backport-5.4/790-v5.7-net-switchdev-do-not-propagate-bridge-updates-across.patch
|
|
||||||
deleted file mode 100644
|
|
||||||
index bc8014b772..0000000000
|
|
||||||
--- a/target/linux/generic/backport-5.4/790-v5.7-net-switchdev-do-not-propagate-bridge-updates-across.patch
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,60 +0,0 @@
|
|
||||||
-From 07c6f9805f12f1bb538ef165a092b300350384aa Mon Sep 17 00:00:00 2001
|
|
||||||
-From: Russell King <rmk+kernel@armlinux.org.uk>
|
|
||||||
-Date: Wed, 26 Feb 2020 17:14:21 +0000
|
|
||||||
-Subject: [PATCH] net: switchdev: do not propagate bridge updates across
|
|
||||||
- bridges
|
|
||||||
-
|
|
||||||
-When configuring a tree of independent bridges, propagating changes
|
|
||||||
-from the upper bridge across a bridge master to the lower bridge
|
|
||||||
-ports brings surprises.
|
|
||||||
-
|
|
||||||
-For example, a lower bridge may have vlan filtering enabled. It
|
|
||||||
-may have a vlan interface attached to the bridge master, which may
|
|
||||||
-then be incorporated into another bridge. As soon as the lower
|
|
||||||
-bridge vlan interface is attached to the upper bridge, the lower
|
|
||||||
-bridge has vlan filtering disabled.
|
|
||||||
-
|
|
||||||
-This occurs because switchdev recursively applies its changes to
|
|
||||||
-all lower devices no matter what.
|
|
||||||
-
|
|
||||||
-Reviewed-by: Ido Schimmel <idosch@mellanox.com>
|
|
||||||
-Tested-by: Ido Schimmel <idosch@mellanox.com>
|
|
||||||
-Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
|
||||||
-Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
|
||||||
-Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
||||||
----
|
|
||||||
- net/switchdev/switchdev.c | 9 +++++++++
|
|
||||||
- 1 file changed, 9 insertions(+)
|
|
||||||
-
|
|
||||||
---- a/net/switchdev/switchdev.c
|
|
||||||
-+++ b/net/switchdev/switchdev.c
|
|
||||||
-@@ -476,6 +476,9 @@ static int __switchdev_handle_port_obj_a
|
|
||||||
- * necessary to go through this helper.
|
|
||||||
- */
|
|
||||||
- netdev_for_each_lower_dev(dev, lower_dev, iter) {
|
|
||||||
-+ if (netif_is_bridge_master(lower_dev))
|
|
||||||
-+ continue;
|
|
||||||
-+
|
|
||||||
- err = __switchdev_handle_port_obj_add(lower_dev, port_obj_info,
|
|
||||||
- check_cb, add_cb);
|
|
||||||
- if (err && err != -EOPNOTSUPP)
|
|
||||||
-@@ -528,6 +531,9 @@ static int __switchdev_handle_port_obj_d
|
|
||||||
- * necessary to go through this helper.
|
|
||||||
- */
|
|
||||||
- netdev_for_each_lower_dev(dev, lower_dev, iter) {
|
|
||||||
-+ if (netif_is_bridge_master(lower_dev))
|
|
||||||
-+ continue;
|
|
||||||
-+
|
|
||||||
- err = __switchdev_handle_port_obj_del(lower_dev, port_obj_info,
|
|
||||||
- check_cb, del_cb);
|
|
||||||
- if (err && err != -EOPNOTSUPP)
|
|
||||||
-@@ -579,6 +585,9 @@ static int __switchdev_handle_port_attr_
|
|
||||||
- * necessary to go through this helper.
|
|
||||||
- */
|
|
||||||
- netdev_for_each_lower_dev(dev, lower_dev, iter) {
|
|
||||||
-+ if (netif_is_bridge_master(lower_dev))
|
|
||||||
-+ continue;
|
|
||||||
-+
|
|
||||||
- err = __switchdev_handle_port_attr_set(lower_dev, port_attr_info,
|
|
||||||
- check_cb, set_cb);
|
|
||||||
- if (err && err != -EOPNOTSUPP)
|
|
||||||
diff --git a/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch b/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch
|
|
||||||
index 438588f9f4..8c18d5df6d 100644
|
|
||||||
--- a/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch
|
|
||||||
+++ b/target/linux/generic/backport-5.4/800-v5.5-scsi-core-Add-sysfs-attributes-for-VPD-pages-0h-and-.patch
|
|
||||||
@@ -41,9 +41,9 @@ Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
|
||||||
struct scsi_vpd *vpd_pg80 = NULL, *vpd_pg83 = NULL;
|
|
||||||
+ struct scsi_vpd *vpd_pg0 = NULL, *vpd_pg89 = NULL;
|
|
||||||
unsigned long flags;
|
|
||||||
+ struct module *mod;
|
|
||||||
|
|
||||||
- sdev = container_of(work, struct scsi_device, ew.work);
|
|
||||||
-@@ -466,16 +467,24 @@ static void scsi_device_dev_release_user
|
|
||||||
+@@ -469,16 +470,24 @@ static void scsi_device_dev_release_user
|
|
||||||
sdev->request_queue = NULL;
|
|
||||||
|
|
||||||
mutex_lock(&sdev->inquiry_mutex);
|
|
||||||
@@ -68,7 +68,7 @@ Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
|
||||||
kfree(sdev->inquiry);
|
|
||||||
kfree(sdev);
|
|
||||||
|
|
||||||
-@@ -874,6 +883,8 @@ static struct bin_attribute dev_attr_vpd
|
|
||||||
+@@ -883,6 +892,8 @@ static struct bin_attribute dev_attr_vpd
|
|
||||||
|
|
||||||
sdev_vpd_pg_attr(pg83);
|
|
||||||
sdev_vpd_pg_attr(pg80);
|
|
||||||
@@ -77,7 +77,7 @@ Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
|
||||||
|
|
||||||
static ssize_t show_inquiry(struct file *filep, struct kobject *kobj,
|
|
||||||
struct bin_attribute *bin_attr,
|
|
||||||
-@@ -1206,12 +1217,18 @@ static umode_t scsi_sdev_bin_attr_is_vis
|
|
||||||
+@@ -1215,12 +1226,18 @@ static umode_t scsi_sdev_bin_attr_is_vis
|
|
||||||
struct scsi_device *sdev = to_scsi_device(dev);
|
|
||||||
|
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
|
||||||
return S_IRUGO;
|
|
||||||
}
|
|
||||||
|
|
||||||
-@@ -1254,8 +1271,10 @@ static struct attribute *scsi_sdev_attrs
|
|
||||||
+@@ -1263,8 +1280,10 @@ static struct attribute *scsi_sdev_attrs
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct bin_attribute *scsi_sdev_bin_attrs[] = {
|
|
||||||
diff --git a/target/linux/generic/hack-5.4/220-gc_sections.patch b/target/linux/generic/hack-5.4/220-gc_sections.patch
|
|
||||||
index 6207eb0ec9..fdfaf51406 100644
|
|
||||||
--- a/target/linux/generic/hack-5.4/220-gc_sections.patch
|
|
||||||
+++ b/target/linux/generic/hack-5.4/220-gc_sections.patch
|
|
||||||
@@ -21,7 +21,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
|
||||||
|
|
||||||
--- a/arch/arm/Kconfig
|
|
||||||
+++ b/arch/arm/Kconfig
|
|
||||||
-@@ -111,6 +111,7 @@ config ARM
|
|
||||||
+@@ -112,6 +112,7 @@ config ARM
|
|
||||||
select HAVE_UID16
|
|
||||||
select HAVE_VIRT_CPU_ACCOUNTING_GEN
|
|
||||||
select IRQ_FORCED_THREADING
|
|
||||||
diff --git a/target/linux/generic/hack-5.4/721-phy_packets.patch b/target/linux/generic/hack-5.4/721-phy_packets.patch
|
|
||||||
index 836fc54ba2..bc9b3a4783 100644
|
|
||||||
--- a/target/linux/generic/hack-5.4/721-phy_packets.patch
|
|
||||||
+++ b/target/linux/generic/hack-5.4/721-phy_packets.patch
|
|
||||||
@@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
||||||
help
|
|
||||||
--- a/net/core/dev.c
|
|
||||||
+++ b/net/core/dev.c
|
|
||||||
-@@ -3192,10 +3192,20 @@ static int xmit_one(struct sk_buff *skb,
|
|
||||||
+@@ -3198,10 +3198,20 @@ static int xmit_one(struct sk_buff *skb,
|
|
||||||
if (dev_nit_active(dev))
|
|
||||||
dev_queue_xmit_nit(skb, dev);
|
|
||||||
|
|
||||||
diff --git a/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
|
|
||||||
index 0b95eee494..06227cfafe 100644
|
|
||||||
--- a/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
|
|
||||||
+++ b/target/linux/generic/pending-5.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
|
|
||||||
@@ -110,7 +110,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
|
||||||
return -EINVAL;
|
|
||||||
--- a/net/ipv6/route.c
|
|
||||||
+++ b/net/ipv6/route.c
|
|
||||||
-@@ -93,6 +93,8 @@ static int ip6_pkt_discard(struct sk_bu
|
|
||||||
+@@ -94,6 +94,8 @@ static int ip6_pkt_discard(struct sk_bu
|
|
||||||
static int ip6_pkt_discard_out(struct net *net, struct sock *sk, struct sk_buff *skb);
|
|
||||||
static int ip6_pkt_prohibit(struct sk_buff *skb);
|
|
||||||
static int ip6_pkt_prohibit_out(struct net *net, struct sock *sk, struct sk_buff *skb);
|
|
||||||
@@ -119,7 +119,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
|
||||||
static void ip6_link_failure(struct sk_buff *skb);
|
|
||||||
static void ip6_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
|
|
||||||
struct sk_buff *skb, u32 mtu,
|
|
||||||
-@@ -326,6 +328,18 @@ static const struct rt6_info ip6_prohibi
|
|
||||||
+@@ -327,6 +329,18 @@ static const struct rt6_info ip6_prohibi
|
|
||||||
.rt6i_flags = (RTF_REJECT | RTF_NONEXTHOP),
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
|
||||||
static const struct rt6_info ip6_blk_hole_entry_template = {
|
|
||||||
.dst = {
|
|
||||||
.__refcnt = ATOMIC_INIT(1),
|
|
||||||
-@@ -1047,6 +1061,7 @@ static const int fib6_prop[RTN_MAX + 1]
|
|
||||||
+@@ -1048,6 +1062,7 @@ static const int fib6_prop[RTN_MAX + 1]
|
|
||||||
[RTN_BLACKHOLE] = -EINVAL,
|
|
||||||
[RTN_UNREACHABLE] = -EHOSTUNREACH,
|
|
||||||
[RTN_PROHIBIT] = -EACCES,
|
|
||||||
@@ -146,7 +146,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
|
||||||
[RTN_THROW] = -EAGAIN,
|
|
||||||
[RTN_NAT] = -EINVAL,
|
|
||||||
[RTN_XRESOLVE] = -EINVAL,
|
|
||||||
-@@ -1084,6 +1099,10 @@ static void ip6_rt_init_dst_reject(struc
|
|
||||||
+@@ -1085,6 +1100,10 @@ static void ip6_rt_init_dst_reject(struc
|
|
||||||
rt->dst.output = ip6_pkt_prohibit_out;
|
|
||||||
rt->dst.input = ip6_pkt_prohibit;
|
|
||||||
break;
|
|
||||||
@@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
|
||||||
case RTN_THROW:
|
|
||||||
case RTN_UNREACHABLE:
|
|
||||||
default:
|
|
||||||
-@@ -4426,6 +4445,17 @@ static int ip6_pkt_prohibit_out(struct n
|
|
||||||
+@@ -4434,6 +4453,17 @@ static int ip6_pkt_prohibit_out(struct n
|
|
||||||
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -175,7 +175,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
|
||||||
/*
|
|
||||||
* Allocate a dst for local (unicast / anycast) address.
|
|
||||||
*/
|
|
||||||
-@@ -4906,7 +4936,8 @@ static int rtm_to_fib6_config(struct sk_
|
|
||||||
+@@ -4914,7 +4944,8 @@ static int rtm_to_fib6_config(struct sk_
|
|
||||||
if (rtm->rtm_type == RTN_UNREACHABLE ||
|
|
||||||
rtm->rtm_type == RTN_BLACKHOLE ||
|
|
||||||
rtm->rtm_type == RTN_PROHIBIT ||
|
|
||||||
@@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
|
||||||
cfg->fc_flags |= RTF_REJECT;
|
|
||||||
|
|
||||||
if (rtm->rtm_type == RTN_LOCAL)
|
|
||||||
-@@ -6029,6 +6060,8 @@ static int ip6_route_dev_notify(struct n
|
|
||||||
+@@ -6037,6 +6068,8 @@ static int ip6_route_dev_notify(struct n
|
|
||||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
|
||||||
net->ipv6.ip6_prohibit_entry->dst.dev = dev;
|
|
||||||
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
|
|
||||||
@@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
|
||||||
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
|
|
||||||
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
|
|
||||||
#endif
|
|
||||||
-@@ -6040,6 +6073,7 @@ static int ip6_route_dev_notify(struct n
|
|
||||||
+@@ -6048,6 +6081,7 @@ static int ip6_route_dev_notify(struct n
|
|
||||||
in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
|
|
||||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
|
||||||
in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
|
|
||||||
@@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
|
||||||
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
-@@ -6232,6 +6266,8 @@ static int __net_init ip6_route_net_init
|
|
||||||
+@@ -6240,6 +6274,8 @@ static int __net_init ip6_route_net_init
|
|
||||||
|
|
||||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
|
||||||
net->ipv6.fib6_has_custom_rules = false;
|
|
||||||
@@ -211,7 +211,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
|
||||||
net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
|
|
||||||
sizeof(*net->ipv6.ip6_prohibit_entry),
|
|
||||||
GFP_KERNEL);
|
|
||||||
-@@ -6242,11 +6278,21 @@ static int __net_init ip6_route_net_init
|
|
||||||
+@@ -6250,11 +6286,21 @@ static int __net_init ip6_route_net_init
|
|
||||||
ip6_template_metrics, true);
|
|
||||||
INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_uncached);
|
|
||||||
|
|
||||||
@@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
|
||||||
net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
|
|
||||||
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
|
|
||||||
ip6_template_metrics, true);
|
|
||||||
-@@ -6270,6 +6316,8 @@ out:
|
|
||||||
+@@ -6278,6 +6324,8 @@ out:
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
|
||||||
@@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
|
||||||
out_ip6_prohibit_entry:
|
|
||||||
kfree(net->ipv6.ip6_prohibit_entry);
|
|
||||||
out_ip6_null_entry:
|
|
||||||
-@@ -6289,6 +6337,7 @@ static void __net_exit ip6_route_net_exi
|
|
||||||
+@@ -6297,6 +6345,7 @@ static void __net_exit ip6_route_net_exi
|
|
||||||
kfree(net->ipv6.ip6_null_entry);
|
|
||||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
|
||||||
kfree(net->ipv6.ip6_prohibit_entry);
|
|
||||||
@@ -251,7 +251,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
|
||||||
kfree(net->ipv6.ip6_blk_hole_entry);
|
|
||||||
#endif
|
|
||||||
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
|
|
||||||
-@@ -6366,6 +6415,9 @@ void __init ip6_route_init_special_entri
|
|
||||||
+@@ -6374,6 +6423,9 @@ void __init ip6_route_init_special_entri
|
|
||||||
init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
|
|
||||||
init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
|
|
||||||
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
|
|
||||||
diff --git a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
|
|
||||||
index 4839ac5e70..e0540866c6 100644
|
|
||||||
--- a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
|
|
||||||
+++ b/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
|
|
||||||
@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
||||||
__u16 tc_index; /* traffic control index */
|
|
||||||
--- a/net/core/dev.c
|
|
||||||
+++ b/net/core/dev.c
|
|
||||||
-@@ -5489,6 +5489,9 @@ static enum gro_result dev_gro_receive(s
|
|
||||||
+@@ -5495,6 +5495,9 @@ static enum gro_result dev_gro_receive(s
|
|
||||||
int same_flow;
|
|
||||||
int grow;
|
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
||||||
if (netif_elide_gro(skb->dev))
|
|
||||||
goto normal;
|
|
||||||
|
|
||||||
-@@ -7291,6 +7294,48 @@ static void __netdev_adjacent_dev_unlink
|
|
||||||
+@@ -7297,6 +7300,48 @@ static void __netdev_adjacent_dev_unlink
|
|
||||||
&upper_dev->adj_list.lower);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
||||||
static int __netdev_upper_dev_link(struct net_device *dev,
|
|
||||||
struct net_device *upper_dev, bool master,
|
|
||||||
void *upper_priv, void *upper_info,
|
|
||||||
-@@ -7341,6 +7386,7 @@ static int __netdev_upper_dev_link(struc
|
|
||||||
+@@ -7347,6 +7392,7 @@ static int __netdev_upper_dev_link(struc
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
||||||
ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
|
|
||||||
&changeupper_info.info);
|
|
||||||
ret = notifier_to_errno(ret);
|
|
||||||
-@@ -7434,6 +7480,7 @@ void netdev_upper_dev_unlink(struct net_
|
|
||||||
+@@ -7440,6 +7486,7 @@ void netdev_upper_dev_unlink(struct net_
|
|
||||||
|
|
||||||
__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
|
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
||||||
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
|
|
||||||
&changeupper_info.info);
|
|
||||||
|
|
||||||
-@@ -8164,6 +8211,7 @@ int dev_set_mac_address(struct net_devic
|
|
||||||
+@@ -8170,6 +8217,7 @@ int dev_set_mac_address(struct net_devic
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
dev->addr_assign_type = NET_ADDR_SET;
|
|
||||||
diff --git a/target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch b/target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch
|
|
||||||
index f45efdf12b..febec868f4 100644
|
|
||||||
--- a/target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch
|
|
||||||
+++ b/target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch
|
|
||||||
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
||||||
|
|
||||||
static int netif_rx_internal(struct sk_buff *skb);
|
|
||||||
static int call_netdevice_notifiers_info(unsigned long val,
|
|
||||||
-@@ -5931,6 +5932,11 @@ void __napi_schedule(struct napi_struct
|
|
||||||
+@@ -5937,6 +5938,11 @@ void __napi_schedule(struct napi_struct
|
|
||||||
{
|
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
||||||
local_irq_save(flags);
|
|
||||||
____napi_schedule(this_cpu_ptr(&softnet_data), n);
|
|
||||||
local_irq_restore(flags);
|
|
||||||
-@@ -5982,6 +5988,11 @@ EXPORT_SYMBOL(napi_schedule_prep);
|
|
||||||
+@@ -5988,6 +5994,11 @@ EXPORT_SYMBOL(napi_schedule_prep);
|
|
||||||
*/
|
|
||||||
void __napi_schedule_irqoff(struct napi_struct *n)
|
|
||||||
{
|
|
||||||
@@ -119,7 +119,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
||||||
if (!IS_ENABLED(CONFIG_PREEMPT_RT))
|
|
||||||
____napi_schedule(this_cpu_ptr(&softnet_data), n);
|
|
||||||
else
|
|
||||||
-@@ -6246,9 +6257,89 @@ static void init_gro_hash(struct napi_st
|
|
||||||
+@@ -6252,9 +6263,89 @@ static void init_gro_hash(struct napi_st
|
|
||||||
napi->gro_bitmask = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -209,7 +209,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
||||||
INIT_LIST_HEAD(&napi->poll_list);
|
|
||||||
hrtimer_init(&napi->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED);
|
|
||||||
napi->timer.function = napi_watchdog;
|
|
||||||
-@@ -6265,6 +6356,7 @@ void netif_napi_add(struct net_device *d
|
|
||||||
+@@ -6271,6 +6362,7 @@ void netif_napi_add(struct net_device *d
|
|
||||||
#ifdef CONFIG_NETPOLL
|
|
||||||
napi->poll_owner = -1;
|
|
||||||
#endif
|
|
||||||
@@ -217,7 +217,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
||||||
set_bit(NAPI_STATE_SCHED, &napi->state);
|
|
||||||
set_bit(NAPI_STATE_NPSVC, &napi->state);
|
|
||||||
list_add_rcu(&napi->dev_list, &dev->napi_list);
|
|
||||||
-@@ -6305,6 +6397,7 @@ static void flush_gro_hash(struct napi_s
|
|
||||||
+@@ -6311,6 +6403,7 @@ static void flush_gro_hash(struct napi_s
|
|
||||||
void netif_napi_del(struct napi_struct *napi)
|
|
||||||
{
|
|
||||||
might_sleep();
|
|
||||||
@@ -225,7 +225,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
||||||
if (napi_hash_del(napi))
|
|
||||||
synchronize_net();
|
|
||||||
list_del_init(&napi->dev_list);
|
|
||||||
-@@ -6317,50 +6410,18 @@ EXPORT_SYMBOL(netif_napi_del);
|
|
||||||
+@@ -6323,50 +6416,18 @@ EXPORT_SYMBOL(netif_napi_del);
|
|
||||||
|
|
||||||
static int napi_poll(struct napi_struct *n, struct list_head *repoll)
|
|
||||||
{
|
|
||||||
@@ -280,7 +280,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
||||||
|
|
||||||
/* Some drivers may have called napi_schedule
|
|
||||||
* prior to exhausting their budget.
|
|
||||||
-@@ -10340,6 +10401,10 @@ static int __init net_dev_init(void)
|
|
||||||
+@@ -10346,6 +10407,10 @@ static int __init net_dev_init(void)
|
|
||||||
sd->backlog.weight = weight_p;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/target/linux/generic/pending-5.4/811-pci_disable_usb_common_quirks.patch b/target/linux/generic/pending-5.4/811-pci_disable_usb_common_quirks.patch
|
|
||||||
index 86f8a416e9..6e4584c8a1 100644
|
|
||||||
--- a/target/linux/generic/pending-5.4/811-pci_disable_usb_common_quirks.patch
|
|
||||||
+++ b/target/linux/generic/pending-5.4/811-pci_disable_usb_common_quirks.patch
|
|
||||||
@@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
||||||
#endif /* __LINUX_USB_PCI_QUIRKS_H */
|
|
||||||
--- a/include/linux/usb/hcd.h
|
|
||||||
+++ b/include/linux/usb/hcd.h
|
|
||||||
-@@ -485,7 +485,14 @@ extern int usb_hcd_pci_probe(struct pci_
|
|
||||||
+@@ -483,7 +483,14 @@ extern int usb_hcd_pci_probe(struct pci_
|
|
||||||
extern void usb_hcd_pci_remove(struct pci_dev *dev);
|
|
||||||
extern void usb_hcd_pci_shutdown(struct pci_dev *dev);
|
|
||||||
|
|
||||||
diff --git a/target/linux/ipq806x/patches-5.4/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch b/target/linux/ipq806x/patches-5.4/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch
|
|
||||||
index d3b39ac3e3..6d3e7d9ee0 100644
|
|
||||||
--- a/target/linux/ipq806x/patches-5.4/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch
|
|
||||||
+++ b/target/linux/ipq806x/patches-5.4/0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch
|
|
||||||
@@ -33,7 +33,7 @@ Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
|
|
||||||
|
|
||||||
--- a/arch/arm/Kconfig
|
|
||||||
+++ b/arch/arm/Kconfig
|
|
||||||
-@@ -318,7 +318,7 @@ config ARCH_MULTIPLATFORM
|
|
||||||
+@@ -319,7 +319,7 @@ config ARCH_MULTIPLATFORM
|
|
||||||
depends on MMU
|
|
||||||
select ARM_HAS_SG_CHAIN
|
|
||||||
select ARM_PATCH_PHYS_VIRT
|
|
||||||
diff --git a/target/linux/ipq806x/patches-5.4/0067-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/ipq806x/patches-5.4/0067-generic-Mangle-bootloader-s-kernel-arguments.patch
|
|
||||||
index 751ac10a19..33c77fb729 100644
|
|
||||||
--- a/target/linux/ipq806x/patches-5.4/0067-generic-Mangle-bootloader-s-kernel-arguments.patch
|
|
||||||
+++ b/target/linux/ipq806x/patches-5.4/0067-generic-Mangle-bootloader-s-kernel-arguments.patch
|
|
||||||
@@ -22,7 +22,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
|
|
||||||
|
|
||||||
--- a/arch/arm/Kconfig
|
|
||||||
+++ b/arch/arm/Kconfig
|
|
||||||
-@@ -1827,6 +1827,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
|
|
||||||
+@@ -1828,6 +1828,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
|
|
||||||
The command-line arguments provided by the boot loader will be
|
|
||||||
appended to the the device tree bootargs property.
|
|
||||||
|
|
||||||
diff --git a/target/linux/ipq806x/patches-5.4/900-arm-add-cmdline-override.patch b/target/linux/ipq806x/patches-5.4/900-arm-add-cmdline-override.patch
|
|
||||||
index 49cd68b68d..17f20f068c 100644
|
|
||||||
--- a/target/linux/ipq806x/patches-5.4/900-arm-add-cmdline-override.patch
|
|
||||||
+++ b/target/linux/ipq806x/patches-5.4/900-arm-add-cmdline-override.patch
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
--- a/arch/arm/Kconfig
|
|
||||||
+++ b/arch/arm/Kconfig
|
|
||||||
-@@ -1840,6 +1840,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_MANGL
|
|
||||||
+@@ -1841,6 +1841,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_MANGL
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
diff --git a/target/linux/lantiq/patches-5.4/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch b/target/linux/lantiq/patches-5.4/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
|
|
||||||
index 6a2143e17e..a43982f9e1 100644
|
|
||||||
--- a/target/linux/lantiq/patches-5.4/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
|
|
||||||
+++ b/target/linux/lantiq/patches-5.4/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
|
|
||||||
@@ -16,7 +16,7 @@ Subject: NET: MIPS: lantiq: adds xrx200 ethernet and switch driver
|
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/Kconfig
|
|
||||||
+++ b/drivers/net/ethernet/Kconfig
|
|
||||||
-@@ -108,7 +108,13 @@ config LANTIQ_ETOP
|
|
||||||
+@@ -109,7 +109,13 @@ config LANTIQ_ETOP
|
|
||||||
tristate "Lantiq SoC ETOP driver"
|
|
||||||
depends on SOC_TYPE_XWAY
|
|
||||||
---help---
|
|
||||||
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0014-MLK-17380-3-usb-move-EH-SINGLE_STEP_SET_FEATURE-impl.patch b/target/linux/layerscape/patches-5.4/820-usb-0014-MLK-17380-3-usb-move-EH-SINGLE_STEP_SET_FEATURE-impl.patch
|
|
||||||
index 3c05330b1a..d43626577b 100644
|
|
||||||
--- a/target/linux/layerscape/patches-5.4/820-usb-0014-MLK-17380-3-usb-move-EH-SINGLE_STEP_SET_FEATURE-impl.patch
|
|
||||||
+++ b/target/linux/layerscape/patches-5.4/820-usb-0014-MLK-17380-3-usb-move-EH-SINGLE_STEP_SET_FEATURE-impl.patch
|
|
||||||
@@ -335,7 +335,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
|
|
||||||
int is_setup
|
|
||||||
--- a/include/linux/usb/hcd.h
|
|
||||||
+++ b/include/linux/usb/hcd.h
|
|
||||||
-@@ -411,7 +411,10 @@ struct hc_driver {
|
|
||||||
+@@ -409,7 +409,10 @@ struct hc_driver {
|
|
||||||
int (*find_raw_port_number)(struct usb_hcd *, int);
|
|
||||||
/* Call for power on/off the port if necessary */
|
|
||||||
int (*port_power)(struct usb_hcd *hcd, int portnum, bool enable);
|
|
||||||
@@ -347,7 +347,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
|
|
||||||
};
|
|
||||||
|
|
||||||
static inline int hcd_giveback_urb_in_bh(struct usb_hcd *hcd)
|
|
||||||
-@@ -476,6 +479,14 @@ int usb_hcd_setup_local_mem(struct usb_h
|
|
||||||
+@@ -474,6 +477,14 @@ int usb_hcd_setup_local_mem(struct usb_h
|
|
||||||
|
|
||||||
struct platform_device;
|
|
||||||
extern void usb_hcd_platform_shutdown(struct platform_device *dev);
|
|
||||||
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch
|
|
||||||
index fcad77c1eb..361328cf05 100644
|
|
||||||
--- a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch
|
|
||||||
+++ b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch
|
|
||||||
@@ -42,7 +42,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
|
|
||||||
retval = xhci_enter_test_mode(xhci, test_mode, wIndex,
|
|
||||||
--- a/drivers/usb/host/xhci-ring.c
|
|
||||||
+++ b/drivers/usb/host/xhci-ring.c
|
|
||||||
-@@ -3624,6 +3624,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
|
|
||||||
+@@ -3630,6 +3630,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
|
|
||||||
* bursts that are required to move all packets in this TD. Only SuperSpeed
|
|
||||||
--- a/drivers/usb/host/xhci.c
|
|
||||||
+++ b/drivers/usb/host/xhci.c
|
|
||||||
-@@ -5385,6 +5385,7 @@ static const struct hc_driver xhci_hc_dr
|
|
||||||
+@@ -5389,6 +5389,7 @@ static const struct hc_driver xhci_hc_dr
|
|
||||||
.disable_usb3_lpm_timeout = xhci_disable_usb3_lpm_timeout,
|
|
||||||
.find_raw_port_number = xhci_find_raw_port_number,
|
|
||||||
.clear_tt_buffer_complete = xhci_clear_tt_buffer_complete,
|
|
||||||
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch b/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch
|
|
||||||
index 637d514d76..e5394cc6d8 100644
|
|
||||||
--- a/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch
|
|
||||||
+++ b/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch
|
|
||||||
@@ -22,7 +22,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
|
|
||||||
|
|
||||||
--- a/drivers/usb/host/xhci-ring.c
|
|
||||||
+++ b/drivers/usb/host/xhci-ring.c
|
|
||||||
-@@ -2091,12 +2091,9 @@ static int process_ctrl_td(struct xhci_h
|
|
||||||
+@@ -2097,12 +2097,9 @@ static int process_ctrl_td(struct xhci_h
|
|
||||||
|
|
||||||
switch (trb_comp_code) {
|
|
||||||
case COMP_SUCCESS:
|
|
||||||
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch
|
|
||||||
index 060a809f5b..f808b5b556 100644
|
|
||||||
--- a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch
|
|
||||||
+++ b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch
|
|
||||||
@@ -24,7 +24,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
|
|
||||||
|
|
||||||
--- a/drivers/usb/host/xhci.c
|
|
||||||
+++ b/drivers/usb/host/xhci.c
|
|
||||||
-@@ -5406,6 +5406,8 @@ void xhci_init_driver(struct hc_driver *
|
|
||||||
+@@ -5410,6 +5410,8 @@ void xhci_init_driver(struct hc_driver *
|
|
||||||
drv->check_bandwidth = over->check_bandwidth;
|
|
||||||
if (over->reset_bandwidth)
|
|
||||||
drv->reset_bandwidth = over->reset_bandwidth;
|
|
||||||
diff --git a/target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch b/target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch
|
|
||||||
index a00a240135..5f022ac27f 100644
|
|
||||||
--- a/target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch
|
|
||||||
+++ b/target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch
|
|
||||||
@@ -11,7 +11,7 @@ Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
|
||||||
|
|
||||||
--- a/drivers/gpio/gpio-pca953x.c
|
|
||||||
+++ b/drivers/gpio/gpio-pca953x.c
|
|
||||||
-@@ -879,10 +879,12 @@ static int pca953x_irq_setup(struct pca9
|
|
||||||
+@@ -881,10 +881,12 @@ static int pca953x_irq_setup(struct pca9
|
|
||||||
for (i = 0; i < NBANK(chip); i++)
|
|
||||||
chip->irq_stat[i] &= reg_direction[i];
|
|
||||||
mutex_init(&chip->irq_lock);
|
|
||||||
diff --git a/target/linux/mvebu/patches-5.4/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-5.4/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
|
|
||||||
index fd60cdb322..b6b3247c9d 100644
|
|
||||||
--- a/target/linux/mvebu/patches-5.4/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
|
|
||||||
+++ b/target/linux/mvebu/patches-5.4/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
|
|
||||||
@@ -28,7 +28,7 @@ Signed-off-by: Michael Gray <michael.gray@lantisproject.com>
|
|
||||||
|
|
||||||
--- a/arch/arm/Kconfig
|
|
||||||
+++ b/arch/arm/Kconfig
|
|
||||||
-@@ -1827,6 +1827,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
|
|
||||||
+@@ -1828,6 +1828,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
|
|
||||||
The command-line arguments provided by the boot loader will be
|
|
||||||
appended to the the device tree bootargs property.
|
|
||||||
|
|
||||||
diff --git a/target/linux/oxnas/patches-5.4/996-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/oxnas/patches-5.4/996-generic-Mangle-bootloader-s-kernel-arguments.patch
|
|
||||||
index 8c83d55b6c..bc46f308d3 100644
|
|
||||||
--- a/target/linux/oxnas/patches-5.4/996-generic-Mangle-bootloader-s-kernel-arguments.patch
|
|
||||||
+++ b/target/linux/oxnas/patches-5.4/996-generic-Mangle-bootloader-s-kernel-arguments.patch
|
|
||||||
@@ -22,7 +22,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
|
|
||||||
|
|
||||||
--- a/arch/arm/Kconfig
|
|
||||||
+++ b/arch/arm/Kconfig
|
|
||||||
-@@ -1827,6 +1827,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
|
|
||||||
+@@ -1828,6 +1828,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
|
|
||||||
The command-line arguments provided by the boot loader will be
|
|
||||||
appended to the the device tree bootargs property.
|
|
||||||
|
|
||||||
diff --git a/target/linux/ramips/patches-5.4/200-add-ralink-eth.patch b/target/linux/ramips/patches-5.4/200-add-ralink-eth.patch
|
|
||||||
index b8fd8e511d..79e7c2309b 100644
|
|
||||||
--- a/target/linux/ramips/patches-5.4/200-add-ralink-eth.patch
|
|
||||||
+++ b/target/linux/ramips/patches-5.4/200-add-ralink-eth.patch
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
--- a/drivers/net/ethernet/Kconfig
|
|
||||||
+++ b/drivers/net/ethernet/Kconfig
|
|
||||||
-@@ -159,6 +159,7 @@ source "drivers/net/ethernet/pasemi/Kcon
|
|
||||||
+@@ -160,6 +160,7 @@ source "drivers/net/ethernet/pasemi/Kcon
|
|
||||||
source "drivers/net/ethernet/pensando/Kconfig"
|
|
||||||
source "drivers/net/ethernet/qlogic/Kconfig"
|
|
||||||
source "drivers/net/ethernet/qualcomm/Kconfig"
|
|
||||||
diff --git a/target/linux/ramips/patches-5.4/990-NET-no-auto-carrier-off-support.patch b/target/linux/ramips/patches-5.4/990-NET-no-auto-carrier-off-support.patch
|
|
||||||
index c19cfd322d..b53108ec3c 100644
|
|
||||||
--- a/target/linux/ramips/patches-5.4/990-NET-no-auto-carrier-off-support.patch
|
|
||||||
+++ b/target/linux/ramips/patches-5.4/990-NET-no-auto-carrier-off-support.patch
|
|
||||||
@@ -11,7 +11,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
||||||
|
|
||||||
--- a/drivers/net/phy/phy.c
|
|
||||||
+++ b/drivers/net/phy/phy.c
|
|
||||||
-@@ -547,7 +547,10 @@ static int phy_check_link_status(struct
|
|
||||||
+@@ -549,7 +549,10 @@ static int phy_check_link_status(struct
|
|
||||||
phy_link_up(phydev);
|
|
||||||
} else if (!phydev->link && phydev->state != PHY_NOLINK) {
|
|
||||||
phydev->state = PHY_NOLINK;
|
|
||||||
@@ -23,7 +23,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
-@@ -927,7 +930,10 @@ void phy_state_machine(struct work_struc
|
|
||||||
+@@ -947,7 +950,10 @@ void phy_state_machine(struct work_struc
|
|
||||||
case PHY_HALTED:
|
|
||||||
if (phydev->link) {
|
|
||||||
phydev->link = 0;
|
|
||||||
diff --git a/target/linux/realtek/patches-5.4/702-net-ethernet-add-support-for-rtl838x-ethernet.patch b/target/linux/realtek/patches-5.4/702-net-ethernet-add-support-for-rtl838x-ethernet.patch
|
|
||||||
index 11e62450d5..952384ac89 100644
|
|
||||||
--- a/target/linux/realtek/patches-5.4/702-net-ethernet-add-support-for-rtl838x-ethernet.patch
|
|
||||||
+++ b/target/linux/realtek/patches-5.4/702-net-ethernet-add-support-for-rtl838x-ethernet.patch
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
--- a/drivers/net/ethernet/Kconfig
|
|
||||||
+++ b/drivers/net/ethernet/Kconfig
|
|
||||||
-@@ -163,6 +163,13 @@ source "drivers/net/ethernet/rdc/Kconfig
|
|
||||||
+@@ -164,6 +164,13 @@ source "drivers/net/ethernet/rdc/Kconfig
|
|
||||||
source "drivers/net/ethernet/realtek/Kconfig"
|
|
||||||
source "drivers/net/ethernet/renesas/Kconfig"
|
|
||||||
source "drivers/net/ethernet/rocker/Kconfig"
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,72 +0,0 @@
|
||||||
From: Adrian Schmutzler <freifunk@adrianschmutzler.de>
|
|
||||||
Date: Wed, 10 Feb 2021 22:53:00 +0100
|
|
||||||
Subject: mac80211: add back ath10k_pci memory hacks
|
|
||||||
|
|
||||||
These hacks have been removed in commit 1e27befe63ff ("mac80211: remove
|
|
||||||
ath10k_pci memory hacks").
|
|
||||||
|
|
||||||
However, since we still use mainline ath10k, we will need them.
|
|
||||||
|
|
||||||
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
|
|
||||||
|
|
||||||
diff --git a/package/kernel/mac80211/patches/ath/960-ath10k-limit-htt-rx-ring-size.patch b/package/kernel/mac80211/patches/ath/960-ath10k-limit-htt-rx-ring-size.patch
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000000000000000000000000000000000000..e907c7ab73677a3db928ef3620d77bf22a4d752a
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/package/kernel/mac80211/patches/ath/960-ath10k-limit-htt-rx-ring-size.patch
|
|
||||||
@@ -0,0 +1,11 @@
|
|
||||||
+--- a/drivers/net/wireless/ath/ath10k/htt.h
|
|
||||||
++++ b/drivers/net/wireless/ath/ath10k/htt.h
|
|
||||||
+@@ -236,7 +236,7 @@ enum htt_rx_ring_flags {
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ #define HTT_RX_RING_SIZE_MIN 128
|
|
||||||
+-#define HTT_RX_RING_SIZE_MAX 2048
|
|
||||||
++#define HTT_RX_RING_SIZE_MAX 512
|
|
||||||
+ #define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
|
|
||||||
+ #define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
|
|
||||||
+ #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
|
|
||||||
diff --git a/package/kernel/mac80211/patches/ath/961-ath10k-limit-pci-buffer-size.patch b/package/kernel/mac80211/patches/ath/961-ath10k-limit-pci-buffer-size.patch
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000000000000000000000000000000000000..b5e5c3a9bb00a407096936ece1916e331e0164f5
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/package/kernel/mac80211/patches/ath/961-ath10k-limit-pci-buffer-size.patch
|
|
||||||
@@ -0,0 +1,38 @@
|
|
||||||
+--- a/drivers/net/wireless/ath/ath10k/pci.c
|
|
||||||
++++ b/drivers/net/wireless/ath/ath10k/pci.c
|
|
||||||
+@@ -131,7 +131,7 @@ static const struct ce_attr pci_host_ce_
|
|
||||||
+ .flags = CE_ATTR_FLAGS,
|
|
||||||
+ .src_nentries = 0,
|
|
||||||
+ .src_sz_max = 2048,
|
|
||||||
+- .dest_nentries = 512,
|
|
||||||
++ .dest_nentries = 128,
|
|
||||||
+ .recv_cb = ath10k_pci_htt_htc_rx_cb,
|
|
||||||
+ },
|
|
||||||
+
|
|
||||||
+@@ -140,7 +140,7 @@ static const struct ce_attr pci_host_ce_
|
|
||||||
+ .flags = CE_ATTR_FLAGS,
|
|
||||||
+ .src_nentries = 0,
|
|
||||||
+ .src_sz_max = 2048,
|
|
||||||
+- .dest_nentries = 128,
|
|
||||||
++ .dest_nentries = 64,
|
|
||||||
+ .recv_cb = ath10k_pci_htc_rx_cb,
|
|
||||||
+ },
|
|
||||||
+
|
|
||||||
+@@ -167,7 +167,7 @@ static const struct ce_attr pci_host_ce_
|
|
||||||
+ .flags = CE_ATTR_FLAGS,
|
|
||||||
+ .src_nentries = 0,
|
|
||||||
+ .src_sz_max = 512,
|
|
||||||
+- .dest_nentries = 512,
|
|
||||||
++ .dest_nentries = 128,
|
|
||||||
+ .recv_cb = ath10k_pci_htt_rx_cb,
|
|
||||||
+ },
|
|
||||||
+
|
|
||||||
+@@ -192,7 +192,7 @@ static const struct ce_attr pci_host_ce_
|
|
||||||
+ .flags = CE_ATTR_FLAGS,
|
|
||||||
+ .src_nentries = 0,
|
|
||||||
+ .src_sz_max = 2048,
|
|
||||||
+- .dest_nentries = 128,
|
|
||||||
++ .dest_nentries = 96,
|
|
||||||
+ .recv_cb = ath10k_pci_pktlog_rx_cb,
|
|
||||||
+ },
|
|
||||||
+
|
|
|
@ -1,19 +0,0 @@
|
||||||
From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= <fabian@blaese.de>
|
|
||||||
Date: Sat, 23 Oct 2021 23:34:07 +0200
|
|
||||||
Subject: [PATCH] mt7621: retain old compat_version
|
|
||||||
|
|
||||||
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
|
|
||||||
index a3bc14d59d..99887e8192 100644
|
|
||||||
--- a/target/linux/ramips/image/mt7621.mk
|
|
||||||
+++ b/target/linux/ramips/image/mt7621.mk
|
|
||||||
@@ -91,8 +91,7 @@ define Build/zytrx-header
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Device/dsa-migration
|
|
||||||
- DEVICE_COMPAT_VERSION := 1.1
|
|
||||||
- DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
|
|
||||||
+ DEVICE_COMPAT_VERSION := 1.0
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Device/adslr_g7
|
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
From f53b71d2907eeb0d80e79d99fa7b756b5e5bf32b Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= <fabian@blaese.de>
|
||||||
|
Date: Thu, 24 Feb 2022 00:04:47 +0100
|
||||||
|
Subject: [PATCH] Add hack which fixes forwarding on a stacked bridge
|
||||||
|
configuration using DSA
|
||||||
|
|
||||||
|
---
|
||||||
|
.../hack-5.4/999-fix-stacked-bridge-forwarding.patch | 12 ++++++++++++
|
||||||
|
1 file changed, 12 insertions(+)
|
||||||
|
create mode 100644 target/linux/generic/hack-5.4/999-fix-stacked-bridge-forwarding.patch
|
||||||
|
|
||||||
|
diff --git a/target/linux/generic/hack-5.4/999-fix-stacked-bridge-forwarding.patch b/target/linux/generic/hack-5.4/999-fix-stacked-bridge-forwarding.patch
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..e1d4cb9cd5
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/target/linux/generic/hack-5.4/999-fix-stacked-bridge-forwarding.patch
|
||||||
|
@@ -0,0 +1,12 @@
|
||||||
|
+--- a/net/bridge/br_input.c
|
||||||
|
++++ b/net/bridge/br_input.c
|
||||||
|
+@@ -52,6 +52,9 @@ static int br_pass_frame_up(struct sk_bu
|
||||||
|
+ return NET_RX_DROP;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
++ /* remove offload flag, so upper bridges do not drop the packet */
|
||||||
|
++ br_switchdev_frame_unmark(skb);
|
||||||
|
++
|
||||||
|
+ indev = skb->dev;
|
||||||
|
+ skb->dev = brdev;
|
||||||
|
+ skb = br_handle_vlan(br, NULL, vg, skb);
|
||||||
|
--
|
||||||
|
2.35.1
|
||||||
|
|
35
buildscript
35
buildscript
|
@ -7,15 +7,15 @@ set -o pipefail
|
||||||
builddir=./build
|
builddir=./build
|
||||||
|
|
||||||
# OpenWrt: package hashes correspond to core repo version
|
# OpenWrt: package hashes correspond to core repo version
|
||||||
OPENWRTREV="v21.02.1"
|
OPENWRTREV="v21.02.2"
|
||||||
PACKAGEREV="ded142471e36831d2af63c7fe5062c4367f8ccd2"
|
PACKAGEREV="b0ccc356900f6e1e1dc613d0ea980d5572f553dd"
|
||||||
ROUTINGREV="9e7698f20d1edf8f912fbce2f21400f3cc772b31"
|
ROUTINGREV="10d3ffd8b30186b49538167bac1fa1bf9c88f860"
|
||||||
|
|
||||||
# Gluon packages: master from 2020-02-04
|
# Gluon packages: master from 2020-02-04
|
||||||
GLUONREV="12e41d0ff07ec54bbd67a31ab50d12ca04f2238c"
|
GLUONREV="12e41d0ff07ec54bbd67a31ab50d12ca04f2238c"
|
||||||
|
|
||||||
OPENWRT_PKGS="gpioctl-sysfs libugpio fastd haserl micrond mtr bmon"
|
OPENWRT_PKGS="gpioctl-sysfs libugpio fastd haserl micrond mtr bmon"
|
||||||
ROUTING_PKGS="kmod-batman-adv batctl alfred babeld"
|
ROUTING_PKGS="kmod-batman-adv batctl alfred babeld bird2"
|
||||||
GLUON_PKGS="simple-tc uradvd"
|
GLUON_PKGS="simple-tc uradvd"
|
||||||
|
|
||||||
FFF_VARIANTS="node layer3"
|
FFF_VARIANTS="node layer3"
|
||||||
|
@ -126,20 +126,9 @@ prepare() {
|
||||||
|
|
||||||
patch_target
|
patch_target
|
||||||
|
|
||||||
# apply variant to ensure the included file "variant.mk"
|
|
||||||
# exists in builddir.
|
|
||||||
apply_variant
|
|
||||||
|
|
||||||
update_feeds
|
update_feeds
|
||||||
}
|
}
|
||||||
|
|
||||||
apply_variant() {
|
|
||||||
# set the variant for this build
|
|
||||||
export FFF_VARIANT=$(cat selected_variant)
|
|
||||||
# force the reevaluation of this Makefile to make note of the new variant
|
|
||||||
touch ./src/packages/fff/fff/Makefile
|
|
||||||
}
|
|
||||||
|
|
||||||
update_feeds() {
|
update_feeds() {
|
||||||
## generate own feeds.conf
|
## generate own feeds.conf
|
||||||
#this local variable should be globally configure variable used in get_source and here
|
#this local variable should be globally configure variable used in get_source and here
|
||||||
|
@ -174,8 +163,6 @@ update_feeds() {
|
||||||
}
|
}
|
||||||
|
|
||||||
prebuild() {
|
prebuild() {
|
||||||
apply_variant
|
|
||||||
|
|
||||||
#create filesdir for our config
|
#create filesdir for our config
|
||||||
/bin/rm -rf "$builddir"/files
|
/bin/rm -rf "$builddir"/files
|
||||||
mkdir "$builddir"/files
|
mkdir "$builddir"/files
|
||||||
|
@ -193,6 +180,9 @@ prebuild() {
|
||||||
version="$variant-$version"
|
version="$variant-$version"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# select variant packages
|
||||||
|
echo "CONFIG_PACKAGE_fff-${variant}=y" >> "$builddir"/.config
|
||||||
|
|
||||||
{
|
{
|
||||||
echo "FIRMWARE_VERSION=\"$version\""
|
echo "FIRMWARE_VERSION=\"$version\""
|
||||||
echo "VARIANT=\"$variant\""
|
echo "VARIANT=\"$variant\""
|
||||||
|
@ -290,7 +280,13 @@ cp_firmware() {
|
||||||
filename_build=${f##*/}
|
filename_build=${f##*/}
|
||||||
filename_build=${filename_build//openwrt/fff-${version}}
|
filename_build=${filename_build//openwrt/fff-${version}}
|
||||||
filename_build=${filename_build//squashfs-/}
|
filename_build=${filename_build//squashfs-/}
|
||||||
filename_build=${filename_build//${chipset}-${subtarget}-/}
|
|
||||||
|
# The x86 OpenWrt target does not have a device name,
|
||||||
|
# so keep the target and subtarget for identification.
|
||||||
|
if [ "$chipset" != "x86" ]; then
|
||||||
|
filename_build=${filename_build//${chipset}-/}
|
||||||
|
filename_build=${filename_build//${subtarget}-/}
|
||||||
|
fi
|
||||||
cp "$f" "$imagedestpath/$filename_build"
|
cp "$f" "$imagedestpath/$filename_build"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
@ -316,8 +312,7 @@ buildrelease() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd bin/$variant
|
cd bin/$variant
|
||||||
for binary in *.bin *.img *.tar; do
|
for binary in *.bin *.img *.img.gz *.tar; do
|
||||||
md5sum "$binary" > ./"$binary".md5
|
|
||||||
sha256sum "$binary" > ./"$binary".sha256
|
sha256sum "$binary" > ./"$binary".sha256
|
||||||
done
|
done
|
||||||
echo -e "VERSION:$version" > release.nfo
|
echo -e "VERSION:$version" > release.nfo
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-alfred-monitoring-proxy
|
PKG_NAME:=fff-alfred-monitoring-proxy
|
||||||
PKG_RELEASE:=5
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-alfred
|
PKG_NAME:=fff-alfred
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=fff-babel-bird2
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/fff-babel-bird2
|
||||||
|
SECTION:=base
|
||||||
|
CATEGORY:=Freifunk
|
||||||
|
TITLE:=Freifunk-Franken babel-bird2
|
||||||
|
URL:=https://www.freifunk-franken.de
|
||||||
|
DEPENDS:=+bird2 +bird2c +owipcalc
|
||||||
|
PROVIDES:=fff-babel-implementation
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/fff-babel-bird2/description
|
||||||
|
This is the Freifunk Franken Firmware babel-bird2 package.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
# nothing
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/fff-babel-bird2/install
|
||||||
|
$(CP) ./files/* $(1)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,fff-babel-bird2))
|
|
@ -0,0 +1,123 @@
|
||||||
|
# router id is not required for babeld, but necessary for bird startup
|
||||||
|
router id 192.0.2.0;
|
||||||
|
|
||||||
|
ipv4 table fff4;
|
||||||
|
ipv6 sadr table fff6;
|
||||||
|
|
||||||
|
protocol device {
|
||||||
|
scan time 15;
|
||||||
|
}
|
||||||
|
|
||||||
|
# device routes for ipv4 peering address
|
||||||
|
protocol direct {
|
||||||
|
ipv4 {
|
||||||
|
table fff4;
|
||||||
|
import filter {
|
||||||
|
include "/tmp/bird/include/nat-filter.conf";
|
||||||
|
|
||||||
|
if (net ~ 10.50.0.0/16 || net ~ 10.83.0.0/16) && net.len = 32 then {
|
||||||
|
accept;
|
||||||
|
}
|
||||||
|
reject;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# device routes on loopback interface
|
||||||
|
protocol direct {
|
||||||
|
ipv4 {
|
||||||
|
table fff4;
|
||||||
|
import filter {
|
||||||
|
include "/tmp/bird/include/nat-filter.conf";
|
||||||
|
|
||||||
|
if net ~ 10.50.0.0/16 || net ~ 10.83.0.0/16 then {
|
||||||
|
accept;
|
||||||
|
}
|
||||||
|
reject;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ipv6 sadr {
|
||||||
|
table fff6;
|
||||||
|
import filter {
|
||||||
|
if net ~ fdff::/64 from ::/0 then {
|
||||||
|
reject;
|
||||||
|
}
|
||||||
|
|
||||||
|
# only import GUA + ULA addresses
|
||||||
|
if net !~ 2000::/3 from ::/0 || net !~ fc00::/7 from ::/0 then {
|
||||||
|
reject;
|
||||||
|
}
|
||||||
|
|
||||||
|
accept;
|
||||||
|
};
|
||||||
|
import keep filtered;
|
||||||
|
};
|
||||||
|
|
||||||
|
interface "lo";
|
||||||
|
}
|
||||||
|
|
||||||
|
# ipv6 kernel route interface
|
||||||
|
protocol kernel {
|
||||||
|
ipv6 sadr {
|
||||||
|
table fff6;
|
||||||
|
import filter {
|
||||||
|
# only import routes from kernel with proto static
|
||||||
|
if krt_source != 4 then {
|
||||||
|
reject;
|
||||||
|
}
|
||||||
|
|
||||||
|
if net ~ fdff::/64 from ::/0 then {
|
||||||
|
reject;
|
||||||
|
}
|
||||||
|
|
||||||
|
accept;
|
||||||
|
};
|
||||||
|
export all;
|
||||||
|
preference 200;
|
||||||
|
};
|
||||||
|
kernel table 10;
|
||||||
|
scan time 15;
|
||||||
|
learn yes;
|
||||||
|
}
|
||||||
|
|
||||||
|
# ipv4 kernel route interface
|
||||||
|
protocol kernel {
|
||||||
|
ipv4 {
|
||||||
|
table fff4;
|
||||||
|
import filter {
|
||||||
|
include "/tmp/bird/include/nat-filter.conf";
|
||||||
|
|
||||||
|
# only import routes from kernel with proto static
|
||||||
|
if krt_source = 4 then {
|
||||||
|
accept;
|
||||||
|
}
|
||||||
|
reject;
|
||||||
|
};
|
||||||
|
export all;
|
||||||
|
preference 200;
|
||||||
|
};
|
||||||
|
kernel table 10;
|
||||||
|
scan time 15;
|
||||||
|
learn yes;
|
||||||
|
}
|
||||||
|
|
||||||
|
protocol babel {
|
||||||
|
# required due to static configuration of global router id.
|
||||||
|
# also improves reconnect speed after restart.
|
||||||
|
randomize router id yes;
|
||||||
|
|
||||||
|
ipv4 {
|
||||||
|
table fff4;
|
||||||
|
import all;
|
||||||
|
export all;
|
||||||
|
};
|
||||||
|
|
||||||
|
ipv6 sadr {
|
||||||
|
table fff6;
|
||||||
|
import all;
|
||||||
|
export all;
|
||||||
|
};
|
||||||
|
|
||||||
|
include "/tmp/bird/include/babelpeers.conf";
|
||||||
|
};
|
|
@ -0,0 +1,45 @@
|
||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2010-2017 OpenWrt.org
|
||||||
|
|
||||||
|
USE_PROCD=1
|
||||||
|
START=70
|
||||||
|
|
||||||
|
BIRD_BIN="/usr/sbin/bird"
|
||||||
|
BIRD_CONF="/etc/bird.conf"
|
||||||
|
BIRD_PID_FILE="/var/run/bird.pid"
|
||||||
|
|
||||||
|
start_service() {
|
||||||
|
mkdir -p /var/run
|
||||||
|
|
||||||
|
set_include_path
|
||||||
|
|
||||||
|
procd_open_instance
|
||||||
|
procd_set_param command $BIRD_BIN -f -c $BIRD_CONF -P $BIRD_PID_FILE
|
||||||
|
procd_set_param file "$BIRD_CONF"
|
||||||
|
procd_set_param stdout 1
|
||||||
|
procd_set_param stderr 1
|
||||||
|
procd_set_param respawn
|
||||||
|
procd_close_instance
|
||||||
|
}
|
||||||
|
|
||||||
|
reload_service() {
|
||||||
|
set_include_path
|
||||||
|
procd_send_signal fff-bird
|
||||||
|
}
|
||||||
|
|
||||||
|
set_include_path() {
|
||||||
|
# Change include file path, so bird uses the correct configuration, depending on the configuration state:
|
||||||
|
# - If test mode is active (and /tmp/bird/fff exists), switch to the temporary configuration to be tested.
|
||||||
|
# - If new settings are applied or the old settings are restored after an unsuccessful test (and /tmp/bird/fff does not exist),
|
||||||
|
# switch back to the permanent configuration (/etc/bird/fff).
|
||||||
|
|
||||||
|
mkdir -p /tmp/bird/include
|
||||||
|
|
||||||
|
if [ -d /tmp/bird/fff ]; then
|
||||||
|
echo 'include "/tmp/bird/fff/babelpeers/*.conf";' > /tmp/bird/include/babelpeers.conf
|
||||||
|
echo 'include "/tmp/bird/fff/nat-filter.conf";' > /tmp/bird/include/nat-filter.conf
|
||||||
|
else
|
||||||
|
echo 'include "/etc/bird/fff/babelpeers/*.conf";' > /tmp/bird/include/babelpeers.conf
|
||||||
|
echo 'include "/etc/bird/fff/nat-filter.conf";' > /tmp/bird/include/nat-filter.conf
|
||||||
|
fi
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
/etc/init.d/bird disable
|
||||||
|
rm -f /etc/init.d/bird
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,5 @@
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
|
mv /etc/bird-fff.conf /etc/bird.conf
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,72 @@
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
|
babel_get_version() {
|
||||||
|
/usr/sbin/bird --version 2>&1 | sed "s/BIRD version /bird-/"
|
||||||
|
}
|
||||||
|
|
||||||
|
babel_add_interface() {
|
||||||
|
[ "$#" -ne "4" ] && return 1
|
||||||
|
|
||||||
|
local name="$1"
|
||||||
|
local interface="$2"
|
||||||
|
local type="$3"
|
||||||
|
local rxcost="$4"
|
||||||
|
|
||||||
|
mkdir -p /tmp/bird/fff/babelpeers
|
||||||
|
echo "interface \"$interface\" { type $type; rxcost $rxcost; };" > /tmp/bird/fff/babelpeers/$name.conf
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
babel_delete_interface() {
|
||||||
|
[ "$#" -ne "1" ] && return 1
|
||||||
|
|
||||||
|
local name="$1"
|
||||||
|
|
||||||
|
# Removing peers from /etc is not necessary, as all peers are generated into /tmp on every configuration run,
|
||||||
|
# which completely overwrites existing peers in /etc in the apply step.
|
||||||
|
rm -f /tmp/bird/fff/babelpeers/$name.conf
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
babel_add_redistribute_filter() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
babel_add_private_prefix_filter() {
|
||||||
|
[ "$#" -ne "1" ] && return 1
|
||||||
|
|
||||||
|
local prefix="$1"
|
||||||
|
prefix=$(owipcalc "$prefix" network prefix "$prefix")
|
||||||
|
|
||||||
|
mkdir -p /tmp/bird/fff
|
||||||
|
echo "if net ~ $prefix then reject;" > /tmp/bird/fff/nat-filter.conf
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
babel_remove_custom_redistribute_filters() {
|
||||||
|
mkdir -p /tmp/bird/fff
|
||||||
|
> /tmp/bird/fff/nat-filter.conf
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
babel_apply_implementation() {
|
||||||
|
# error output hidden because apply might be executed without a preceding configure step.
|
||||||
|
if [ -d /tmp/bird/fff ]; then
|
||||||
|
rm -rf /etc/bird/fff
|
||||||
|
mv /tmp/bird/fff /etc/bird/fff
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
babel_reload_implementation() {
|
||||||
|
/etc/init.d/fff-bird reload
|
||||||
|
}
|
||||||
|
|
||||||
|
babel_revert() {
|
||||||
|
rm -r /tmp/bird/fff
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
|
||||||
|
if ! birdc show status >/dev/null 2>&1; then
|
||||||
|
# bird daemon not running or unavailable. exit.
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
neighbours="$(birdc -r show babel neighbors |
|
||||||
|
tail -n +5 |
|
||||||
|
awk '{ printf "<neighbour><ip>%s</ip><outgoing_interface>%s</outgoing_interface><link_cost>%s</link_cost></neighbour>", $1, $2, $3 }'
|
||||||
|
)"
|
||||||
|
|
||||||
|
echo -n "<babel_neighbours>$neighbours</babel_neighbours>"
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,28 @@
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=fff-babel
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/fff-babel
|
||||||
|
SECTION:=base
|
||||||
|
CATEGORY:=Freifunk
|
||||||
|
TITLE:=Freifunk-Franken babel
|
||||||
|
URL:=https://www.freifunk-franken.de
|
||||||
|
DEPENDS:=+fff-babel-implementation
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/fff-babel/description
|
||||||
|
This is the Freifunk Franken Firmware babel package.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
# nothing
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/fff-babel/install
|
||||||
|
$(CP) ./files/* $(1)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,fff-babel))
|
|
@ -26,7 +26,7 @@ configure() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
config_load babeld
|
config_load network
|
||||||
config_foreach remove_babelpeer interface
|
config_foreach remove_babelpeer interface
|
||||||
|
|
||||||
#add new peers
|
#add new peers
|
||||||
|
@ -75,14 +75,14 @@ configure() {
|
||||||
babel_add_peer6addr "network.$prefixname.ip6addr"
|
babel_add_peer6addr "network.$prefixname.ip6addr"
|
||||||
|
|
||||||
# add babel interface
|
# add babel interface
|
||||||
babel_add_interface "$prefixname" "$iface" "$type" "$rxcost" || { echo "Could not add babeld interface for babelpeer $name"; exit 1; }
|
babel_add_interface "$prefixname" "$iface" "$type" "$rxcost" || { echo "Could not add babel interface for babelpeer $name"; exit 1; }
|
||||||
}
|
}
|
||||||
|
|
||||||
config_load gateway
|
config_load gateway
|
||||||
config_foreach add_babelpeer babelpeer
|
config_foreach add_babelpeer babelpeer
|
||||||
|
|
||||||
|
|
||||||
# configure babeld filters for custom ipv6 addresses
|
# configure babel filters for custom ipv6 addresses
|
||||||
## remove old filters
|
## remove old filters
|
||||||
babel_remove_custom_redistribute_filters
|
babel_remove_custom_redistribute_filters
|
||||||
|
|
||||||
|
@ -90,14 +90,25 @@ configure() {
|
||||||
for prefix in $(uci -q get gateway.@client[0].ip6addr); do
|
for prefix in $(uci -q get gateway.@client[0].ip6addr); do
|
||||||
babel_add_redistribute_filter "$prefix"
|
babel_add_redistribute_filter "$prefix"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
## add deny filters for client prefixes used with snat
|
||||||
|
if [ "$(uci -q get gateway.@client[0].snat)" = "1" ]; then
|
||||||
|
for prefix in $(uci -q get gateway.@client[0].ipaddr); do
|
||||||
|
babel_add_private_prefix_filter "$prefix"
|
||||||
|
done
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
apply() {
|
apply() {
|
||||||
uci commit network
|
uci commit network
|
||||||
uci commit babeld
|
babel_apply
|
||||||
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
babel_reload
|
||||||
}
|
}
|
||||||
|
|
||||||
revert() {
|
revert() {
|
||||||
uci revert network
|
uci revert network
|
||||||
uci revert babeld
|
babel_revert
|
||||||
}
|
}
|
|
@ -1,3 +1,9 @@
|
||||||
|
|
||||||
|
implementation=$(uci -q get babelimpl.impl.impl)
|
||||||
|
[ -z "$implementation" ] && implementation=babeld
|
||||||
|
|
||||||
|
. /lib/functions/fff/babeldaemon/$implementation
|
||||||
|
|
||||||
babel_add_iifrules() {
|
babel_add_iifrules() {
|
||||||
[ "$#" -ne "1" ] && return 1
|
[ "$#" -ne "1" ] && return 1
|
||||||
|
|
||||||
|
@ -38,10 +44,18 @@ babel_add_peeraddr() {
|
||||||
uci add_list "$option"="$peer_ip"
|
uci add_list "$option"="$peer_ip"
|
||||||
elif router_ip=$(uci -q get gateway.meta.router_ip); then
|
elif router_ip=$(uci -q get gateway.meta.router_ip); then
|
||||||
# use router_ip if no peer_ip is set
|
# use router_ip if no peer_ip is set
|
||||||
uci add_list "$option"="$router_ip"
|
ip=$router_ip
|
||||||
|
|
||||||
|
# use only first ip
|
||||||
|
ip=${ip%% *}
|
||||||
|
|
||||||
|
# remove CIDR mask
|
||||||
|
ip=${ip%%/*}
|
||||||
|
|
||||||
|
uci add_list "$option"="$ip"
|
||||||
elif ipaddr=$(uci -q get gateway.@client[0].ipaddr); then
|
elif ipaddr=$(uci -q get gateway.@client[0].ipaddr); then
|
||||||
# use client interface address (without subnet) if no router_ip is set
|
# use client interface address (without subnet) if no router_ip is set
|
||||||
uci add_list "$option"=$(echo $ipaddr | cut -d / -f1)
|
uci add_list "$option"=${ipaddr%%/*}
|
||||||
else
|
else
|
||||||
echo "WARNING: No peer_ip, router_ip or client interface ipaddr set! IPv4 routing is not possible."
|
echo "WARNING: No peer_ip, router_ip or client interface ipaddr set! IPv4 routing is not possible."
|
||||||
return 1
|
return 1
|
||||||
|
@ -64,61 +78,39 @@ babel_add_peer6addr() {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
babel_add_interface() {
|
babel_reload() {
|
||||||
[ "$#" -ne "4" ] && return 1
|
# switch implementation temporarily
|
||||||
|
case $implementation in
|
||||||
|
bird2)
|
||||||
|
/etc/init.d/babeld stop 2>/dev/null
|
||||||
|
/etc/init.d/fff-bird start
|
||||||
|
;;
|
||||||
|
babeld)
|
||||||
|
/etc/init.d/fff-bird stop 2>/dev/null
|
||||||
|
/etc/init.d/babeld start
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
local name="$1"
|
# call implementation-specific reload commands
|
||||||
local interface="$2"
|
babel_reload_implementation
|
||||||
local type="$3"
|
|
||||||
local rxcost="$4"
|
|
||||||
|
|
||||||
uci set babeld.$name=interface
|
|
||||||
uci set babeld.$name.ifname="$interface"
|
|
||||||
uci set babeld.$name.type="$type"
|
|
||||||
uci set babeld.$name.rxcost="$rxcost"
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
babel_delete_interface() {
|
babel_apply() {
|
||||||
[ "$#" -ne "1" ] && return 1
|
# switch implementation persistently
|
||||||
|
case $implementation in
|
||||||
|
bird2)
|
||||||
|
/etc/init.d/babeld disable
|
||||||
|
/etc/init.d/fff-bird enable
|
||||||
|
;;
|
||||||
|
babeld)
|
||||||
|
/etc/init.d/fff-bird disable
|
||||||
|
/etc/init.d/babeld enable
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
local name="$1"
|
babel_apply_implementation
|
||||||
|
|
||||||
uci -q del babeld.$name
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
babel_add_redistribute_filter() {
|
|
||||||
[ "$#" -ne "1" ] && return 1
|
|
||||||
|
|
||||||
local prefix="$1"
|
|
||||||
|
|
||||||
config=$(uci add babeld filter)
|
|
||||||
uci set babeld.$config.type='redistribute'
|
|
||||||
uci set babeld.$config.ip="$prefix"
|
|
||||||
uci set babeld.$config.addedbyautoconfig='true'
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
babel_remove_custom_redistribute_filters() {
|
|
||||||
[ "$#" -ne "0" ] && return 1
|
|
||||||
|
|
||||||
remove_filters() {
|
|
||||||
local name="$1"
|
|
||||||
|
|
||||||
# check if filter was added by configuregateway
|
|
||||||
if ! [ "$(uci -q get babeld.$name.addedbyautoconfig)" = 'true' ]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
uci -q del babeld.$name
|
|
||||||
}
|
|
||||||
|
|
||||||
config_load babeld
|
|
||||||
config_foreach remove_filters filter
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-babeld
|
PKG_NAME:=fff-babeld
|
||||||
PKG_RELEASE:=8
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ define Package/fff-babeld
|
||||||
TITLE:=Freifunk-Franken babeld configuration example
|
TITLE:=Freifunk-Franken babeld configuration example
|
||||||
URL:=https://www.freifunk-franken.de
|
URL:=https://www.freifunk-franken.de
|
||||||
DEPENDS:=+babeld
|
DEPENDS:=+babeld
|
||||||
|
PROVIDES:=fff-babel-implementation
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/fff-babeld/description
|
define Package/fff-babeld/description
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
/etc/init.d/babeld disable
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,103 @@
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
|
babel_get_version() {
|
||||||
|
/usr/sbin/babeld -V 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
babel_add_interface() {
|
||||||
|
[ "$#" -ne "4" ] && return 1
|
||||||
|
|
||||||
|
local name="$1"
|
||||||
|
local interface="$2"
|
||||||
|
local type="$3"
|
||||||
|
local rxcost="$4"
|
||||||
|
|
||||||
|
uci set babeld.$name=interface
|
||||||
|
uci set babeld.$name.ifname="$interface"
|
||||||
|
uci set babeld.$name.type="$type"
|
||||||
|
uci set babeld.$name.rxcost="$rxcost"
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
babel_delete_interface() {
|
||||||
|
[ "$#" -ne "1" ] && return 1
|
||||||
|
|
||||||
|
local name="$1"
|
||||||
|
|
||||||
|
uci -q del babeld.$name
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
babel_add_redistribute_filter() {
|
||||||
|
[ "$#" -ne "1" ] && return 1
|
||||||
|
|
||||||
|
local prefix="$1"
|
||||||
|
|
||||||
|
config=$(uci add babeld filter)
|
||||||
|
uci set babeld.$config.type='redistribute'
|
||||||
|
uci set babeld.$config.ip="$prefix"
|
||||||
|
uci set babeld.$config.addedbyautoconfig='true'
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
babel_add_private_prefix_filter() {
|
||||||
|
[ "$#" -ne "1" ] && return 1
|
||||||
|
|
||||||
|
local prefix="$1"
|
||||||
|
|
||||||
|
config=$(uci add babeld filter)
|
||||||
|
uci set babeld.$config.type='redistribute'
|
||||||
|
uci set babeld.$config.ip="$prefix"
|
||||||
|
uci set babeld.$config.addedbyautoconfig='true'
|
||||||
|
uci set babeld.$config.action='deny'
|
||||||
|
|
||||||
|
# move to top, so filter rule has precedence over all other rules
|
||||||
|
uci reorder babeld.$config=0
|
||||||
|
|
||||||
|
config=$(uci add babeld filter)
|
||||||
|
uci set babeld.$config.type='redistribute'
|
||||||
|
uci set babeld.$config.ip="$prefix"
|
||||||
|
uci set babeld.$config.addedbyautoconfig='true'
|
||||||
|
uci set babeld.$config.local='true'
|
||||||
|
uci set babeld.$config.action='deny'
|
||||||
|
|
||||||
|
# move to top, so filter rule has precedence over all other rules
|
||||||
|
uci reorder babeld.$config=0
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
babel_remove_custom_redistribute_filters() {
|
||||||
|
[ "$#" -ne "0" ] && return 1
|
||||||
|
|
||||||
|
remove_filters() {
|
||||||
|
local name="$1"
|
||||||
|
|
||||||
|
# check if filter was added by configuregateway
|
||||||
|
if ! [ "$(uci -q get babeld.$name.addedbyautoconfig)" = 'true' ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
uci -q del babeld.$name
|
||||||
|
}
|
||||||
|
|
||||||
|
config_load babeld
|
||||||
|
config_foreach remove_filters filter
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
babel_apply_implementation() {
|
||||||
|
uci commit babeld
|
||||||
|
}
|
||||||
|
|
||||||
|
babel_reload_implementation() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
babel_revert() {
|
||||||
|
uci revert babeld
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=fff-base
|
||||||
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/fff-base
|
||||||
|
SECTION:=base
|
||||||
|
CATEGORY:=Freifunk
|
||||||
|
TITLE:=Freifunk-Franken base dependencies
|
||||||
|
URL:=https://www.freifunk-franken.de
|
||||||
|
DEFAULT:=y
|
||||||
|
DEPENDS:= \
|
||||||
|
+iptables \
|
||||||
|
+ip6tables \
|
||||||
|
+micrond \
|
||||||
|
+odhcp6c \
|
||||||
|
+fff-config \
|
||||||
|
+fff-network \
|
||||||
|
+fff-nodewatcher \
|
||||||
|
+fff-simple-tc \
|
||||||
|
+fff-support \
|
||||||
|
+fff-sysupgrade \
|
||||||
|
+fff-timeserver \
|
||||||
|
+fff-web-ui \
|
||||||
|
+fff-wireless
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/fff-variant/description
|
||||||
|
This package includes base packages used in the Freifunk-Franken firmware
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,fff-base))
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-batman-adv
|
PKG_NAME:=fff-batman-adv
|
||||||
PKG_RELEASE:=4
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-boardname
|
PKG_NAME:=fff-boardname
|
||||||
PKG_RELEASE:=8
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
BOARD=$(cat /var/sysinfo/board_name)
|
BOARD=$(cat /var/sysinfo/board_name)
|
||||||
|
|
||||||
|
if uname -a | grep x86_64 > /dev/null; then
|
||||||
|
BOARD="x86_64"
|
||||||
|
fi
|
||||||
|
|
||||||
uci set board.model.name=$BOARD
|
uci set board.model.name=$BOARD
|
||||||
uci commit board
|
uci commit board
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-config
|
PKG_NAME:=fff-config
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
vm.panic_on_oom=1
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-dhcp
|
PKG_NAME:=fff-dhcp
|
||||||
PKG_RELEASE:=6
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
# Use a larger cachesize by default
|
||||||
|
cachesize=1024
|
||||||
|
|
||||||
|
# Increase cachesize for systems with enough memory
|
||||||
|
mem="$(awk '/^MemTotal:/ {print $2}' /proc/meminfo)"
|
||||||
|
[ "$mem" -gt 65536 ] && cachesize=8192
|
||||||
|
|
||||||
uci batch >/dev/null <<EOF
|
uci batch >/dev/null <<EOF
|
||||||
delete dhcp.@dnsmasq[0]
|
delete dhcp.@dnsmasq[0]
|
||||||
delete dhcp.lan
|
delete dhcp.lan
|
||||||
|
@ -12,6 +19,7 @@ uci batch >/dev/null <<EOF
|
||||||
set dhcp.@dnsmasq[-1].domain='fff.community'
|
set dhcp.@dnsmasq[-1].domain='fff.community'
|
||||||
set dhcp.@dnsmasq[-1].expandhosts='0'
|
set dhcp.@dnsmasq[-1].expandhosts='0'
|
||||||
set dhcp.@dnsmasq[-1].nonegcache='0'
|
set dhcp.@dnsmasq[-1].nonegcache='0'
|
||||||
|
set dhcp.@dnsmasq[-1].cachesize="$cachesize"
|
||||||
set dhcp.@dnsmasq[-1].authoritative='1'
|
set dhcp.@dnsmasq[-1].authoritative='1'
|
||||||
set dhcp.@dnsmasq[-1].readethers='1'
|
set dhcp.@dnsmasq[-1].readethers='1'
|
||||||
set dhcp.@dnsmasq[-1].leasefile='/tmp/dhcp.leases'
|
set dhcp.@dnsmasq[-1].leasefile='/tmp/dhcp.leases'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-fastd
|
PKG_NAME:=fff-fastd
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ ln -s /tmp/fastd_fff_peers /etc/fastd/fff/peers
|
||||||
echo "#!/bin/sh" > /etc/fastd/fff/up.sh
|
echo "#!/bin/sh" > /etc/fastd/fff/up.sh
|
||||||
echo "ip link set up dev fffVPN" >> /etc/fastd/fff/up.sh
|
echo "ip link set up dev fffVPN" >> /etc/fastd/fff/up.sh
|
||||||
echo "batctl if add fffVPN" >> /etc/fastd/fff/up.sh
|
echo "batctl if add fffVPN" >> /etc/fastd/fff/up.sh
|
||||||
|
echo "batctl hardif fffVPN hop_penalty 30" >> /etc/fastd/fff/up.sh
|
||||||
chmod +x /etc/fastd/fff/up.sh
|
chmod +x /etc/fastd/fff/up.sh
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
protocol=fastd
|
||||||
|
|
||||||
|
fastd_clear() {
|
||||||
|
rm /tmp/fastd_fff_peers/* 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
fastd_addpeer() {
|
||||||
|
[ -d /tmp/fastd_fff_peers ] || mkdir /tmp/fastd_fff_peers
|
||||||
|
|
||||||
|
# write fastd-config
|
||||||
|
json_get_var servername name
|
||||||
|
filename="/etc/fastd/fff/peers/$servername"
|
||||||
|
echo "#name \"${servername}\";" > "$filename"
|
||||||
|
json_get_var key key
|
||||||
|
echo "key \"${key}\";" >> "$filename"
|
||||||
|
json_get_var address address
|
||||||
|
json_get_var port port
|
||||||
|
echo "remote \"${address}\" port ${port};" >> "$filename"
|
||||||
|
echo "" >> "$filename"
|
||||||
|
echo "float yes;" >> "$filename"
|
||||||
|
}
|
||||||
|
|
||||||
|
fastd_start_stop() {
|
||||||
|
if ls /etc/fastd/fff/peers/* &>/dev/null; then
|
||||||
|
/etc/init.d/fastd reload
|
||||||
|
else
|
||||||
|
/etc/init.d/fastd stop
|
||||||
|
fi
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-firewall
|
PKG_NAME:=fff-firewall
|
||||||
PKG_RELEASE:=8
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
#solves MTU problem with bad ISPs
|
|
||||||
iptables -A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
|
|
|
@ -1,5 +0,0 @@
|
||||||
# Limit ssh to 6 new connections per 60 seconds
|
|
||||||
/usr/sbin/ip6tables -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -m recent --set --name dropbear
|
|
||||||
/usr/sbin/ip6tables -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -m recent --update --seconds 60 --hitcount 6 --rttl --name dropbear -j DROP
|
|
||||||
/usr/sbin/iptables -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -m recent --set --name dropbear
|
|
||||||
/usr/sbin/iptables -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -m recent --update --seconds 60 --hitcount 6 --rttl --name dropbear -j DROP
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-hoods
|
PKG_NAME:=fff-hoods
|
||||||
PKG_RELEASE:=19
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-hoodutils
|
PKG_NAME:=fff-hoodutils
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-layer3-config
|
PKG_NAME:=fff-layer3-config
|
||||||
PKG_RELEASE:=9
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
configure() {
|
configure() {
|
||||||
# check if gateway config exists
|
# check if gateway config exists
|
||||||
if ! uci -q show gateway > /dev/null; then
|
if ! uci show gateway > /dev/null; then
|
||||||
echo "ERROR: Gateway config could not be parsed or does not exist."
|
echo "ERROR: Gateway config could not be parsed or does not exist."
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
|
@ -20,7 +20,7 @@ configure() {
|
||||||
|
|
||||||
# ip6addr
|
# ip6addr
|
||||||
#remove old ip6addr
|
#remove old ip6addr
|
||||||
for ip in $(uci get network.client.ip6addr); do
|
for ip in $(uci -q get network.client.ip6addr); do
|
||||||
if echo "$ip" | grep -v -e "fdff:" -e "fe80::1/64" > /dev/null; then
|
if echo "$ip" | grep -v -e "fdff:" -e "fe80::1/64" > /dev/null; then
|
||||||
uci del_list network.client.ip6addr="$ip"
|
uci del_list network.client.ip6addr="$ip"
|
||||||
fi
|
fi
|
||||||
|
@ -50,11 +50,10 @@ configure() {
|
||||||
|
|
||||||
# set interface
|
# set interface
|
||||||
#remove all eth interfaces
|
#remove all eth interfaces
|
||||||
ifaces=$(uci get network.client.ifname | sed 's/\beth[^ ]* *//g' | sed 's/\bswitch[^ ]* *//g')
|
|
||||||
if vlan=$(uci -q get gateway.@client[0].vlan); then
|
if vlan=$(uci -q get gateway.@client[0].vlan); then
|
||||||
uci set network.client.ifname="${SWITCHDEV}.$vlan $ifaces"
|
uci set network.client.ifname="${SWITCHDEV}.$vlan"
|
||||||
elif iface=$(uci -q get gateway.@client[0].iface); then
|
elif iface=$(uci -q get gateway.@client[0].iface); then
|
||||||
uci set network.client.ifname="$iface $ifaces"
|
uci set network.client.ifname="$iface"
|
||||||
else
|
else
|
||||||
echo "WARNING: No Interface for client specified"
|
echo "WARNING: No Interface for client specified"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=fff-layer3-snat
|
||||||
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/fff-layer3-snat
|
||||||
|
SECTION:=base
|
||||||
|
CATEGORY:=Freifunk
|
||||||
|
TITLE:=Freifunk-Franken layer3 configuration with SNAT
|
||||||
|
URL:=https://www.freifunk-franken.de
|
||||||
|
DEPENDS:= \
|
||||||
|
+fff-firewall \
|
||||||
|
+fff-layer3-config \
|
||||||
|
+kmod-ipt-nat
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/fff-layer3-snat/description
|
||||||
|
With this package it is possible to make SNAT with IPv4 on the router
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
# nothing
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/fff-layer3-snat/install
|
||||||
|
$(CP) ./files/* $(1)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,fff-layer3-snat))
|
|
@ -0,0 +1,34 @@
|
||||||
|
configure() {
|
||||||
|
# first we delete the snat config
|
||||||
|
uci -q del network.client.fff_snat
|
||||||
|
uci -q del network.client.fff_snat_sourceip
|
||||||
|
if [ "$(uci -q get gateway.@client[0].snat)" = '1' ]; then
|
||||||
|
|
||||||
|
# first check the config is plausible
|
||||||
|
if ! routerip=$(uci -q get gateway.meta.router_ip); then
|
||||||
|
echo "ERROR: No router_ip set, which is required for SNAT!"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
if ! uci -q get gateway.@client[0].ipaddr >/dev/null; then
|
||||||
|
echo "ERROR: No ipaddr set, which is required for SNAT!"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# keep only the first IP
|
||||||
|
routerip=${routerip%% *}
|
||||||
|
# keep only the IP without the CIDR
|
||||||
|
routerip=${routerip%%/*}
|
||||||
|
|
||||||
|
# We set the snat config
|
||||||
|
uci set network.client.fff_snat=1
|
||||||
|
uci set network.client.fff_snat_sourceip=$routerip
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
apply() {
|
||||||
|
uci commit network
|
||||||
|
}
|
||||||
|
|
||||||
|
revert() {
|
||||||
|
uci revert network
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
if [ "$(uci -q get network.client.fff_snat)" = '1' ]; then
|
||||||
|
iptables -t mangle -A PREROUTING -i br-client -j MARK --set-mark 0x736e6174
|
||||||
|
iptables -t nat -A POSTROUTING -m mark --mark 0x736e6174 -j SNAT --to-source $(uci -q get network.client.fff_snat_sourceip)
|
||||||
|
fi
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-layer3
|
PKG_NAME:=fff-layer3
|
||||||
PKG_RELEASE:=9
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
@ -11,10 +11,13 @@ define Package/fff-layer3
|
||||||
TITLE:=Freifunk-Franken gateway configuration
|
TITLE:=Freifunk-Franken gateway configuration
|
||||||
URL:=https://www.freifunk-franken.de
|
URL:=https://www.freifunk-franken.de
|
||||||
DEPENDS:=+fff-alfred-monitoring-proxy \
|
DEPENDS:=+fff-alfred-monitoring-proxy \
|
||||||
|
+fff-babel \
|
||||||
+fff-babeld \
|
+fff-babeld \
|
||||||
|
+fff-babel-bird2 \
|
||||||
+fff-boardname \
|
+fff-boardname \
|
||||||
+fff-dhcp \
|
+fff-dhcp \
|
||||||
+fff-layer3-config \
|
+fff-layer3-config \
|
||||||
|
+fff-layer3-snat \
|
||||||
+fff-mqtt-monitoring \
|
+fff-mqtt-monitoring \
|
||||||
+fff-network \
|
+fff-network \
|
||||||
+fff-ra \
|
+fff-ra \
|
||||||
|
@ -36,6 +39,7 @@ define Package/fff-layer3
|
||||||
+iptables-mod-ipopt \
|
+iptables-mod-ipopt \
|
||||||
+iptables-mod-conntrack-extra \
|
+iptables-mod-conntrack-extra \
|
||||||
+mtr \
|
+mtr \
|
||||||
|
+snmp-utils \
|
||||||
+tc \
|
+tc \
|
||||||
+tcpdump \
|
+tcpdump \
|
||||||
+vxlan
|
+vxlan
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh
|
||||||
|
ipv4dest=$(uci -q get fff.latency.ipv4)
|
||||||
|
ipv6dest=$(uci -q get fff.latency.ipv6)
|
||||||
|
if [ -n "$ipv4dest" ] || [ -n "$ipv6dest" ] ; then
|
||||||
|
printf "<latency>"
|
||||||
|
|
||||||
|
if [ -n "$ipv4dest" ] ; then
|
||||||
|
ipv4latency=$(ping -qc3 -4 $ipv4dest 2>&1 | awk -F'/' 'END{ print (/^round-trip/? $4:"0") }')
|
||||||
|
printf "<ipv4latency>$ipv4latency</ipv4latency><ipv4dest>$ipv4dest</ipv4dest>"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$ipv6dest" ] ; then
|
||||||
|
ipv6latency=$(ping -qc3 -6 $ipv6dest 2>&1 | awk -F'/' 'END{ print (/^round-trip/? $4:"0") }')
|
||||||
|
printf "<ipv6latency>$ipv6latency</ipv6latency><ipv6dest>$ipv6dest</ipv6dest>"
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "</latency>"
|
||||||
|
fi
|
||||||
|
exit 0
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-mqtt-monitoring
|
PKG_NAME:=fff-mqtt-monitoring
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-mqtt-monitoring
|
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-mqtt-monitoring
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-mqtt
|
PKG_NAME:=fff-mqtt
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-mqtt
|
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-mqtt
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@ define Package/fff-mqtt
|
||||||
URL:=https://www.freifunk-franken.de
|
URL:=https://www.freifunk-franken.de
|
||||||
DEPENDS:= \
|
DEPENDS:= \
|
||||||
+fff-config \
|
+fff-config \
|
||||||
+libmosquitto-ssl \
|
+libmosquitto-nossl \
|
||||||
+mosquitto-client-ssl
|
+mosquitto-client-nossl
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/fff-mqtt/description
|
define Package/fff-mqtt/description
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-network
|
PKG_NAME:=fff-network
|
||||||
PKG_RELEASE:=50
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
config globals 'globals'
|
|
||||||
option packet_steering '1'
|
|
||||||
|
|
||||||
config interface 'loopback'
|
|
||||||
option ifname 'lo'
|
|
||||||
option proto 'static'
|
|
||||||
option ipaddr '127.0.0.1'
|
|
||||||
option netmask '255.0.0.0'
|
|
||||||
|
|
||||||
config interface 'client'
|
|
||||||
option type 'bridge'
|
|
||||||
option auto '1'
|
|
||||||
|
|
||||||
config interface 'wan'
|
|
||||||
option proto 'none'
|
|
||||||
option ifname 'eth2'
|
|
||||||
|
|
||||||
config interface 'wan4'
|
|
||||||
option proto 'dhcp'
|
|
||||||
option ifname '@wan'
|
|
||||||
|
|
||||||
config interface 'wan6'
|
|
||||||
option proto 'dhcpv6'
|
|
||||||
option reqprefix 'no'
|
|
||||||
option sourcefilter '0'
|
|
||||||
option ifname '@wan'
|
|
||||||
|
|
||||||
config interface 'ethmesh'
|
|
||||||
option proto 'batadv_hardif'
|
|
||||||
option master 'bat0'
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
# The GL-AR150 was converted from ONEPORT to TWOPORT.
|
||||||
|
# Copy ETHMODE to LAN1MODE ("LAN"-Port) and set LAN0MODE ("WAN"-Port) to WAN to retain the configured behaviour for upgraded devices.
|
||||||
|
if [ -s /etc/network.config ] ; then
|
||||||
|
. /etc/network.config
|
||||||
|
|
||||||
|
# Ensure ETHMODE contains a sensible value. Use default behaviour (CLIENT) otherwise.
|
||||||
|
[ "$ETHMODE" != "BATMAN" ] && [ "$ETHMODE" != "CLIENT" ] && [ "$ETHMODE" != "WAN" ] && ETHMODE="CLIENT"
|
||||||
|
|
||||||
|
echo "LAN0MODE='WAN' # use BATMAN, CLIENT or WAN" > /etc/network.config
|
||||||
|
echo "LAN1MODE='$ETHMODE' # use BATMAN, CLIENT or WAN" >> /etc/network.config
|
||||||
|
echo "FORCEPARSE='2' # Parse at: 0=first boot only, 1=every reboot, 2=next reboot (once)" >> /etc/network.config
|
||||||
|
fi
|
|
@ -0,0 +1,141 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
. /lib/functions/system.sh
|
||||||
|
. /lib/functions/fff/network
|
||||||
|
|
||||||
|
BOARD="$(uci get board.model.name)"
|
||||||
|
. /etc/network.$BOARD
|
||||||
|
|
||||||
|
[ -n "$ROUTERMAC" ] || ROUTERMAC=$(get_mac_label)
|
||||||
|
|
||||||
|
# Clear possibly existing network configuration
|
||||||
|
> /etc/config/network
|
||||||
|
|
||||||
|
# Add basic network configuration
|
||||||
|
uci batch <<-__EOF__
|
||||||
|
set network.loopback='interface'
|
||||||
|
set network.loopback.ifname='lo'
|
||||||
|
set network.loopback.proto='static'
|
||||||
|
set network.loopback.ipaddr='127.0.0.1'
|
||||||
|
set network.loopback.netmask='255.0.0.0'
|
||||||
|
|
||||||
|
set network.client='interface'
|
||||||
|
set network.client.type='bridge'
|
||||||
|
set network.client.auto='1'
|
||||||
|
|
||||||
|
set network.wan='interface'
|
||||||
|
set network.wan.proto='none'
|
||||||
|
set network.wan.ifname="$WANDEV"
|
||||||
|
|
||||||
|
set network.wan4='interface'
|
||||||
|
set network.wan4.proto='dhcp'
|
||||||
|
set network.wan4.ifname='@wan'
|
||||||
|
|
||||||
|
set network.wan6='interface'
|
||||||
|
set network.wan6.proto='dhcpv6'
|
||||||
|
set network.wan6.reqprefix='no'
|
||||||
|
set network.wan6.sourcefilter='0'
|
||||||
|
set network.wan6.ifname='@wan'
|
||||||
|
|
||||||
|
set network.ethmesh='interface'
|
||||||
|
set network.ethmesh.proto='batadv_hardif'
|
||||||
|
set network.ethmesh.master='bat0'
|
||||||
|
__EOF__
|
||||||
|
|
||||||
|
SWITCHHW=$(swconfig list | awk '{ print $4 }')
|
||||||
|
if [ "$DSA" = "1" ]; then
|
||||||
|
uci batch <<-__EOF__
|
||||||
|
set network.$SWITCHDEV=device
|
||||||
|
set network.$SWITCHDEV.name=$SWITCHDEV
|
||||||
|
set network.$SWITCHDEV.type=bridge
|
||||||
|
# temporary workaround for netifd bug present in OpenWrt 21.02.0 (FS#4104)
|
||||||
|
set network.$SWITCHDEV.bridge_empty='1'
|
||||||
|
|
||||||
|
set network.${SWITCHDEV}_1=bridge-vlan
|
||||||
|
set network.${SWITCHDEV}_1.device=$SWITCHDEV
|
||||||
|
set network.${SWITCHDEV}_1.vlan=1
|
||||||
|
set network.${SWITCHDEV}_1.ports="$CLIENT_PORTS"
|
||||||
|
|
||||||
|
set network.${SWITCHDEV}_3=bridge-vlan
|
||||||
|
set network.${SWITCHDEV}_3.device=$SWITCHDEV
|
||||||
|
set network.${SWITCHDEV}_3.vlan=3
|
||||||
|
set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS"
|
||||||
|
__EOF__
|
||||||
|
|
||||||
|
if [ "$WANDEV" = "$SWITCHDEV" ] || ! [ -z "$WAN_PORTS" ]; then
|
||||||
|
uci batch <<-__EOF__
|
||||||
|
set network.${SWITCHDEV}_2=bridge-vlan
|
||||||
|
set network.${SWITCHDEV}_2.device=$SWITCHDEV
|
||||||
|
set network.${SWITCHDEV}_2.vlan=2
|
||||||
|
set network.${SWITCHDEV}_2.ports="$WAN_PORTS"
|
||||||
|
__EOF__
|
||||||
|
fi
|
||||||
|
elif [ -n "$SWITCHHW" ] && [ -z "$ONE_PORT" ] && [ -z "$TWO_PORT" ]; then
|
||||||
|
uci batch <<-__EOF__
|
||||||
|
set network.$SWITCHDEV=switch
|
||||||
|
set network.$SWITCHDEV.name=$SWITCHHW
|
||||||
|
set network.$SWITCHDEV.enable=1
|
||||||
|
set network.$SWITCHDEV.reset=1
|
||||||
|
set network.$SWITCHDEV.enable_vlan=1
|
||||||
|
|
||||||
|
set network.${SWITCHDEV}_1=switch_vlan
|
||||||
|
set network.${SWITCHDEV}_1.device=$SWITCHHW
|
||||||
|
set network.${SWITCHDEV}_1.vlan=1
|
||||||
|
set network.${SWITCHDEV}_1.ports="$CLIENT_PORTS"
|
||||||
|
|
||||||
|
set network.${SWITCHDEV}_3=switch_vlan
|
||||||
|
set network.${SWITCHDEV}_3.device=$SWITCHHW
|
||||||
|
set network.${SWITCHDEV}_3.vlan=3
|
||||||
|
set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS"
|
||||||
|
__EOF__
|
||||||
|
|
||||||
|
if [ "$WANDEV" = "$SWITCHDEV" ] || [ -n "$WAN_PORTS" ]; then
|
||||||
|
uci batch <<-__EOF__
|
||||||
|
set network.${SWITCHDEV}_2=switch_vlan
|
||||||
|
set network.${SWITCHDEV}_2.device=$SWITCHHW
|
||||||
|
set network.${SWITCHDEV}_2.vlan=2
|
||||||
|
set network.${SWITCHDEV}_2.ports="$WAN_PORTS"
|
||||||
|
__EOF__
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$SWITCHHW" ] || [ "$DSA" = "1" ]; then
|
||||||
|
uci set network.client.ifname="$SWITCHDEV.1 bat0"
|
||||||
|
uci set network.ethmesh.ifname="$SWITCHDEV.3"
|
||||||
|
|
||||||
|
if [ "$WANDEV" = "$SWITCHDEV" ]; then
|
||||||
|
uci set network.wan.ifname=$WANDEV.2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$ETHMESHMAC" ]; then
|
||||||
|
uci set network.ethmesh.macaddr=$ETHMESHMAC
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$ROUTERMAC" ]; then
|
||||||
|
uci set network.client.macaddr=$ROUTERMAC
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
prefix="fdff::/64"
|
||||||
|
|
||||||
|
# Set $prefix::1 as IP
|
||||||
|
addr1=$(owipcalc "$prefix" add ::1)
|
||||||
|
# Set $prefix::MAC as IP
|
||||||
|
addr2=$(owipcalc "$prefix" add "::$(ipMacSuffix "$ROUTERMAC")")
|
||||||
|
# Set $prefix::EUI64 as IP
|
||||||
|
addr3=$(owipcalc "$prefix" add "::$(ipEUISuffix "$ROUTERMAC")")
|
||||||
|
|
||||||
|
uci batch <<-__EOF__
|
||||||
|
del network.globals
|
||||||
|
set network.globals=globals
|
||||||
|
set network.globals.ula_prefix=$prefix
|
||||||
|
add_list network.client.ip6addr=$addr1
|
||||||
|
add_list network.client.ip6addr=$addr2
|
||||||
|
add_list network.client.ip6addr=$addr3
|
||||||
|
set network.client.proto=static
|
||||||
|
__EOF__
|
||||||
|
|
||||||
|
|
||||||
|
uci -q commit network
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Enable RPS
|
||||||
|
uci batch <<-__EOF__
|
||||||
|
set network.globals=globals
|
||||||
|
set network.globals.packet_steering='1'
|
||||||
|
__EOF__
|
||||||
|
|
||||||
|
uci -q commit network
|
|
@ -24,6 +24,7 @@ get_cpu_port() {
|
||||||
ubnt,nanostation-loco-m-xw|\
|
ubnt,nanostation-loco-m-xw|\
|
||||||
ubnt,unifi|\
|
ubnt,unifi|\
|
||||||
ubnt,unifiac-mesh|\
|
ubnt,unifiac-mesh|\
|
||||||
|
x86_64|\
|
||||||
xiaomi,mi-router-4a-gigabit)
|
xiaomi,mi-router-4a-gigabit)
|
||||||
CPUPORT=""
|
CPUPORT=""
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -6,13 +6,12 @@
|
||||||
|
|
||||||
BOARD="$(uci get board.model.name)"
|
BOARD="$(uci get board.model.name)"
|
||||||
. /etc/network.$BOARD
|
. /etc/network.$BOARD
|
||||||
[ -n "$ROUTERMAC" ] || ROUTERMAC=$(get_mac_label)
|
|
||||||
|
|
||||||
if [ -s /etc/network.config ] ; then
|
if [ -s /etc/network.config ] ; then
|
||||||
. /etc/network.config
|
. /etc/network.config
|
||||||
else
|
else
|
||||||
# Write network.config
|
# Write network.config
|
||||||
if [ "$ONE_PORT" = "YES" ] || [ -n "$ETHPORT" ] ; then
|
if [ "$ONE_PORT" = "YES" ] ; then
|
||||||
echo "ETHMODE='$ETHMODE' # use BATMAN, CLIENT or WAN" >> /etc/network.config
|
echo "ETHMODE='$ETHMODE' # use BATMAN, CLIENT or WAN" >> /etc/network.config
|
||||||
fi
|
fi
|
||||||
if [ -n "$TWO_PORT" ] ; then
|
if [ -n "$TWO_PORT" ] ; then
|
||||||
|
@ -105,109 +104,6 @@ elif [ "$TWO_PORT" = "YES" ]; then
|
||||||
|
|
||||||
uci commit network
|
uci commit network
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
if ! uci -q get network.$SWITCHDEV > /dev/null ; then
|
|
||||||
|
|
||||||
if [ "$DSA" = "1" ]; then
|
|
||||||
uci set network.$SWITCHDEV=device
|
|
||||||
uci set network.$SWITCHDEV.name=$SWITCHDEV
|
|
||||||
uci set network.$SWITCHDEV.type=bridge
|
|
||||||
# temporary workaround for netifd bug present in OpenWrt 21.02.0 (FS#4104)
|
|
||||||
uci set network.$SWITCHDEV.bridge_empty='1'
|
|
||||||
|
|
||||||
uci set network.${SWITCHDEV}_1=bridge-vlan
|
|
||||||
uci set network.${SWITCHDEV}_1.device=$SWITCHDEV
|
|
||||||
uci set network.${SWITCHDEV}_1.vlan=1
|
|
||||||
uci set network.${SWITCHDEV}_1.ports="$CLIENT_PORTS"
|
|
||||||
|
|
||||||
if [ "$WANDEV" = "$SWITCHDEV" ] || ! [ -z "$WAN_PORTS" ]; then
|
|
||||||
uci set network.${SWITCHDEV}_2=bridge-vlan
|
|
||||||
uci set network.${SWITCHDEV}_2.device=$SWITCHDEV
|
|
||||||
uci set network.${SWITCHDEV}_2.vlan=2
|
|
||||||
uci set network.${SWITCHDEV}_2.ports="$WAN_PORTS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
uci set network.${SWITCHDEV}_3=bridge-vlan
|
|
||||||
uci set network.${SWITCHDEV}_3.device=$SWITCHDEV
|
|
||||||
uci set network.${SWITCHDEV}_3.vlan=3
|
|
||||||
uci set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS"
|
|
||||||
else
|
|
||||||
SWITCHHW=$(swconfig list | awk '{ print $4 }')
|
|
||||||
|
|
||||||
uci set network.$SWITCHDEV=switch
|
|
||||||
uci set network.$SWITCHDEV.name=$SWITCHHW
|
|
||||||
uci set network.$SWITCHDEV.enable=1
|
|
||||||
uci set network.$SWITCHDEV.reset=1
|
|
||||||
uci set network.$SWITCHDEV.enable_vlan=1
|
|
||||||
|
|
||||||
uci set network.${SWITCHDEV}_1=switch_vlan
|
|
||||||
uci set network.${SWITCHDEV}_1.device=$SWITCHHW
|
|
||||||
uci set network.${SWITCHDEV}_1.vlan=1
|
|
||||||
uci set network.${SWITCHDEV}_1.ports="$CLIENT_PORTS"
|
|
||||||
|
|
||||||
if [ "$WANDEV" = "$SWITCHDEV" ] || [ -n "$WAN_PORTS" ]; then
|
|
||||||
uci set network.${SWITCHDEV}_2=switch_vlan
|
|
||||||
uci set network.${SWITCHDEV}_2.device=$SWITCHHW
|
|
||||||
uci set network.${SWITCHDEV}_2.vlan=2
|
|
||||||
uci set network.${SWITCHDEV}_2.ports="$WAN_PORTS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
uci set network.${SWITCHDEV}_3=switch_vlan
|
|
||||||
uci set network.${SWITCHDEV}_3.device=$SWITCHHW
|
|
||||||
uci set network.${SWITCHDEV}_3.vlan=3
|
|
||||||
uci set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
uci set network.client.ifname="$SWITCHDEV.1 bat0"
|
|
||||||
|
|
||||||
uci set network.ethmesh.ifname="$SWITCHDEV.3"
|
|
||||||
|
|
||||||
if [ "$WANDEV" = "$SWITCHDEV" ]; then
|
|
||||||
uci set network.wan.ifname=$WANDEV.2
|
|
||||||
else
|
|
||||||
uci set network.wan.ifname=$WANDEV
|
|
||||||
fi
|
|
||||||
|
|
||||||
uci commit network
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
/etc/init.d/network restart
|
|
||||||
|
|
||||||
if [ -n "$ETHMESHMAC" ]; then
|
|
||||||
if uci get network.ethmesh.macaddr
|
|
||||||
then
|
|
||||||
echo "MAC for ethmesh is set already"
|
|
||||||
else
|
|
||||||
echo "Fixing MAC on $SWITCHDEV.3 (ethmesh)"
|
|
||||||
sleep 10
|
|
||||||
|
|
||||||
uci set network.ethmesh.macaddr=$ETHMESHMAC
|
|
||||||
uci commit network
|
|
||||||
|
|
||||||
ifconfig $SWITCHDEV.3 down
|
|
||||||
ifconfig $SWITCHDEV.3 hw ether $ETHMESHMAC
|
|
||||||
ifconfig $SWITCHDEV.3 up
|
|
||||||
/etc/init.d/network restart
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$ROUTERMAC" ]; then
|
|
||||||
if uci get network.client.macaddr
|
|
||||||
then
|
|
||||||
echo "MAC for client is set already"
|
|
||||||
else
|
|
||||||
echo "Fixing MAC on br-client"
|
|
||||||
sleep 10
|
|
||||||
|
|
||||||
uci set network.client.macaddr=$ROUTERMAC
|
|
||||||
uci commit network
|
|
||||||
|
|
||||||
ifconfig br-client down
|
|
||||||
ifconfig br-client hw ether $ROUTERMAC
|
|
||||||
ifconfig br-client up
|
|
||||||
/etc/init.d/network restart
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$ETH0MAC" ]; then
|
if [ -n "$ETH0MAC" ]; then
|
||||||
|
@ -216,44 +112,6 @@ if [ -n "$ETH0MAC" ]; then
|
||||||
NEW_MACADDR=$(cat "/sys/class/net/${ETH0MAC}/address")
|
NEW_MACADDR=$(cat "/sys/class/net/${ETH0MAC}/address")
|
||||||
uci set network.$ETH0DEV.macaddr=$NEW_MACADDR
|
uci set network.$ETH0DEV.macaddr=$NEW_MACADDR
|
||||||
uci commit network
|
uci commit network
|
||||||
ifconfig $ETH0DEV down
|
|
||||||
ifconfig $ETH0DEV hw ether $NEW_MACADDR
|
|
||||||
ifconfig $ETH0DEV up
|
|
||||||
/etc/init.d/network restart
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if uci -q get "network.client.ip6addr" > /dev/null
|
reload_config
|
||||||
then
|
|
||||||
echo "IPv6 for client is set already"
|
|
||||||
else
|
|
||||||
echo "Setting IPv6 addresses"
|
|
||||||
# Some time needed :(
|
|
||||||
sleep 5
|
|
||||||
|
|
||||||
for ip in $(ip -6 addr show br-client | awk '/fdff/{ print $2 }'); do
|
|
||||||
ip -6 addr del $ip dev br-client
|
|
||||||
done
|
|
||||||
|
|
||||||
prefix="fdff::/64"
|
|
||||||
# Set $prefix::MAC as IP
|
|
||||||
addr=$(owipcalc "$prefix" add "::$(ipMacSuffix "$ROUTERMAC")")
|
|
||||||
ip -6 addr add $addr dev br-client
|
|
||||||
|
|
||||||
uci -q set network.globals.ula_prefix=$prefix
|
|
||||||
uci -q add_list network.client.ip6addr=$addr
|
|
||||||
uci -q set network.client.proto=static
|
|
||||||
|
|
||||||
# Set $prefix::1 as IP
|
|
||||||
addr=$(owipcalc "$prefix" add ::1)
|
|
||||||
ip -6 addr add $addr dev br-client
|
|
||||||
uci -q add_list network.client.ip6addr=$addr
|
|
||||||
|
|
||||||
# Set $prefix::link-local as IP
|
|
||||||
addr=$(owipcalc "$prefix" add "::$(ipEUISuffix "$ROUTERMAC")")
|
|
||||||
ip -6 addr add $addr dev br-client
|
|
||||||
uci -q add_list network.client.ip6addr=$addr
|
|
||||||
|
|
||||||
uci -q commit network
|
|
||||||
|
|
||||||
[ -s /etc/init.d/fff-uradvd ] && /etc/init.d/fff-uradvd restart
|
|
||||||
fi
|
|
||||||
|
|
|
@ -2,12 +2,8 @@
|
||||||
|
|
||||||
WANDEV=eth1
|
WANDEV=eth1
|
||||||
SWITCHDEV=eth0
|
SWITCHDEV=eth0
|
||||||
WAN_PORTS=
|
TWO_PORT=YES
|
||||||
BATMAN_PORTS="0t"
|
|
||||||
CLIENT_PORTS="0t"
|
|
||||||
|
|
||||||
ETHMESHMAC="$(macFlipLocalBit $(cat /sys/class/net/eth0/address))"
|
ETHMESHMAC="$(macFlipLocalBit $(cat /sys/class/net/eth0/address))"
|
||||||
|
|
||||||
. /etc/network.mode
|
. /etc/network.mode
|
||||||
|
|
||||||
ETHPORT=1
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
ETHMODE="CLIENT"
|
|
@ -0,0 +1,7 @@
|
||||||
|
WANDEV=eth0
|
||||||
|
SWITCHDEV=eth0
|
||||||
|
ONE_PORT="YES"
|
||||||
|
|
||||||
|
. /etc/network.mode
|
||||||
|
|
||||||
|
ROUTERMAC=$(cat /sys/class/net/eth0/address)
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-node
|
PKG_NAME:=fff-node
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ define Package/fff-node
|
||||||
URL:=https://www.freifunk-franken.de
|
URL:=https://www.freifunk-franken.de
|
||||||
DEPENDS:=+fff-batman-adv \
|
DEPENDS:=+fff-batman-adv \
|
||||||
+fff-fastd \
|
+fff-fastd \
|
||||||
|
+fff-vxlan-node-vpn \
|
||||||
+fff-firewall \
|
+fff-firewall \
|
||||||
+fff-hoods \
|
+fff-hoods \
|
||||||
+fff-uradvd
|
+fff-uradvd
|
||||||
|
|
|
@ -74,8 +74,12 @@ if [ -x /usr/bin/fastd ]; then
|
||||||
SYSTEM_DATA="$SYSTEM_DATA<fastd_version>$(/usr/bin/fastd -v | awk '{ print $2 }')</fastd_version>"
|
SYSTEM_DATA="$SYSTEM_DATA<fastd_version>$(/usr/bin/fastd -v | awk '{ print $2 }')</fastd_version>"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -x /usr/sbin/babeld ]; then
|
if [ -e /lib/functions/fff/babel ]; then
|
||||||
SYSTEM_DATA="$SYSTEM_DATA<babel_version>$(/usr/sbin/babeld -V 2>&1)</babel_version>"
|
. /lib/functions/fff/babel
|
||||||
|
babel_version=$(babel_get_version)
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
SYSTEM_DATA="$SYSTEM_DATA<babel_version>$babel_version</babel_version>"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# example for /etc/openwrt_release:
|
# example for /etc/openwrt_release:
|
||||||
|
@ -112,6 +116,7 @@ fi
|
||||||
# Checks if fastd is running
|
# Checks if fastd is running
|
||||||
vpn_active=0
|
vpn_active=0
|
||||||
pidof fastd >/dev/null && vpn_active=1
|
pidof fastd >/dev/null && vpn_active=1
|
||||||
|
bridge fdb show brport vxlan0 state permanent &>/dev/null && vpn_active=1
|
||||||
SYSTEM_DATA="$SYSTEM_DATA<vpn_active>$vpn_active</vpn_active>"
|
SYSTEM_DATA="$SYSTEM_DATA<vpn_active>$vpn_active</vpn_active>"
|
||||||
|
|
||||||
echo -n "<system_data>$SYSTEM_DATA</system_data>"
|
echo -n "<system_data>$SYSTEM_DATA</system_data>"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-ra
|
PKG_NAME:=fff-ra
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,13 @@ uci batch <<EOF
|
||||||
set dhcp.client.ra='server'
|
set dhcp.client.ra='server'
|
||||||
set dhcp.client.ra_default='2'
|
set dhcp.client.ra_default='2'
|
||||||
set dhcp.client.ra_management='0'
|
set dhcp.client.ra_management='0'
|
||||||
|
set dhcp.client.ra_useleasetime='1'
|
||||||
|
|
||||||
|
# Work around unexpected behavior of odhcpd (see #238).
|
||||||
|
#
|
||||||
|
# This value has to be less then or equal to
|
||||||
|
# dhcp.client.leasetime (set in fff-dhcp).
|
||||||
|
set dhcp.client.preferred_lifetime='1h'
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-random
|
PKG_NAME:=fff-random
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-simple-tc
|
PKG_NAME:=fff-simple-tc
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-support
|
PKG_NAME:=fff-support
|
||||||
PKG_RELEASE:=9
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -221,7 +221,7 @@ if swconfig list | grep -q switch0 ; then
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "-> PORT ASSIGNMENT"
|
echo "-> PORT ASSIGNMENT"
|
||||||
if grep -q "ONE_PORT" "/etc/network.$board_name" || grep -q "ETHPORT" "/etc/network.$board_name" ; then
|
if grep -q "ONE_PORT" "/etc/network.$board_name" ; then
|
||||||
# Device has a port set by $ETHMODE
|
# Device has a port set by $ETHMODE
|
||||||
. /etc/network.mode
|
. /etc/network.mode
|
||||||
. /etc/network.config
|
. /etc/network.config
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-sysupgrade
|
PKG_NAME:=fff-sysupgrade
|
||||||
PKG_RELEASE:=13
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-timeserver
|
PKG_NAME:=fff-timeserver
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-uradvd
|
PKG_NAME:=fff-uradvd
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -11,10 +11,16 @@ URADVD_BIN=/usr/sbin/uradvd
|
||||||
|
|
||||||
service_triggers()
|
service_triggers()
|
||||||
{
|
{
|
||||||
procd_add_reload_trigger "fff-uradvd"
|
procd_add_reload_trigger "fff-uradvd" "network"
|
||||||
}
|
}
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
procd_set_param command "$URADVD_BIN" -i br-client -p $(uci get network.globals.ula_prefix)
|
procd_set_param command "$URADVD_BIN" -i br-client -p $(uci get network.globals.ula_prefix)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reload_service()
|
||||||
|
{
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-vpn-select
|
PKG_NAME:=fff-vpn-select
|
||||||
PKG_RELEASE:=5
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -1,65 +1,47 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Usage: vpn-select <path-to-hood-file>
|
# Usage: vpn-select <path-to-hood-file>
|
||||||
|
# To add a new protocol, put a file with three functions to /usr/lib/vpn-select.d/ .
|
||||||
|
# The file must start with protocol=name. It is most important to use the same name here and in hoodfile.
|
||||||
|
# The old config can be cleared in function ${protocol}_clear(). It is called first once per installed protocol.
|
||||||
|
# The function ${protocol}_addpeer() is called for every selected peer in hoodfile.
|
||||||
|
# The function ${protocol}_start_stop() is called at the end once per installed protocol.
|
||||||
|
|
||||||
. /usr/share/libubox/jshn.sh
|
. /usr/share/libubox/jshn.sh
|
||||||
|
|
||||||
hoodfile="$1"
|
hoodfile="$1"
|
||||||
|
|
||||||
make_config() {
|
# source functions
|
||||||
# remove old config
|
for file in /usr/lib/vpn-select.d/*; do
|
||||||
rm /tmp/fastd_fff_peers/*
|
[ -f $file ] && . "$file"
|
||||||
|
supported_protocols="$supported_protocols $protocol"
|
||||||
|
done
|
||||||
|
|
||||||
# prepare
|
# clear old config
|
||||||
Index=1
|
for protocol in $supported_protocols; do
|
||||||
json_load "$(cat "$hoodfile")"
|
"${protocol}_clear"
|
||||||
json_select vpn
|
done
|
||||||
|
|
||||||
# get fastd peers
|
# configure vpn
|
||||||
while json_select "$Index" > /dev/null
|
|
||||||
do
|
|
||||||
json_get_var protocol protocol
|
|
||||||
if [ "$protocol" = "fastd" ]; then
|
|
||||||
# set up fastd
|
|
||||||
json_get_var servername name
|
|
||||||
filename="/etc/fastd/fff/peers/$servername"
|
|
||||||
echo "#name \"${servername}\";" > "$filename"
|
|
||||||
json_get_var key key
|
|
||||||
echo "key \"${key}\";" >> "$filename"
|
|
||||||
json_get_var address address
|
|
||||||
json_get_var port port
|
|
||||||
echo "remote \"${address}\" port ${port};" >> "$filename"
|
|
||||||
echo "" >> "$filename"
|
|
||||||
echo "float yes;" >> "$filename"
|
|
||||||
fi
|
|
||||||
json_select ".." # back to vpn
|
|
||||||
Index=$(( Index + 1 ))
|
|
||||||
done
|
|
||||||
json_select ".." # back to root
|
|
||||||
}
|
|
||||||
|
|
||||||
# Only do something if file is there and not empty; otherwise exit 1
|
if [ "$0" != "/usr/sbin/vpn-stop" ] ; then
|
||||||
if [ -s "$hoodfile" ]; then
|
if [ -n "$hoodfile" ] && [ -s "$hoodfile" ] ; then
|
||||||
if [ ! -d /tmp/fastd_fff_peers ]; then
|
json_load "$(cat "$hoodfile")"
|
||||||
# first run after reboot
|
json_select hood
|
||||||
mkdir /tmp/fastd_fff_peers
|
json_get_var id id
|
||||||
make_config
|
json_select ".."
|
||||||
# start fastd only if there are some peers
|
json_select vpn
|
||||||
[ "$(ls /etc/fastd/fff/peers/* 2>/dev/null)" ] && /etc/init.d/fastd start
|
json_get_keys vpn_keys
|
||||||
else
|
for key in $vpn_keys; do
|
||||||
make_config
|
json_select $key
|
||||||
/etc/init.d/fastd reload
|
json_get_var protocol protocol
|
||||||
|
"${protocol}_addpeer"
|
||||||
# fastd start/stop for various situations
|
json_select ".." # back to vpn
|
||||||
pidfile="/tmp/run/fastd.fff.pid"
|
done
|
||||||
if [ "$(ls /etc/fastd/fff/peers/* 2>/dev/null)" ]; then
|
|
||||||
([ -s "$pidfile" ] && [ -d "/proc/$(cat "$pidfile")" ]) || /etc/init.d/fastd start
|
|
||||||
else
|
|
||||||
([ -s "$pidfile" ] && [ -d "/proc/$(cat "$pidfile")" ]) && /etc/init.d/fastd stop
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
echo "vpn-select: Hood file not found or empty!"
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# start/restart/stop vpnservices
|
||||||
|
for protocol in $supported_protocols; do
|
||||||
|
"${protocol}_start_stop"
|
||||||
|
done
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
rm /tmp/fastd_fff_peers/*
|
|
||||||
/etc/init.d/fastd stop
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
vpn-select
|
|
@ -0,0 +1,29 @@
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=fff-vxlan-node-vpn
|
||||||
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/$(PKG_NAME)
|
||||||
|
SECTION:=base
|
||||||
|
CATEGORY:=Freifunk
|
||||||
|
TITLE:=Freifunk-Franken vxlan-node
|
||||||
|
URL:=http://www.freifunk-franken.de
|
||||||
|
DEPENDS:=+vxlan
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/$(PKG_NAME)/description
|
||||||
|
This is the vxlan-node-vpn package for the Freifunk Franken Firmware
|
||||||
|
This will configure and set up the VPN via vxlan
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
# nothing
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/$(PKG_NAME)/install
|
||||||
|
$(CP) ./files/* $(1)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,$(PKG_NAME)))
|
|
@ -0,0 +1,18 @@
|
||||||
|
uci batch <<EOF
|
||||||
|
set network.vxlan0=interface
|
||||||
|
set network.vxlan0.proto=vxlan6
|
||||||
|
set network.vxlan0.port=8472
|
||||||
|
set network.vxlan0.ip6addr=auto
|
||||||
|
set network.vxlan0.srcportmin=8472
|
||||||
|
set network.vxlan0.srcportmax=8473
|
||||||
|
set network.vxlan0.ageing=30
|
||||||
|
set network.vxlan0.mtu=1422
|
||||||
|
set network.vxlan0.vid=0
|
||||||
|
set network.vxlan0.disabled=1
|
||||||
|
|
||||||
|
set network.vxbat=interface
|
||||||
|
set network.vxbat.proto=batadv_hardif
|
||||||
|
set network.vxbat.master=bat0
|
||||||
|
set network.vxbat.ifname=vxlan0
|
||||||
|
set network.vxbat.disabled=1
|
||||||
|
EOF
|
|
@ -0,0 +1,24 @@
|
||||||
|
protocol=vxlan
|
||||||
|
|
||||||
|
vxlan_clear() {
|
||||||
|
while uci -q delete network.@vxlan_peer[0]; do :; done
|
||||||
|
uci set network.vxlan0.vid="0"
|
||||||
|
uci set network.vxlan0.disabled="1"
|
||||||
|
uci set network.vxbat.disabled="1"
|
||||||
|
}
|
||||||
|
|
||||||
|
vxlan_addpeer() {
|
||||||
|
json_get_var address address
|
||||||
|
address=$(ping6 -w1 -c1 "$address" | awk '/from/ {print substr($4, 1, length($4)-1); exit}')
|
||||||
|
[ -z $address ] && return ## address not reachable
|
||||||
|
uci set network.vxlan0.vid="$id"
|
||||||
|
uci set network.vxlan0.disabled="0"
|
||||||
|
uci set network.vxbat.disabled="0"
|
||||||
|
uci add network vxlan_peer
|
||||||
|
uci set network.@vxlan_peer[-1].vxlan="vxlan0"
|
||||||
|
uci set network.@vxlan_peer[-1].dst="$address"
|
||||||
|
}
|
||||||
|
|
||||||
|
vxlan_start_stop() {
|
||||||
|
reload_config
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-web-hood
|
PKG_NAME:=fff-web-hood
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-web-mqtt
|
PKG_NAME:=fff-web-mqtt
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-web-ui
|
PKG_NAME:=fff-web-ui
|
||||||
PKG_RELEASE:=18
|
PKG_RELEASE:=$(shell echo -n $$(( $(COMMITCOUNT) + 20 )))
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -59,15 +59,74 @@ fi
|
||||||
<tr><th>Name:</th><td><%= ${HOSTNAME} %></td></tr>
|
<tr><th>Name:</th><td><%= ${HOSTNAME} %></td></tr>
|
||||||
<tr><th>Modell:</th><td><% cat /tmp/sysinfo/model 2>/dev/null %></td></tr>
|
<tr><th>Modell:</th><td><% cat /tmp/sysinfo/model 2>/dev/null %></td></tr>
|
||||||
<tr><th>MAC-Adresse:</th><td><%= $(cat /sys/class/net/br-client/address) %></td></tr>
|
<tr><th>MAC-Adresse:</th><td><%= $(cat /sys/class/net/br-client/address) %></td></tr>
|
||||||
<tr><th>Bekannte Knoten:</th><td><%= $(($(batctl tg -H | cut -b 40-56 | sort | uniq | wc -l 2>/dev/null)+1)) %></td></tr>
|
|
||||||
<tr><th>Nachbarknoten:</th><td><%= $(batctl o -H | cut -b 40-56 | sort | uniq | wc -l 2>/dev/null) %></td></tr>
|
|
||||||
<tr><th>VPN via fastd:</th><td><%= ${vpn_active} %></td></tr>
|
|
||||||
<tr><th>fastd public key:</th><td><%= ${fastd_pub} %></td></tr>
|
|
||||||
<tr><th>Laufzeit:</th><td><%= ${uptime} %></td></tr>
|
<tr><th>Laufzeit:</th><td><%= ${uptime} %></td></tr>
|
||||||
<tr><th>Auslastung:</th><td><%= ${load} %></td></tr>
|
<tr><th>Auslastung:</th><td><%= ${load} %></td></tr>
|
||||||
<tr><th>Uhrzeit:</th><td><% date %></td></tr>
|
<tr><th>Uhrzeit:</th><td><% date %></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
<fieldset style="padding-bottom:12px">
|
||||||
|
<legend>VPN</legend>
|
||||||
|
<table>
|
||||||
|
<% if [ -f "$(command -v fastd)" ] ; then %>
|
||||||
|
<tr><th>VPN via fastd:</th><td><%= ${vpn_active} %></td></tr>
|
||||||
|
<tr><th>fastd public key:</th><td><%= ${fastd_pub} %></td></tr>
|
||||||
|
<% fi %>
|
||||||
|
<% if [ -f "$(command -v wg)" ] ; then %>
|
||||||
|
<tr><td>
|
||||||
|
<table border="1">
|
||||||
|
<tr><th style="text-align:center">Interfacename</th><th style="text-align:center">Endpoint</th><th style="text-align:center">Handshake</th><th style="text-align:center">Daten</th></tr>
|
||||||
|
<% for f in $(wg | grep interface | cut -d ":" -f 2 | sed 's/^ //'); do
|
||||||
|
endpoint="$(wg show $f | grep endpoint)"
|
||||||
|
handshake="$(wg show $f | grep handshake)"
|
||||||
|
transfer="$(wg show $f | grep transfer)"
|
||||||
|
echo "<tr><td style="text-align:center">"$f"</td>"
|
||||||
|
echo "<td style="text-align:center">"${endpoint#*:}"</td>"
|
||||||
|
echo "<td style="text-align:center">"${handshake#*:}"</td>"
|
||||||
|
echo "<td style="text-align:center">"${transfer#*:}"</td>"
|
||||||
|
done %>
|
||||||
|
</table>
|
||||||
|
</td></tr>
|
||||||
|
<% fi %>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
<fieldset style="padding-bottom:12px">
|
||||||
|
<legend>Routing</legend>
|
||||||
|
<table>
|
||||||
|
<% if [ -f "$(command -v batctl)" ] ; then %>
|
||||||
|
<tr><th>Bekannte Knoten:</th><td><%= $(($(batctl tg -H | cut -b 40-56 | sort | uniq | wc -l 2>/dev/null)+1)) %></td></tr>
|
||||||
|
<tr><th>Nachbarknoten:</th><td><%= $(batctl o -H | cut -b 40-56 | sort | uniq | wc -l 2>/dev/null) %></td></tr>
|
||||||
|
<% fi %>
|
||||||
|
<% if birdc show status >/dev/null 2>&1 || pgrep babeld >/dev/null; then %>
|
||||||
|
<tr><td><table border="1">
|
||||||
|
<tr><th style="text-align:center">IP</th><th style="text-align:center">Interface</th><th style="text-align:center">Kosten</th></tr>
|
||||||
|
<% if birdc show status >/dev/null 2>&1; then
|
||||||
|
neighbours="$(birdc -r show babel neighbors | tail -n +5 | awk '{ printf "<tr><td>%s</td><td>%s</td><td>%s</td></tr>", $1, $2, $3 }')"
|
||||||
|
fi
|
||||||
|
if
|
||||||
|
pgrep babeld >/dev/null; then
|
||||||
|
lockfile="/tmp/fff-web-ui.babel.lock"
|
||||||
|
if [ -e $lockfile ] && [ 30 -gt $(( $(date +%s) - $(date -r $lockfile +%s) )) ] ; then
|
||||||
|
neighbours=$(cat /tmp/fff-web-ui.babel)
|
||||||
|
else
|
||||||
|
neighbours="$(echo dump | nc ::1 33123 | grep '^add neighbour' |
|
||||||
|
awk '{
|
||||||
|
for (i=2; i < NF; i += 2) {
|
||||||
|
vars[$i] = $(i+1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
printf "<tr><td style="text-align:center">%s</td><td style="text-align:center">%s</td><td style="text-align:center">%s</td></tr>", vars["address"], vars["if"], vars["cost"]
|
||||||
|
}')"
|
||||||
|
echo "$neighbours" > /tmp/fff-web-ui.babel
|
||||||
|
touch $lockfile
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo -n "$neighbours"
|
||||||
|
%>
|
||||||
|
</table></td></tr>
|
||||||
|
<% fi %>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
<fieldset style="padding-bottom:12px">
|
<fieldset style="padding-bottom:12px">
|
||||||
<legend>Netz: Freifunk</legend>
|
<legend>Netz: Freifunk</legend>
|
||||||
<table>
|
<table>
|
||||||
|
@ -85,23 +144,36 @@ fi
|
||||||
<tr><th>Firmware Version:</th><td><%= ${FIRMWARE_VERSION} %></td></tr>
|
<tr><th>Firmware Version:</th><td><%= ${FIRMWARE_VERSION} %></td></tr>
|
||||||
<tr><th>OpenWrt Version:</th><td><%= ${DISTRIB_DESCRIPTION} %></td></tr>
|
<tr><th>OpenWrt Version:</th><td><%= ${DISTRIB_DESCRIPTION} %></td></tr>
|
||||||
<tr><th>Kernel Version:</th><td><% uname -s -m -r %></td></tr>
|
<tr><th>Kernel Version:</th><td><% uname -s -m -r %></td></tr>
|
||||||
<tr><th>Batman-Adv Version:</th><td><% cat /sys/module/batman_adv/version 2>/dev/null %></td></tr>
|
<% if [ -e /sys/module/batman_adv/version ] ; then %>
|
||||||
<tr><th>Fastd Version:</th><td><% fastd --version 2> /dev/null | cut -d' ' -f 2 %></td></tr>
|
<tr><th>Batman-Adv Version:</th><td><% cat /sys/module/batman_adv/version 2>/dev/null %></td></tr>
|
||||||
|
<% fi
|
||||||
|
if [ -f "$(command -v fastd)" ] ; then %>
|
||||||
|
<tr><th>Fastd Version:</th><td><% fastd --version 2> /dev/null | cut -d' ' -f 2 %></td></tr>
|
||||||
|
<% fi
|
||||||
|
if [ -e /lib/functions/fff/babel ]; then
|
||||||
|
. /lib/functions/fff/babel
|
||||||
|
babel_version=$(babel_get_version)
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "<tr><th>Aktivierte Babel Version</th><td>"$babel_version"</td></tr>"
|
||||||
|
fi
|
||||||
|
fi %>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<fieldset style="padding-bottom:12px">
|
<% if [ -e /usr/lib/functions/fff/hoodfile ]; then %>
|
||||||
<legend>Hood</legend>
|
<fieldset style="padding-bottom:12px">
|
||||||
<table>
|
<legend>Hood</legend>
|
||||||
<tr><th style="width:200px">Hood:</th><td><% echo "$hood" %></td></tr>
|
<table>
|
||||||
<tr><th style="width:200px">Mesh-Type (2.4/5 GHz):</th><td><% echo "${mesh_type2} / ${mesh_type5}" %></td></tr>
|
<tr><th style="width:200px">Hood:</th><td><% echo "$hood" %></td></tr>
|
||||||
<tr><th style="width:200px">Channel (2.4/5 GHz):</th><td>Gerät: <% echo "${real_chan2ghz} / ${real_chan5ghz}" %> | Hood: <% echo "${chan2ghz} / ${chan5ghz}" %></td></tr>
|
<tr><th style="width:200px">Mesh-Type (2.4/5 GHz):</th><td><% echo "${mesh_type2} / ${mesh_type5}" %></td></tr>
|
||||||
<tr><th style="width:200px">SSID (Client-AP):</th><td>Gerät: <% echo "${real_essid}" %> | Hood: <% echo "${essid}" %></td></tr>
|
<tr><th style="width:200px">Channel (2.4/5 GHz):</th><td>Gerät: <% echo "${real_chan2ghz} / ${real_chan5ghz}" %> | Hood: <% echo "${chan2ghz} / ${chan5ghz}" %></td></tr>
|
||||||
<tr><td colspan="2"> </td></tr>
|
<tr><th style="width:200px">SSID (Client-AP):</th><td>Gerät: <% echo "${real_essid}" %> | Hood: <% echo "${essid}" %></td></tr>
|
||||||
<tr><td colspan="2">Beim Klicken werden die Hood-Daten innerhalb von 5 Minuten neu abgerufen und angewandt:</td></tr>
|
<tr><td colspan="2"> </td></tr>
|
||||||
<tr><td colspan="2"><input type="submit" name="resethood" value="Reset hood data" /></td></tr>
|
<tr><td colspan="2">Beim Klicken werden die Hood-Daten innerhalb von 5 Minuten neu abgerufen und angewandt:</td></tr>
|
||||||
</table>
|
<tr><td colspan="2"><input type="submit" name="resethood" value="Reset hood data" /></td></tr>
|
||||||
</fieldset>
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
<% fi %>
|
||||||
</form>
|
</form>
|
||||||
<fieldset style="padding-bottom:12px">
|
<fieldset style="padding-bottom:12px">
|
||||||
<legend>Netz: WAN</legend>
|
<legend>Netz: WAN</legend>
|
||||||
|
|
|
@ -151,7 +151,7 @@ format_port() {
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<% fi %>
|
<% fi %>
|
||||||
<% if grep -q "ONE_PORT" "/etc/network.$board_name" || grep -q "ETHPORT" "/etc/network.$board_name" ; then %>
|
<% if grep -q "ONE_PORT" "/etc/network.$board_name" ; then %>
|
||||||
<%
|
<%
|
||||||
# Device has a port set by $ETHMODE
|
# Device has a port set by $ETHMODE
|
||||||
. /etc/network.mode
|
. /etc/network.mode
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-wireguard
|
PKG_NAME:=fff-wireguard
|
||||||
PKG_RELEASE:=8
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ define Package/fff-wireguard
|
||||||
+kmod-wireguard \
|
+kmod-wireguard \
|
||||||
+owipcalc \
|
+owipcalc \
|
||||||
+wireguard-tools \
|
+wireguard-tools \
|
||||||
+fff-babeld \
|
+fff-babel \
|
||||||
+fff-network
|
+fff-network
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ configure() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
config_load babeld
|
config_load network
|
||||||
config_foreach remove_wgpeer interface
|
config_foreach remove_wgpeer interface
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ configure() {
|
||||||
babel_add_iifrules "$prefixname" || { echo "ERROR: Could not add iif-rules for wgpeer $name"; exit 1; }
|
babel_add_iifrules "$prefixname" || { echo "ERROR: Could not add iif-rules for wgpeer $name"; exit 1; }
|
||||||
|
|
||||||
# add babel interface
|
# add babel interface
|
||||||
babel_add_interface "$prefixname" "$prefixname" 'wired' "$rxcost" || { echo "ERROR: Could not add babeld interface for wgpeer $name"; exit 1; }
|
babel_add_interface "$prefixname" "$prefixname" 'wired' "$rxcost" || { echo "ERROR: Could not add babel interface for wgpeer $name"; exit 1; }
|
||||||
}
|
}
|
||||||
|
|
||||||
config_load gateway
|
config_load gateway
|
||||||
|
@ -137,12 +137,16 @@ configure() {
|
||||||
|
|
||||||
apply() {
|
apply() {
|
||||||
uci commit network
|
uci commit network
|
||||||
uci commit babeld
|
|
||||||
uci commit gateway
|
uci commit gateway
|
||||||
|
babel_apply
|
||||||
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
babel_reload
|
||||||
}
|
}
|
||||||
|
|
||||||
revert() {
|
revert() {
|
||||||
uci revert network
|
uci revert network
|
||||||
uci revert babeld
|
|
||||||
uci revert gateway
|
uci revert gateway
|
||||||
|
babel_revert
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fff-wireless
|
PKG_NAME:=fff-wireless
|
||||||
PKG_RELEASE:=20
|
PKG_RELEASE:=$(COMMITCOUNT)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,9 @@ wifiGetFreq() {
|
||||||
|
|
||||||
local radio=$1
|
local radio=$1
|
||||||
|
|
||||||
# Use hwmode for switching, since this is always set by firmware (effectively hard-coded)
|
# Use uci radio band for switching, since this is always set by firmware (effectively hard-coded)
|
||||||
# Do not use channel, as this might be "auto" for both
|
# Do not use channel, as this might be "auto" for both
|
||||||
[ "$(uci get "wireless.${radio}.hwmode")" = "11a" ] && echo "5" || echo "2"
|
[ "$(uci get "wireless.${radio}.band")" = "5g" ] && echo "5" || echo "2"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
# vim: set noexpandtab:tabstop=4
|
# vim: set noexpandtab:tabstop=4
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=fff
|
|
||||||
PKG_RELEASE:=9
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
define Package/fff-variant/default
|
|
||||||
SECTION:=base
|
|
||||||
CATEGORY:=Freifunk
|
|
||||||
URL:=https://www.freifunk-franken.de
|
|
||||||
DEFAULT:=$(if $(filter fff-variant-$(FFF_VARIANT),$(1)),y,n)
|
|
||||||
DEPENDS:= \
|
|
||||||
+iptables \
|
|
||||||
+ip6tables \
|
|
||||||
+micrond \
|
|
||||||
+odhcp6c \
|
|
||||||
+fff-config \
|
|
||||||
+fff-network \
|
|
||||||
+fff-nodewatcher \
|
|
||||||
+fff-simple-tc \
|
|
||||||
+fff-support \
|
|
||||||
+fff-sysupgrade \
|
|
||||||
+fff-timeserver \
|
|
||||||
+fff-web-ui \
|
|
||||||
+fff-wireless
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/fff-variant/default/description
|
|
||||||
This package is used to switch one of the variants on by default
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/fff-variant-layer3
|
|
||||||
$(Package/fff-variant/default)
|
|
||||||
TITLE:=Freifunk-Franken Layer3 Variant
|
|
||||||
DEPENDS+=+fff-layer3
|
|
||||||
VARIANT:=layer3
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/fff-variant-layer3/description
|
|
||||||
$(Package/fff-variant/default/description)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/fff-variant-node
|
|
||||||
$(Package/fff-variant/default)
|
|
||||||
TITLE:=Freifunk-Franken Node Variant
|
|
||||||
DEPENDS+=+fff-node
|
|
||||||
VARIANT:=node
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/fff-variant-node/description
|
|
||||||
$(Package/fff-variant/default/description)
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,fff-variant-layer3))
|
|
||||||
$(eval $(call BuildPackage,fff-variant-node))
|
|
Loading…
Reference in New Issue