diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 5159a9ae4c..9d79f96f6d 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 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 7b1c703955..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() { @@ -55,12 +101,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 +125,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" ] && { 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 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; diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 3396d8c6cc..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-17 -PKG_SOURCE_VERSION:=268126a3b159fbd488eb56ebbd19c7384f1aa8a5 -PKG_MIRROR_HASH:=77f143f600570c26f9305a744e8cad9c799c71b7873b4cbcff3151c43d796671 +PKG_SOURCE_DATE:=2020-07-20 +PKG_SOURCE_VERSION:=66ae2d947ea463c53de1bf2ed5491c9926694f02 +PKG_MIRROR_HASH:=c66fb1d6f89c110b59cc53595754522272a9e62aaf1970a5aea34fe528ec3dcd CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 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..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,8 +44,8 @@ wifi { label = "wlan"; - gpios = <&gpio 29 GPIO_ACTIVE_HIGH>; - linux,code = ; + gpios = <&gpio 29 GPIO_ACTIVE_LOW>; + linux,code = ; }; }; 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_fritz3370-rev2.dtsi b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi index bac27c3649..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,8 +44,8 @@ wifi { label = "wlan"; - gpios = <&gpio 29 GPIO_ACTIVE_HIGH>; - linux,code = ; + gpios = <&gpio 29 GPIO_ACTIVE_LOW>; + 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 = ; }; }; 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,