Re: [OpenWrt-Devel] Tor is broken

2020-02-14 Thread e9hack
Am 15.02.2020 um 08:31 schrieb Petr Štetiar:
> e9hack  [2020-02-15 08:24:23]:
> 
>> Feb 15 08:17:20.000 [warn] Unable to open "/var/run/tor.pid" for writing: 
>> Permission denied
>> Feb 15 08:17:20.000 [err] Unable to write PIDFile "/var/run/tor.pid"
> 
> This is probably needed in the init script:
> 
>  procd_set_param user tor
> 

It doesn't help, because the generated pid file has still as owner root.

Regards,
Hartmut

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Tor is broken

2020-02-14 Thread Petr Štetiar
e9hack  [2020-02-15 08:24:23]:

> Feb 15 08:17:20.000 [warn] Unable to open "/var/run/tor.pid" for writing: 
> Permission denied
> Feb 15 08:17:20.000 [err] Unable to write PIDFile "/var/run/tor.pid"

This is probably needed in the init script:

 procd_set_param user tor

-- ynezz

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Tor is broken

2020-02-14 Thread e9hack
Hi,

tor doesn't start since commit ca6528f002d74445e3d0a336aeb9074fc337307a:

tor: update init script

Changes:
-add uci config
-create pid file by procd
-add reload function

Feb 15 08:17:20.000 [warn] Unable to open "/var/run/tor.pid" for writing: 
Permission denied
Feb 15 08:17:20.000 [err] Unable to write PIDFile "/var/run/tor.pid"
Feb 15 08:17:20.000 [err] set_options(): Bug: Acting on config options left us 
in a broken state. Dying. (on Tor 0.4.2.6 )
Feb 15 08:17:20.000 [err] Reading config failed--see warnings above.

Regards,
Hartmut

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] wireguard: bump to 0.0.20200215

2020-02-14 Thread Jason A. Donenfeld
* send: cleanup skb padding calculation
* socket: remove useless synchronize_net

Sorry for the back-to-back releases. This fixes a regression spotted by Eric
Dumazet.

Signed-off-by: Jason A. Donenfeld 
---
 package/network/services/wireguard/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/services/wireguard/Makefile 
b/package/network/services/wireguard/Makefile
index 6f9ae77..231f1f4 100644
--- a/package/network/services/wireguard/Makefile
+++ b/package/network/services/wireguard/Makefile
@@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=wireguard
 
-PKG_VERSION:=0.0.20200205
+PKG_VERSION:=0.0.20200215
 PKG_RELEASE:=1
 
 PKG_SOURCE:=wireguard-linux-compat-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-linux-compat/snapshot/
-PKG_HASH:=9669e165fc7252cab7f908ba57f160f6d57539b7cc81180f260cb675d2fd362b
+PKG_HASH:=0def6f3608ec06f6dfc454aa5281a7c38b06ff27096cb341448d20602da4e923
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
-- 
2.25.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-WA701ND/730RE/801ND/901ND v1

2020-02-14 Thread Adrian Schmutzler
This adds support for the various clones of the TL-WA830RE recently
supported in fb99ac6807f2 ("ath79: add support for TP-Link TL-WA830RE v1"):

- tplink,tl-wa701nd-v1
- tplink,tl-wa730re-v1
- tplink,tl-wa801nd-v1
- tplink,tl-wa830re-v1 (already supported)
- tplink,tl-wa901nd-v1

Since these devices are 100%-clones in ar71xx, this patch adds all
of them without run-testing (as this has been done for TL-WA830RE v1).

Specifications:
- SOC: Atheros AR7240
- CPU: 400MHz
- Flash: 4 MiB (Spansion S25FL032P)
- RAM: 32 MiB (Zentel A3S56D40FTP-G5)
- WLAN: Atheros AR9280 bgn 2x2
- Ethernet: 1 port (100M)

Flash instructions:
- install from u-boot with tftp (requires serial access)
  > setenv ipaddr a.b.c.d
  > setenv serverip e.f.g.h
  > tftpboot 0x8000 \
  openwrt-ath79-tiny-tplink_tl-wax-v1-squashfs-factory.bin
  > erase 0x9f02 +0x3c
  > cp.b 0x8000 0x9f02 0x3c
  > bootm 0x9f02
- flash factory image from OEM WebUI
- sysupgrade from ar71xx image

Signed-off-by: Adrian Schmutzler 
---
 .../ath79/dts/ar7240_tplink_tl-wa701nd-v1.dts |  9 +
 .../ath79/dts/ar7240_tplink_tl-wa730re-v1.dts |  9 +
 .../ath79/dts/ar7240_tplink_tl-wa801nd-v1.dts |  9 +
 .../ath79/dts/ar7240_tplink_tl-wa901nd-v1.dts |  9 +
 target/linux/ath79/image/tiny-tp-link.mk  | 40 +++
 .../ath79/tiny/base-files/etc/board.d/01_leds |  6 ++-
 .../tiny/base-files/etc/board.d/02_network|  4 ++
 .../etc/hotplug.d/firmware/10-ath9k-eeprom|  4 ++
 8 files changed, 89 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ath79/dts/ar7240_tplink_tl-wa701nd-v1.dts
 create mode 100644 target/linux/ath79/dts/ar7240_tplink_tl-wa730re-v1.dts
 create mode 100644 target/linux/ath79/dts/ar7240_tplink_tl-wa801nd-v1.dts
 create mode 100644 target/linux/ath79/dts/ar7240_tplink_tl-wa901nd-v1.dts

diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wa701nd-v1.dts 
b/target/linux/ath79/dts/ar7240_tplink_tl-wa701nd-v1.dts
new file mode 100644
index 00..6dd50018b2
--- /dev/null
+++ b/target/linux/ath79/dts/ar7240_tplink_tl-wa701nd-v1.dts
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7240_tplink_tl-wa.dtsi"
+
+/ {
+   model = "TP-Link TL-WA701ND v1";
+   compatible = "tplink,tl-wa701nd-v1", "qca,ar7240";
+};
diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wa730re-v1.dts 
b/target/linux/ath79/dts/ar7240_tplink_tl-wa730re-v1.dts
new file mode 100644
index 00..e1277a8128
--- /dev/null
+++ b/target/linux/ath79/dts/ar7240_tplink_tl-wa730re-v1.dts
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7240_tplink_tl-wa.dtsi"
+
+/ {
+   model = "TP-Link TL-WA730RE v1";
+   compatible = "tplink,tl-wa730re-v1", "qca,ar7240";
+};
diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wa801nd-v1.dts 
b/target/linux/ath79/dts/ar7240_tplink_tl-wa801nd-v1.dts
new file mode 100644
index 00..2db22c0e21
--- /dev/null
+++ b/target/linux/ath79/dts/ar7240_tplink_tl-wa801nd-v1.dts
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7240_tplink_tl-wa.dtsi"
+
+/ {
+   model = "TP-Link TL-WA801ND v1";
+   compatible = "tplink,tl-wa801nd-v1", "qca,ar7240";
+};
diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wa901nd-v1.dts 
b/target/linux/ath79/dts/ar7240_tplink_tl-wa901nd-v1.dts
new file mode 100644
index 00..5422e5c600
--- /dev/null
+++ b/target/linux/ath79/dts/ar7240_tplink_tl-wa901nd-v1.dts
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7240_tplink_tl-wa.dtsi"
+
+/ {
+   model = "TP-Link TL-WA901ND v1";
+   compatible = "tplink,tl-wa901nd-v1", "qca,ar7240";
+};
diff --git a/target/linux/ath79/image/tiny-tp-link.mk 
b/target/linux/ath79/image/tiny-tp-link.mk
index 8f6f2fe14a..bba83236d8 100644
--- a/target/linux/ath79/image/tiny-tp-link.mk
+++ b/target/linux/ath79/image/tiny-tp-link.mk
@@ -66,6 +66,36 @@ define Device/tplink_tl-mr3420-v2
 endef
 TARGET_DEVICES += tplink_tl-mr3420-v2
 
+define Device/tplink_tl-wa701nd-v1
+  $(Device/tplink-4m)
+  SOC := ar7240
+  DEVICE_MODEL := TL-WA701ND
+  DEVICE_VARIANT := v1
+  TPLINK_HWID := 0x07010001
+  SUPPORTED_DEVICES += tl-wa901nd
+endef
+TARGET_DEVICES += tplink_tl-wa701nd-v1
+
+define Device/tplink_tl-wa730re-v1
+  $(Device/tplink-4m)
+  SOC := ar7240
+  DEVICE_MODEL := TL-WA730RE
+  DEVICE_VARIANT := v1
+  TPLINK_HWID := 0x0731
+  SUPPORTED_DEVICES += tl-wa901nd
+endef
+TARGET_DEVICES += tplink_tl-wa730re-v1
+
+define Device/tplink_tl-wa801nd-v1
+  $(Device/tplink-4m)
+  SOC := ar7240
+  DEVICE_MODEL := TL-WA801ND
+  DEVICE_VARIANT := v1
+  TPLINK_HWID := 0x08010001
+  SUPPORTED_DEVICES += tl-wa901nd
+endef
+TARGET_DEVICES += tplink_tl-wa801nd-v1
+
 define Device/tplink_tl-wa830re-v1
   $(Device/tplink-4m)
   SOC := ar7240
@@ -101,6 +131,16 @@ define Device/tplink_tl-wa850re-v2
 endef
 TARGET_DEVICES += 

[OpenWrt-Devel] [PATCH] linux-firmware: update to 20200122

2020-02-14 Thread DENG Qingfang
Update linux-firmware to 20200122

git log --pretty=oneline --abbrev-commit 20191215..20200122

1eb2408 linux-firmware: Update firmware file for Intel Bluetooth AX200
0dc1611 linux-firmware: Update firmware file for Intel Bluetooth AX201
d03f79c linux-firmware: Update firmware file for Intel Bluetooth 9560
aab62bc linux-firmware: Update firmware file for Intel Bluetooth 9260
ed0aa3a nvidia: add TU102/TU104/TU106 signed firmware
9c340bd amdgpu: update navi10 firmware for 19.50
3b4a503 amdgpu: Add navi10 TA ucode
16cc13a Merge branch 'v1.1.3' of 
https://github.com/ruiwang-mtk/linux_fw_vpu_v1.1.37f3177d mediatek: update 
MT8173 VPU firmware to v1.1.3
67d4ff5 Mellanox: Add new mlxsw_spectrum firmware xx.2000.2714
f1c9e7b radeon: update oland rlc microcode from amdgpu
b1dafb7 amdgpu: update vega20 microcode for 19.50
c38789e amdgpu: update vega12 microcode for 19.50
5a141c1 amdgpu: update vega10 microcode for 19.50
a03173a amdgpu: update picasso microcode for 19.50
86e9a5f amdgpu: update raven2 microcode for 19.50
febe09a amdgpu: update raven microcode for 19.50
af76fd0 amdgpu: update navi10 microcode for 19.50
b5b176a amdgpu: update navi14 microcode for 19.50
ad90178 amdgpu: add TA microcode for Raven asics
379551b qed: Add firmware 8.42.2.0
58b4003 Merge branch 'RB3-wlan-firmware-1387-v2' of 
https://github.com/andersson/linux-firmware
5967a45 Adjust WHENCE entry to check_whence doesn't complain
d1e743d Merge branch 'master' of https://github.com/NXP/mwifiex-firmware
d6219ab qcom: Switch SDM845 WLAN firmware
e65245c linux-firmware: add NXP firmware licence file
6871bff Merge branch 'ath10k-20191220' of 
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/linux-firmware
b142c2e ath10k: WCN3990 hw1.0: add firmware WLAN.HL.2.0-01387-QCAHLSWMTPLZ-1
8809b87 ath10k: QCA9984 hw1.0: update firmware-5.bin to 10.4-3.9.0.2-00070
513d70c ath10k: QCA988X hw2.0: update firmware-5.bin to 10.2.4-1.0-00047
203435b ath10k: QCA9888 hw2.0: update firmware-5.bin to 10.4-3.9.0.2-00070
a66d2fc ath10k: QCA9887 hw1.0: update firmware-5.bin to 10.2.4-1.0-00047
6d19154 ath10k: QCA6174 hw3.0: update board-2.bin
c4586ff linux-firmware: Update AMD cpu microcode

Signed-off-by: DENG Qingfang 
---
 package/firmware/linux-firmware/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/firmware/linux-firmware/Makefile 
b/package/firmware/linux-firmware/Makefile
index 085cce422d..01dee59171 100644
--- a/package/firmware/linux-firmware/Makefile
+++ b/package/firmware/linux-firmware/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=linux-firmware
-PKG_VERSION:=20191215
+PKG_VERSION:=20200122
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=c2068ff4a797c0f2c3edbb9488f82a48bca8a995855ea21310a8346195c0ae56
+PKG_HASH:=a30e811b3736a72b874ac27e10662f5e5409b1cadf8aab7ba88e8f8bc8083986
 
 PKG_MAINTAINER:=Felix Fietkau 
 
-- 
2.25.0




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] wireguard: bump to 0.0.20200214

2020-02-14 Thread Jason A. Donenfeld
* chacha20poly1305: defensively protect against large inputs

Defense-in-depth sort of check.

* netns: ensure that icmp src address is correct with nat

We finally upstreamed the last remaining compat.h hack in this patch series:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=803381f9f117493d6204d82445a530c834040fe6
That means we can port compat.h to use the new proper API.

* receive: reset last_under_load to zero

Matt found a small optimization while porting the Linux kernel module to
OpenBSD's kernel.

* send: account for mtu=0 devices

This fixes issues related to setting the MTU of a device to zero.

Signed-off-by: Jason A. Donenfeld 
---
 package/network/services/wireguard/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/services/wireguard/Makefile 
b/package/network/services/wireguard/Makefile
index 6f9ae77..776f375 100644
--- a/package/network/services/wireguard/Makefile
+++ b/package/network/services/wireguard/Makefile
@@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=wireguard
 
-PKG_VERSION:=0.0.20200205
+PKG_VERSION:=0.0.20200214
 PKG_RELEASE:=1
 
 PKG_SOURCE:=wireguard-linux-compat-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-linux-compat/snapshot/
-PKG_HASH:=9669e165fc7252cab7f908ba57f160f6d57539b7cc81180f260cb675d2fd362b
+PKG_HASH:=6aaed62beb23803a456b7875a56e9462125a589c9dfb6d0b672c1a8f9f3f45ab
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
-- 
2.25.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Renames and cosmetic changes between 19.07 and 20.xx

2020-02-14 Thread Adrian Schmutzler
Hi,

since 19.07 release we have changed device/image names in several targets to
make naming schemes in OpenWrt more systematic and harmonize them between
targets.

Today, I have also renamed most of the brcm target for a similar reason.

To aid downstream and other developers to keep overview of the changes and
necessary local adjustments, I've put together a Wiki page summarizing the most
important changes:

https://openwrt.org/docs/guide-developer/20.xx.major.changes

Though this is titled "20.xx", it currently obviously describes just the current
state in master, but will eventually become relevant when 20.xx is out.
So far the Wiki page is just a quick collection of cosmetic changes, feel free
to extend/move/adjust it or put it in a wider context.

Best

Adrian


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ramips: gsw_mt7621: disable PORT 5 MAC RX/TX flow control by default

2020-02-14 Thread Kristian Evensen
Hi everyone,

I am sorry for my late reply to this thread. My email provider flagged
it as spam, so I only saw the conversation now. It seems that you have
reached a conclusion on how to proceed, but I thought I should anyway
share my notes/observations on this issue (in case they can be
useful).

My employer has a large number of Mediatek-based (mt7620 and mt7621)
routers in production. Most routers have a minimum of two internet
connections - one fixed and one using mobile broadband. Some time in
2017 we started receiving reports from a few customers that the switch
would stop working. The link was up, but no data would go through.
Looking at the logs, we could always see the "TX timeout" error
message and we started to look for a cause.

We quickly ruled out any kind of crash, as the LTE was still up and
wifi worked fine. After getting a few of these reports, we started
looking for things that were common between the different
installations. We struggled to find any, there were all sorts of
devices connected to the different ports on the routers. The only
thing the different cases had in common, was that the problem
disappeared when whatever was connected to the WAN port was
disconnected. However, again, the equipment that provided the fixed
connection came from all sorts of vendors.

After scratching our heads for a while and not getting anywhere, I
asked here on the mailing list and was told that restarting networking
should at least make the switch works fine again. We added a watchdog
doing exactly that when the TX timeout message would appear.
Restarting networking improved the situation considerably, but the
switch would still sometimes get stuck and never recover.

This triggered us to make a second attempt at recreating the problem.
Our test was the same as what Rene described. We assumed the problem
had something to do with sending large amounts of traffic and at a
high speed, so we used iperf3 as a traffic generator and sent traffic
between different machines connected to the switch. One of these
machines were quite unstable and prone to crash, and we noticed that
whenever that machine would crash the TX timeout issue would trigger
and no traffic would pass through the switch.

A normal packet capture didn't reveal anything interesting, but
connecting a network tap did. Looking at the packets captured from the
tap, we could see a flood of pause frames from the crashed machine.
When this flood occurred, the switch stopped transmitting packets on
all the ports and not just the one that the crashed machine was
connected to. This caught us by surprise, but doing some research it
seems to be a common behavior among "normal" switches. Also, if we
waited long enough, the switch would never recover.

After discovering that pause frames seemed to be at least one trigger
for TX timeout, we added support to the driver for enabling/disabling
flow control on each of the ports + an init script that does the
disabling. Since we deployed this change on our routers, we have not
had a single report about switches that stop working. We do sometimes
still see the "TX timeout" error, but it is no longer critical.

We never tried to disable flow control on the CPU-port only, which
seems like a more elegant approach than disabling each port
individually. I do agree that disabling pause frames is more a
work-around than a solution, but it has at least eradicated the
problem for us. I never got around to submitting our patch, but if
anyone would find it useful I can do it quite soon.

BR,
Kristian

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel