From 211548c5233e8ac4bc42660d62da7803c0a15f1b Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 19 Jul 2020 19:34:46 +0100 Subject: [PATCH 01/11] procd: update to git HEAD 9eddf0f jail: fix hooks 1b1286b jail: parse and apply OCI sysctl values c049047 jail: implement OCI user additionalGIDs 0e1920c jail: read and apply umask from OCI if defined 1c46cc3 jail: parse and apply POSIX rlimits 76adac5 jail: /proc/$pid/oom_score_adj to OCI defined oomScoreAdj Signed-off-by: Daniel Golle --- package/system/procd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 3396d8c6cc..4153b1e50f 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2020-07-17 -PKG_SOURCE_VERSION:=268126a3b159fbd488eb56ebbd19c7384f1aa8a5 -PKG_MIRROR_HASH:=77f143f600570c26f9305a744e8cad9c799c71b7873b4cbcff3151c43d796671 +PKG_SOURCE_DATE:=2020-07-19 +PKG_SOURCE_VERSION:=76adac5ef4a0b5078a813d1a470a5408cf618d5f +PKG_MIRROR_HASH:=ba4231d23047ae25a9c9508b6e3391a85d895e3132e3053df545174086bb3d6f CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From a53bf63756ef2a266ae5f3b3507eeb7382b4cdc9 Mon Sep 17 00:00:00 2001 From: Dustin Gathmann Date: Thu, 21 May 2020 00:13:43 +0200 Subject: [PATCH 02/11] lantiq/xrx200: make WLAN button responsive on Fritzbox 3370 Pressing the 'WLAN' button should enable/disable wireless activity. However, on the Fritzbox 3370 this doesn't have an effect. This patch changes the mapping of the physical WLAN button, so a button press will emit an action for the 'rfkill' key instead of 'wlan'. Apparently, this is what stock OpenWRT expects, and also what is implemented for most other devices. Signed-off-by: Dustin Gathmann --- .../arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi | 2 +- .../arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi index bac27c3649..4c4ae1a01f 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi @@ -45,7 +45,7 @@ wifi { label = "wlan"; gpios = <&gpio 29 GPIO_ACTIVE_HIGH>; - linux,code = ; + linux,code = ; }; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi index bac27c3649..4c4ae1a01f 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi @@ -45,7 +45,7 @@ wifi { label = "wlan"; gpios = <&gpio 29 GPIO_ACTIVE_HIGH>; - linux,code = ; + linux,code = ; }; }; From 0ee30adb46a87583badd85b69e4ccd7942786374 Mon Sep 17 00:00:00 2001 From: Dustin Gathmann Date: Thu, 21 May 2020 01:22:53 +0200 Subject: [PATCH 03/11] lantiq/xrx200: fix WLAN button actions for Fritzbox 3370 The WLAN button actions are reversed, i.e. pressing the button emits a 'released' action, and vice versa. This can easily be checked by adding logger -t button_action "$BUTTON $ACTION" as the second line of /etc/rc.button/rfkill, and using logread to read the events (assuming the preceding patch has been applied). Defining the GPIO as ACTIVE_LOW corrects this behavior. Signed-off-by: Dustin Gathmann --- .../arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi | 2 +- .../arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi index 4c4ae1a01f..2c790a488e 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi @@ -44,7 +44,7 @@ wifi { label = "wlan"; - gpios = <&gpio 29 GPIO_ACTIVE_HIGH>; + gpios = <&gpio 29 GPIO_ACTIVE_LOW>; linux,code = ; }; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi index 4c4ae1a01f..2c790a488e 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi @@ -44,7 +44,7 @@ wifi { label = "wlan"; - gpios = <&gpio 29 GPIO_ACTIVE_HIGH>; + gpios = <&gpio 29 GPIO_ACTIVE_LOW>; linux,code = ; }; }; From d5a148f5c8f6d6dee7041fd348bd0f52839d0f4e Mon Sep 17 00:00:00 2001 From: Dustin Gathmann Date: Mon, 20 Jul 2020 00:07:44 +0200 Subject: [PATCH 04/11] lantiq/xrx200: make WLAN button responsive on Fritzbox 7360 & 7362 Pressing the 'WLAN' button should enable/disable wireless activity. Currently, the button is mapped to the KEY_WLAN, which will not have this effect. This patch changes the mapping of the WLAN button, so a button press will emit an action for the 'rfkill' key instead of 'wlan'. Apparently, this is what stock OpenWRT expects. This fix is analogous to the preceding patch for Fritzbox 3370. Signed-off-by: Dustin Gathmann --- .../files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi | 2 +- .../files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi index 1553d2f7f4..f12485b3e1 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi @@ -40,7 +40,7 @@ wifi { label = "wifi"; gpios = <&gpio 29 GPIO_ACTIVE_HIGH>; - linux,code = ; + linux,code = ; }; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi index 70dff97ec1..bd89e59511 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi @@ -40,7 +40,7 @@ wifi { label = "wifi"; gpios = <&gpio 29 GPIO_ACTIVE_HIGH>; - linux,code = ; + linux,code = ; }; }; From 5aedd5a110fea87ad422320934e1a167ae08307f Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 20 Jul 2020 04:36:58 +0100 Subject: [PATCH 05/11] procd: bump to git HEAD once again Further complete OCI container support in ujail: f5f305e jail: move /tmp/resolv.conf.d to /dev/resolv.conf.d 6f078ae jail: add support for defining devices 686cf7a jail: actually apply filesystem-specific mount options f91009a jail: refactor default mounts into new structure 66ae2d9 jail: re-implement /proc/sys/net read-write in netns hack Signed-off-by: Daniel Golle --- package/system/procd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 4153b1e50f..b91b5cd623 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2020-07-19 -PKG_SOURCE_VERSION:=76adac5ef4a0b5078a813d1a470a5408cf618d5f -PKG_MIRROR_HASH:=ba4231d23047ae25a9c9508b6e3391a85d895e3132e3053df545174086bb3d6f +PKG_SOURCE_DATE:=2020-07-20 +PKG_SOURCE_VERSION:=66ae2d947ea463c53de1bf2ed5491c9926694f02 +PKG_MIRROR_HASH:=c66fb1d6f89c110b59cc53595754522272a9e62aaf1970a5aea34fe528ec3dcd CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From a197fa093ce1a75d278eb421d5221730e766aec4 Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Mon, 29 Jun 2020 16:26:42 +0100 Subject: [PATCH 06/11] dnsmasq: bump to 2.82 This fixes a nasty problem introduced in 2.81 which causes random crashes on systems where there's significant DNS activity over TCP. It also fixes DNSSEC validation problems with zero-TTL DNSKEY and DS records. Signed-off-by: Kevin Darbyshire-Bryant --- package/network/services/dnsmasq/Makefile | 4 ++-- ...00-remove-old-runtime-kernel-support.patch | 22 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index ff55d8c545..22ecd12f07 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq -PKG_UPSTREAM_VERSION:=2.81 +PKG_UPSTREAM_VERSION:=2.82 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION))) PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq -PKG_HASH:=749ca903537c5197c26444ac24b0dce242cf42595fdfe6b9a5b9e4c7ad32f8fb +PKG_HASH:=84523646f3116bb5e1151efb66e645030f6e6a8256f29aab444777a343ebc132 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING diff --git a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch index 8a4e58cee7..aaa5a76909 100644 --- a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch +++ b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch @@ -14,7 +14,7 @@ Signed-off-by: Kevin Darbyshire-Bryant --- a/src/dnsmasq.c +++ b/src/dnsmasq.c -@@ -94,10 +94,6 @@ int main (int argc, char **argv) +@@ -95,10 +95,6 @@ int main (int argc, char **argv) read_opts(argc, argv, compile_opts); @@ -27,7 +27,7 @@ Signed-off-by: Kevin Darbyshire-Bryant --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1110,7 +1110,7 @@ extern struct daemon { +@@ -1112,7 +1112,7 @@ extern struct daemon { int inotifyfd; #endif #if defined(HAVE_LINUX_NETWORK) @@ -36,7 +36,7 @@ Signed-off-by: Kevin Darbyshire-Bryant #elif defined(HAVE_BSD_NETWORK) int dhcp_raw_fd, dhcp_icmp_fd, routefd; #endif -@@ -1290,9 +1290,6 @@ int read_write(int fd, unsigned char *pa +@@ -1292,9 +1292,6 @@ int read_write(int fd, unsigned char *pa void close_fds(long max_fd, int spare1, int spare2, int spare3); int wildcard_match(const char* wildcard, const char* match); int wildcard_matchn(const char* wildcard, const char* match, int num); @@ -141,16 +141,16 @@ Signed-off-by: Kevin Darbyshire-Bryant my_syslog(LOG_ERR, _("failed to update ipset %s: %s"), setname, strerror(errno)); --- a/src/netlink.c +++ b/src/netlink.c -@@ -82,8 +82,7 @@ void netlink_init(void) - } +@@ -92,8 +92,7 @@ char *netlink_init(void) + iov.iov_len = 100; + iov.iov_base = safe_malloc(iov.iov_len); - if (daemon->netlinkfd == -1 || -- (daemon->kernel_version >= KERNEL_VERSION(2,6,30) && -- setsockopt(daemon->netlinkfd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &opt, sizeof(opt)) == -1) || -+ (setsockopt(daemon->netlinkfd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &opt, sizeof(opt)) == -1) || - getsockname(daemon->netlinkfd, (struct sockaddr *)&addr, &slen) == -1) - die(_("cannot create netlink socket: %s"), NULL, EC_MISC); +- if (daemon->kernel_version >= KERNEL_VERSION(2,6,30) && +- setsockopt(daemon->netlinkfd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &opt, sizeof(opt)) == -1) ++ if (setsockopt(daemon->netlinkfd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &opt, sizeof(opt)) == -1) + return _("warning: failed to set NETLINK_NO_ENOBUFS on netlink socket"); + return NULL; --- a/src/util.c +++ b/src/util.c @@ -786,22 +786,3 @@ int wildcard_matchn(const char* wildcard From 4a2380a1e778a8f8e0bfb0a00f2996ed0aab58d8 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Wed, 8 Jul 2020 11:08:17 +0200 Subject: [PATCH 07/11] tplink-safeloader: expand support list for TP-Link CPE210 v3 This adds new strings to the support list for the TP-Link CPE210 v3 that are supposed to work with the existing setup. Without it, the factory image won't be accepted by the vendor UI on these newer revisions. Tested on a CPE210 v3.20 (EU). Ref: https://forum.openwrt.org/t/build-for-cpe210-v3-20/68000 Signed-off-by: Adrian Schmutzler --- tools/firmware-utils/src/tplink-safeloader.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 6cd2a45247..3f83f19d2d 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -204,8 +204,15 @@ static struct device_info boards[] = { "SupportList:\r\n" "CPE210(TP-LINK|EU|N300-2|45550000):3.0\r\n" "CPE210(TP-LINK|UN|N300-2|00000000):3.0\r\n" + "CPE210(TP-LINK|US|N300-2|55530000):3.0\r\n" "CPE210(TP-LINK|UN|N300-2):3.0\r\n" - "CPE210(TP-LINK|EU|N300-2):3.0\r\n", + "CPE210(TP-LINK|EU|N300-2):3.0\r\n" + "CPE210(TP-LINK|EU|N300-2|45550000):3.1\r\n" + "CPE210(TP-LINK|UN|N300-2|00000000):3.1\r\n" + "CPE210(TP-LINK|US|N300-2|55530000):3.1\r\n" + "CPE210(TP-LINK|EU|N300-2|45550000):3.20\r\n" + "CPE210(TP-LINK|UN|N300-2|00000000):3.20\r\n" + "CPE210(TP-LINK|US|N300-2|55530000):3.20\r\n", .support_trail = '\xff', .soft_ver = NULL, From 5222aadbf353b7cc030c39aa816f33951b104552 Mon Sep 17 00:00:00 2001 From: Johannes Kimmel Date: Mon, 20 Jul 2020 08:05:09 +0200 Subject: [PATCH 08/11] vxlan: remove mandatory peeraddr vxlan can be configured without a peer address. This is used to prepare an interface and add peers later. Fixes: FS#2743 Signed-off-by: Johannes Kimmel Acked-by: Matthias Schiffer --- package/network/config/vxlan/files/vxlan.sh | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/package/network/config/vxlan/files/vxlan.sh b/package/network/config/vxlan/files/vxlan.sh index 7b1c703955..bdcaa628c4 100755 --- a/package/network/config/vxlan/files/vxlan.sh +++ b/package/network/config/vxlan/files/vxlan.sh @@ -55,12 +55,6 @@ proto_vxlan_setup() { local ipaddr peeraddr json_get_vars ipaddr peeraddr tunlink - [ -z "$peeraddr" ] && { - proto_notify_error "$cfg" "MISSING_ADDRESS" - proto_block_restart "$cfg" - exit - } - ( proto_add_host_dependency "$cfg" '' "$tunlink" ) [ -z "$ipaddr" ] && { @@ -85,12 +79,6 @@ proto_vxlan6_setup() { local ip6addr peer6addr json_get_vars ip6addr peer6addr tunlink - [ -z "$peer6addr" ] && { - proto_notify_error "$cfg" "MISSING_ADDRESS" - proto_block_restart "$cfg" - exit - } - ( proto_add_host_dependency "$cfg" '' "$tunlink" ) [ -z "$ip6addr" ] && { From 65e9de3c333bae1ccef1dfb0cc008ad6f13958e4 Mon Sep 17 00:00:00 2001 From: Johannes Kimmel Date: Mon, 20 Jul 2020 08:05:10 +0200 Subject: [PATCH 09/11] vxlan: add capability for multiple fdb entries Similar to wireguard, vxlan can configure multiple peers or add specific entries to the fdb for a single mac address. While you can still use peeraddr/peer6addr option within the proto vxlan/vxlan6 section to not break existing configurations, this patch allows to add multiple sections that conigure fdb entries via the bridge command. As such, the bridge command is now a dependency of the vxlan package. (To be honest without the bridge command available, vxlan isn't very much fun to use or debug at all) Field names are taken direclty from the bridge command. Example with all supported parameters, since this hasn't been documented so far: config interface 'vx0' option proto 'vxlan6' # use vxlan over ipv6 # main options option ip6addr '2001:db8::1' # listen address option tunlink 'wan6' # optional if listen address given option peer6addr '2001:db8::2' # now optional option port '8472' # this is the standard port under linux option vid '42' # VXLAN Network Identifier to use option mtu '1430' # vxlan6 has 70 bytes overhead # extra options option rxcsum '0' # allow receiving packets without checksum option txcsum '0' # send packets without checksum option ttl '16' # specifies the TTL value for outgoing packets option tos '0' # specifies the TOS value for outgoing packets option macaddr '11:22:33:44:55:66' # optional, manually specify mac # default is a random address Single peer with head-end replication. Corresponds to the following call to bridge: $ bridge fdb append 00:00:00:00:00:00 dev vx0 dst 2001:db8::3 config vxlan_peer option vxlan 'vx0' option dst '2001:db8::3' # always required For multiple peers, this section can be repeated for each dst address. It's possible to specify a multicast address as destination. Useful when multicast routing is available or within one lan segment: config vxlan_peer option vxlan 'vx0' option dst 'ff02::1337' # multicast group to join. # all bum traffic will be send there option via 'eth1' # for multicast, an outgoing interface needs # to be specified All available peer options for completeness: config vxlan_peer option vxlan 'vx0' # the interface to configure option lladdr 'aa:bb:cc:dd:ee:ff' # specific mac, option dst '2001:db8::4' # connected to this peer option via 'eth0.1' # use this interface only option port '4789' # use different port for this peer option vni '23' # override vni for this peer option src_vni '123' # see man 3 bridge Signed-off-by: Johannes Kimmel --- package/network/config/vxlan/Makefile | 2 +- package/network/config/vxlan/files/vxlan.sh | 48 ++++++++++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/package/network/config/vxlan/Makefile b/package/network/config/vxlan/Makefile index 13fcf0c55d..7232f71b45 100644 --- a/package/network/config/vxlan/Makefile +++ b/package/network/config/vxlan/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vxlan -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/config/vxlan/files/vxlan.sh b/package/network/config/vxlan/files/vxlan.sh index bdcaa628c4..d063c47d47 100755 --- a/package/network/config/vxlan/files/vxlan.sh +++ b/package/network/config/vxlan/files/vxlan.sh @@ -7,6 +7,50 @@ init_proto "$@" } +proto_vxlan_setup_peer() { + type bridge &> /dev/null || { + proto_notify_error "$cfg" "MISSING_BRIDGE_COMMAND" + exit + } + + local peer_config="$1" + + local vxlan + local lladdr + local dst + local src_vni + local vni + local port + local via + + config_get vxlan "${peer_config}" "vxlan" + config_get lladdr "${peer_config}" "lladdr" + config_get dst "${peer_config}" "dst" + config_get src_vni "${peer_config}" "src_vni" + config_get vni "${peer_config}" "vni" + config_get port "${peer_config}" "port" + config_get via "${peer_config}" "via" + + [ "$cfg" = "$vxlan" ] || { + # This peer section belongs to another device + return + } + + [ -n "${dst}" ] || { + proto_notify_error "$cfg" "MISSING_PEER_ADDRESS" + exit + } + + bridge fdb append \ + ${lladdr:-00:00:00:00:00:00} \ + dev ${cfg} \ + dst ${dst} \ + ${src_vni:+src_vni $src_vni} \ + ${vni:+vni $vni} \ + ${port:+port $port} \ + ${via:+via $via} +} + vxlan_generic_setup() { local cfg="$1" local mode="$2" @@ -18,7 +62,6 @@ vxlan_generic_setup() { local port vid ttl tos mtu macaddr zone rxcsum txcsum json_get_vars port vid ttl tos mtu macaddr zone rxcsum txcsum - proto_init_update "$link" 1 proto_add_tunnel @@ -47,6 +90,9 @@ vxlan_generic_setup() { proto_close_data proto_send_update "$cfg" + + config_load network + config_foreach proto_vxlan_setup_peer "vxlan_peer" } proto_vxlan_setup() { From cfd2f3bf6f4825b66e9a4ca9cba7c65b93eb89c7 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 20 Jul 2020 15:07:47 +0200 Subject: [PATCH 10/11] mac80211: create channel list for fixed channel operation Currently a device which has a DFS channel selected using the UCI channel setting might switch to a non-DFS channel in case no chanlist is provided (UCI setting "channels") when the radio detects a DFS event. Automatically add a chanlist consisting of the configured channel when the device does not operate in auto-channel mode and no chanlist set to circumvent this issue. Signed-off-by: David Bauer --- package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index a131992f26..5214704830 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -110,6 +110,9 @@ mac80211_hostapd_setup_base() { json_get_values ht_capab_list ht_capab tx_burst json_get_values channel_list channels + [ "$auto_channel" = 0 ] && [ -z "$channel_list" ] && \ + channel_list="$channel" + set_default noscan 0 [ "$noscan" -gt 0 ] && hostapd_noscan=1 From 93bbd998aa696a5e9cff51131854b78b30c0af34 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 20 Jul 2020 15:08:19 +0200 Subject: [PATCH 11/11] hostapd: enter DFS state if no available channel is found Previously hostapd would not stop transmitting when a DFS event was detected and no available channel to switch to was available. Disable and re-enable the interface to enter DFS state. This way, TX does not happen until the kernel notifies hostapd about the NOP expiring. Signed-off-by: David Bauer --- ...ate-if-no-available-channel-is-found.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 package/network/services/hostapd/patches/800-dfs-enter-DFS-state-if-no-available-channel-is-found.patch diff --git a/package/network/services/hostapd/patches/800-dfs-enter-DFS-state-if-no-available-channel-is-found.patch b/package/network/services/hostapd/patches/800-dfs-enter-DFS-state-if-no-available-channel-is-found.patch new file mode 100644 index 0000000000..e2db99eeed --- /dev/null +++ b/package/network/services/hostapd/patches/800-dfs-enter-DFS-state-if-no-available-channel-is-found.patch @@ -0,0 +1,37 @@ +From cefc52e6b93731c713f1bba1cb5e7e92105b758b Mon Sep 17 00:00:00 2001 +From: David Bauer +Date: Fri, 3 Jul 2020 23:00:34 +0200 +Subject: [PATCH] dfs: enter DFS state if no available channel is found + +Previously hostapd would not stop transmitting when a DFS event was +detected and no available channel to switch to was available. + +Disable and re-enable the interface to enter DFS state. This way, TX +does not happen until the kernel notifies hostapd about the NOP +expiring. + +Signed-off-by: David Bauer +--- + src/ap/dfs.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +--- a/src/ap/dfs.c ++++ b/src/ap/dfs.c +@@ -1066,8 +1066,15 @@ static int hostapd_dfs_start_channel_swi + &oper_centr_freq_seg0_idx, + &oper_centr_freq_seg1_idx, + &skip_radar); +- if (!channel) +- return err; ++ if (!channel) { ++ /* ++ * Toggle interface state to enter DFS state ++ * until NOP is finished. ++ */ ++ hostapd_disable_iface(iface); ++ hostapd_enable_iface(iface); ++ return 0; ++ } + if (!skip_radar) { + iface->freq = channel->freq; + iface->conf->channel = channel->chan;