Re: [OpenWrt-Devel] [PATCH] proc: cancel script killing only if process ends

2020-03-19 Thread SAn via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Hi ynezz thanks for bringing this conversation to the list!

On 2/11/20 10:44 AM, Petr Štetiar wrote:
> Santiago Piccinini  [2019-10-10 18:35:53]:
> 
> Hi,
> 
>> Before this change if the cgi script hangs after writing headers
>> then the process will never be killed. Let's only cancel the timeout
>> if the process ends.
> 
>  < jow> well it is a change in behaviour
>  < jow> the proper solution would be introducing a separate read timeout I 
> guess. Thats how other servers handle it
>  < jow> one timeout until the first content, then another body read timeout

The rationale behind adding another timeout is to maintain behavior
(using an infinite default timeout for the new timeout) ?

In my opinion another timeout adds more complexity than value if
backwards compatibility is not taken in consideration.

Anyhow, I can implement separate timeouts but if the patch will be
accepted. Maybe something like script_timeout_abort or
script_abort_timeout for the name?

Best!
SAn

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


[OpenWrt-Devel] [PATCH 0/2] openssl: update to 1.1.1e

2020-03-19 Thread Eneas U de Queiroz
This version includes bug and security fixes, including medium-severity
CVE-2019-1551, affecting RSA1024, RSA1536, DSA1024 & DH512 on x86_64.

Here's the current description of CVE-2019-1551:
  There is an overflow bug in the x64_64 Montgomery squaring procedure
  used in exponentiation with 512-bit moduli. No EC algorithms are
  affected. Analysis suggests that attacks against 2-prime RSA1024,
  3-prime RSA1536, and DSA1024 as a result of this defect would be very
  difficult to perform and are not believed likely. Attacks against
  DH512 are considered just feasible. However, for an attack the target
  would have to re-use the DH512 private key, which is not recommended
  anyway. Also applications directly using the low level API BN_mod_exp
  may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e
  (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected
  1.0.2-1.0.2t).

I've added a commit before the actual update to include cofiguration
help for the afalg-sync engine available in the packages feed.

This was tested on mvebu, using nginx, and the openssl util.

These patches should be cleanly cherry-picked to 19.07, so I won't send
a duplicate patch unless told otherwise.

Eneas U de Queiroz (2):
  openssl: add configuration example for afalg-sync
  openssl: update to 1.1.1e

 package/libs/openssl/Makefile |  6 +--
 .../150-openssl.cnf-add-engines-conf.patch| 31 -
 ...o-make-the-dev-crypto-engine-dynamic.patch | 43 ++-
 ...default-to-not-use-digests-in-engine.patch |  8 ++--
 ...to-ignore-error-when-closing-session.patch |  6 +--
 5 files changed, 52 insertions(+), 42 deletions(-)


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


[OpenWrt-Devel] [PATCH 2/2] openssl: update to 1.1.1e

2020-03-19 Thread Eneas U de Queiroz
This version includes bug and security fixes, including medium-severity
CVE-2019-1551, affecting RSA1024, RSA1536, DSA1024 & DH512 on x86_64.

Signed-off-by: Eneas U de Queiroz 

diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index ca393be88f..353ae453f5 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openssl
 PKG_BASE:=1.1.1
-PKG_BUGFIX:=d
+PKG_BUGFIX:=e
 PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
-PKG_RELEASE:=3
+PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
 ENGINES_DIR=engines-1.1
 
@@ -24,7 +24,7 @@ PKG_SOURCE_URL:= \
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \
http://www.openssl.org/source/ \
http://www.openssl.org/source/old/$(PKG_BASE)/
-PKG_HASH:=1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2
+PKG_HASH:=694f61ac11cb51c9bf73f54e771ff6022b0327a43bbdfa1b2f19de1662a6dcbe
 
 PKG_LICENSE:=OpenSSL
 PKG_LICENSE_FILES:=LICENSE
diff --git 
a/package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch
 
b/package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch
index ee33942426..71dc5bf99b 100644
--- 
a/package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch
+++ 
b/package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch
@@ -1,4 +1,4 @@
-From f3cef70b34afde3afd13ce3636232d41533b0162 Mon Sep 17 00:00:00 2001
+From  Mon Sep 17 00:00:00 2001
 From: Eneas U de Queiroz 
 Date: Tue, 6 Nov 2018 10:57:03 -0200
 Subject: e_devcrypto: make the /dev/crypto engine dynamic
@@ -20,7 +20,7 @@ index e00802a3fd..47fe948966 100644
 -  SOURCE[../../libcrypto]=eng_devcrypto.c
 -ENDIF
 diff --git a/crypto/init.c b/crypto/init.c
-index 9fc0e8ef68..b387559920 100644
+index 1b0d523bea..ee3e2eb075 100644
 --- a/crypto/init.c
 +++ b/crypto/init.c
 @@ -329,18 +329,6 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_engine_openssl)
@@ -116,7 +116,7 @@ diff --git a/crypto/engine/eng_devcrypto.c 
b/engines/e_devcrypto.c
 similarity index 95%
 rename from crypto/engine/eng_devcrypto.c
 rename to engines/e_devcrypto.c
-index 64dc6b891d..fb5c6e1636 100644
+index 0d420e50aa..3fcd81de7a 100644
 --- a/crypto/engine/eng_devcrypto.c
 +++ b/engines/e_devcrypto.c
 @@ -7,7 +7,7 @@
@@ -128,15 +128,7 @@ index 64dc6b891d..fb5c6e1636 100644
  #include 
  #include 
  #include 
-@@ -23,26 +23,26 @@
- #include 
- #include 
- 
--#include "internal/engine.h"
--
- /* #define ENGINE_DEVCRYPTO_DEBUG */
- 
- #if CRYPTO_ALGORITHM_MIN < CRYPTO_ALGORITHM_MAX
+@@ -31,18 +31,20 @@
  # define CHECK_BSD_STYLE_MACROS
  #endif
  
@@ -160,18 +152,7 @@ index 64dc6b891d..fb5c6e1636 100644
  
  /*
   * cipher/digest status & acceleration definitions
-@@ -66,6 +66,10 @@ struct driver_info_st {
- char *driver_name;
- };
- 
-+#ifdef OPENSSL_NO_DYNAMIC_ENGINE
-+void engine_load_devcrypto_int(void);
-+#endif
-+
- static int clean_devcrypto_session(struct session_op *sess) {
- if (ioctl(cfd, CIOCFSESSION, >ses) < 0) {
- SYSerr(SYS_F_IOCTL, errno);
-@@ -341,6 +345,7 @@ static int cipher_ctrl(EVP_CIPHER_CTX *ctx, int type, int 
p1, void* p2)
+@@ -341,6 +343,7 @@ static int cipher_ctrl(EVP_CIPHER_CTX *ctx, int type, int 
p1, void* p2)
  struct cipher_ctx *to_cipher_ctx;
  
  switch (type) {
@@ -179,7 +160,7 @@ index 64dc6b891d..fb5c6e1636 100644
  case EVP_CTRL_COPY:
  if (cipher_ctx == NULL)
  return 1;
-@@ -702,7 +707,6 @@ static int digest_init(EVP_MD_CTX *ctx)
+@@ -702,7 +705,6 @@ static int digest_init(EVP_MD_CTX *ctx)
  SYSerr(SYS_F_IOCTL, errno);
  return 0;
  }
@@ -187,7 +168,7 @@ index 64dc6b891d..fb5c6e1636 100644
  return 1;
  }
  
-@@ -1058,7 +1062,7 @@ static const ENGINE_CMD_DEFN devcrypto_cmds[] = {
+@@ -1058,7 +1060,7 @@ static const ENGINE_CMD_DEFN devcrypto_cmds[] = {
  OPENSSL_MSTR(DEVCRYPTO_USE_SOFTWARE) "=allow all drivers, "
  OPENSSL_MSTR(DEVCRYPTO_REJECT_SOFTWARE)
  "=use if acceleration can't be determined) [default="
@@ -196,7 +177,7 @@ index 64dc6b891d..fb5c6e1636 100644
  ENGINE_CMD_FLAG_NUMERIC},
  #endif
  
-@@ -1166,55 +1170,70 @@ static int devcrypto_ctrl(ENGINE *e, int cmd, long i, 
void *p, void (*f) (void))
+@@ -1166,55 +1168,70 @@ static int devcrypto_ctrl(ENGINE *e, int cmd, long i, 
void *p, void (*f) (void))
   *
   */
  
@@ -284,12 +265,12 @@ index 64dc6b891d..fb5c6e1636 100644
 -|| !ENGINE_set_ctrl_function(e, devcrypto_ctrl)
 +|| !ENGINE_set_ctrl_function(e, devcrypto_ctrl))
 +return 0;
-+
+ 
 +prepare_cipher_methods();
 +#ifdef IMPLEMENT_DIGEST
 +prepare_digest_methods();
 +#endif
- 
++
 +return (ENGINE_set_ciphers(e, devcrypto_ciphers)
 +#ifdef IMPLEMENT_DIGEST
 +&& ENGINE_set_digests(e, devcrypto_digests)
@@ -297,7 +278,7 @@ index 64dc6b891d..fb5c6e1636 100644
  /*
   * Asymmetric ciphers aren't well 

[OpenWrt-Devel] [PATCH 1/2] openssl: add configuration example for afalg-sync

2020-03-19 Thread Eneas U de Queiroz
This adds commented configuration help for the alternate, afalg-sync
engine to /etc/ssl/openssl.cnf.

Signed-off-by: Eneas U de Queiroz 

diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index eb267f31f0..ca393be88f 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -11,7 +11,7 @@ PKG_NAME:=openssl
 PKG_BASE:=1.1.1
 PKG_BUGFIX:=d
 PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_USE_MIPS16:=0
 ENGINES_DIR=engines-1.1
 
diff --git 
a/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch 
b/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch
index 6c7143dd7e..81d41963c6 100644
--- a/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch
+++ b/package/libs/openssl/patches/150-openssl.cnf-add-engines-conf.patch
@@ -1,6 +1,6 @@
 --- a/apps/openssl.cnf
 +++ b/apps/openssl.cnf
-@@ -22,6 +22,53 @@ oid_section = new_oids
+@@ -22,6 +22,82 @@ oid_section = new_oids
  # (Alternatively, use a configuration file that has only
  # X.509v3 extensions in its main [= default] section.)
  
@@ -16,8 +16,37 @@
 +#padlock=padlock
 +
 +[afalg]
++# Leave this alone and configure algorithms with CIPERS/DIGESTS below
 +default_algorithms = ALL
 +
++# The following commands are only available if using the alternative
++# (sync) AFALG engine
++# Configuration commands:
++# Run 'openssl engine -t -c -vv -pre DUMP_INFO devcrypto' to see a
++# list of supported algorithms, along with their driver, whether they
++# are hw accelerated or not, and the engine's configuration commands.
++
++# USE_SOFTDRIVERS: specifies whether to use software (not accelerated)
++# drivers (0=use only accelerated drivers, 1=allow all drivers, 2=use
++# if acceleration can't be determined) [default=2]
++#USE_SOFTDRIVERS = 2
++
++# CIPHERS: either ALL, NONE, NO_ECB (all except ECB-mode) or a
++# comma-separated list of ciphers to enable [default=NO_ECB]
++# Starting in 1.2.0, if you use a cipher list, each cipher may be
++# followed by a colon (:) and the minimum request length to use
++# AF_ALG drivers for that cipher; smaller requests are processed by
++# softare; a negative value will use the default for that cipher
++#CIPHERS=AES-128-CBC:1024, AES-256-CBC:768, DES-EDE3-CBC:0
++
++# DIGESTS: either ALL, NONE, or a comma-separated list of digests to
++# enable [default=NONE]
++# It is strongly recommended not to enable digests; their performance
++# is poor, and there are many cases in which they will not work,
++# especially when calling fork with open crypto contexts.  Openssh,
++# for example, does this, and you may not be able to login.
++#DIGESTS = NONE
++
 +[devcrypto]
 +# Leave this alone and configure algorithms with CIPERS/DIGESTS below
 +default_algorithms = ALL

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


[OpenWrt-Devel] [PATCH 1/1] netifd: add pre-up/down post-up/down callback handling

2020-03-19 Thread Florian Eckert
In some situations it is useful to execute callback scripts when
manually triggering an ifdown/ifup event via the CLI/LuCI.

In my case I have a monitoring for a cellular connection.
If this fails the command `ubus call network.interface up` is execute to
restart the connection if a config option in uci of the interface
(keep_connected) flag is set.

But for me to disconnect correctly I need to know about a user
interaction with performed with CLI/LuCI.

With this change we can decide if this is a user interaction with CLI/LuCI,
because with the new callback mechanism I can set/delete a uci config flag so
that the connection should really disconnected. And so does not restart on a
failed connetion tracking again because the uci config flag is not set.

Signed-off-by: Florian Eckert 
---
 package/network/config/netifd/files/sbin/ifup | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/network/config/netifd/files/sbin/ifup 
b/package/network/config/netifd/files/sbin/ifup
index 5515b91f76..c92dd46550 100755
--- a/package/network/config/netifd/files/sbin/ifup
+++ b/package/network/config/netifd/files/sbin/ifup
@@ -6,7 +6,9 @@ setup_wifi=
 if_call() {
local interface="$1"
for mode in $modes; do
+   env -i ACTION="pre-${mode}" INTERFACE="$interface" 
/sbin/hotplug-call netifd
ubus call network.interface $mode "{ \"interface\" : 
\"$interface\" }"
+   env -i ACTION="post-${mode}" INTERFACE="$interface" 
/sbin/hotplug-call netifd
done
 }
 
-- 
2.20.1


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


[OpenWrt-Devel] [PATCH v5 1/1] ath79: add support for ubnt_bullet-m-ar7240 variant

2020-03-19 Thread Russell Senior
This adds support for the Ubiquiti Bullet M (AR7240).

Specifications:
- AR7240 SoC @ 400 MHz
- 32 MB RAM
- 8 MB SPI flash
- 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in
- External antenna
- POWER/LAN green LEDs
- 4x RSSI LEDs (red, orange, green, green)
- UART (115200 8N1) on PCB

Flashing via WebUI:
  Upload the factory image via the stock firmware web UI.

  Attention: airOS firmware versions >= 5.6 have a new bootloader with
  an incompatible partition table!

  Please downgrade to <= 5.5 _before_ flashing OpenWrt!
  Refer to the device's Wiki page for further information.

Flashing via TFTP:
  Same procedure as other Ubiquiti M boards.

- Use a pointy tool (e.g., pen cap, paper clip) and keep the reset
  button on the device or on the PoE supply pressed
- Power on the device via PoE (keep reset button pressed)
- Keep pressing until LEDs flash alternatively LED1+LED3 =>
  LED2+LED4 => LED1+LED3, etc.
- Release reset button
- The device starts a TFTP server at 192.168.1.20
- Set a static IP on the computer (e.g., 192.168.1.21/24)
- Upload via tftp the factory image:
  $ tftp 192.168.1.20
  tftp> bin
  tftp> trace
  tftp> put 
openwrt-ath79-generic-x-ubnt_bullet-m-ar7240-squashfs-factory.bin

The "fixed-link" section of the device tree is needed to avoid errors like this:

  Generic PHY mdio.0:1f:04: Master/Slave resolution failed, maybe conflicting 
manual settings?

With "fixed-link", the errors go away and eth0 comes up reliably.

Signed-off-by: Russell Senior 
---
 .../ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts | 22 +++
 .../generic/base-files/etc/board.d/01_leds|  1 +
 .../generic/base-files/etc/board.d/02_network |  2 ++
 .../etc/hotplug.d/firmware/10-ath9k-eeprom|  1 +
 target/linux/ath79/image/generic-ubnt.mk  | 10 +
 5 files changed, 36 insertions(+)
 create mode 100644 target/linux/ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts

diff --git a/target/linux/ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts 
b/target/linux/ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts
new file mode 100644
index 00..58b35f5c8b
--- /dev/null
+++ b/target/linux/ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7240.dtsi"
+#include "ar724x_ubnt_xm.dtsi"
+#include "ar724x_ubnt_xm_outdoor.dtsi"
+
+/ {
+   compatible = "ubnt,bullet-m-ar7240", "ubnt,xm", "qca,ar7240";
+   model = "Ubiquiti Bullet M XM (AR7240)";
+};
+
+ {
+   fixed-link {
+   speed = <100>;
+   full-duplex;
+   };
+};
+
+ {
+   compatible = "syscon", "simple-mfd";
+};
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds 
b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
index 227ccf0dfe..2df7dca89d 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
@@ -250,6 +250,7 @@ tplink,tl-wr842n-v2)
 trendnet,tew-823dru)
ucidef_set_led_netdev "wan" "WAN" "trendnet:green:planet" "eth0"
;;
+ubnt,bullet-m-ar7240|\
 ubnt,bullet-m-ar7241|\
 ubnt,bullet-m-xw|\
 ubnt,nanostation-loco-m|\
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network 
b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index dbb722482b..fc1fee4844 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -40,6 +40,7 @@ ath79_setup_interfaces()
tplink,re450-v1|\
tplink,re450-v2|\
tplink,tl-wr902ac-v1|\
+   ubnt,bullet-m-ar7240|\
ubnt,bullet-m-ar7241|\
ubnt,bullet-m-xw|\
ubnt,lap-120|\
@@ -446,6 +447,7 @@ ath79_setup_macs()
label_mac=$wan_mac
;;
ubnt,airrouter|\
+   ubnt,bullet-m-ar7240|\
ubnt,bullet-m-ar7241|\
ubnt,nanostation-loco-m|\
ubnt,nanostation-m|\
diff --git 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 38f158896b..0cf8b43514 100644
--- 
a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ 
b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -85,6 +85,7 @@ case "$FIRMWARE" in
tplink,tl-wr2543-v1|\
tplink,tl-wr842n-v1|\
ubnt,airrouter|\
+   ubnt,bullet-m-ar7240|\
ubnt,bullet-m-ar7241|\
ubnt,nanostation-loco-m|\
ubnt,nanostation-m|\
diff --git a/target/linux/ath79/image/generic-ubnt.mk 
b/target/linux/ath79/image/generic-ubnt.mk
index 4902023089..ece5886ac6 100644
--- a/target/linux/ath79/image/generic-ubnt.mk
+++ b/target/linux/ath79/image/generic-ubnt.mk
@@ -113,6 +113,16 @@ define Device/ubnt_airrouter
 endef
 TARGET_DEVICES += ubnt_airrouter
 
+define Device/ubnt_bullet-m-ar7240
+  $(Device/ubnt-xm)
+  SOC := ar7240
+  DEVICE_MODEL := Bullet-M
+  

[OpenWrt-Devel] [PATCH v5 0/1] ath79: add support for the ar7240 version of the ubiquiti bullet

2020-03-19 Thread Russell Senior
since v4:

* patches 1/4 and 2/4 were already merged, so dropped here
* add the second ubnt,bullet-m-ar7240 to the 02_network file, previously missing
* modify the board naming as requested in device tree
* justify the device tree "fixed-link" section in the commit message
* drop the unnecessary XW DEVICE_VARIANT patch

Russell Senior (1):
  ath79: add support for ubnt_bullet-m-ar7240 variant

 .../ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts | 22 +++
 .../generic/base-files/etc/board.d/01_leds|  1 +
 .../generic/base-files/etc/board.d/02_network |  2 ++
 .../etc/hotplug.d/firmware/10-ath9k-eeprom|  1 +
 target/linux/ath79/image/generic-ubnt.mk  | 10 +
 5 files changed, 36 insertions(+)
 create mode 100644 target/linux/ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts

-- 
2.25.2


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


[OpenWrt-Devel] [PATCH] tools: squashfskit4: fix build with GCC10

2020-03-19 Thread Robert Marko
From: Robert Marko 

In order to build squashfskit with GCC10, this backport from upstream is needed.

Signed-off-by: Robert Marko 
---
 ...002-fix-build-failure-against-gcc-10.patch | 43 +++
 1 file changed, 43 insertions(+)
 create mode 100644 
tools/squashfskit4/patches/0002-fix-build-failure-against-gcc-10.patch

diff --git 
a/tools/squashfskit4/patches/0002-fix-build-failure-against-gcc-10.patch 
b/tools/squashfskit4/patches/0002-fix-build-failure-against-gcc-10.patch
new file mode 100644
index 00..46c6a5ea0f
--- /dev/null
+++ b/tools/squashfskit4/patches/0002-fix-build-failure-against-gcc-10.patch
@@ -0,0 +1,43 @@
+From fe2f5da4b0f8994169c53e84b7cb8a0feefc97b5 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich 
+Date: Sun, 26 Jan 2020 18:35:13 +
+Subject: [PATCH] squashfs-tools: fix build failure against gcc-10
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On gcc-10 (and gcc-9 -fno-common) build fails as:
+
+```
+cc ... -o mksquashfs
+ld: read_fs.o:(.bss+0x0):
+  multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400c90): first 
defined here
+ld: read_fs.o:(.bss+0x8):
+  multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400c98): first 
defined here
+```
+
+gcc-10 will change the default from -fcommon to fno-common:
+https://gcc.gnu.org/PR85678.
+
+The error also happens if CFLAGS=-fno-common passed explicitly.
+
+Reported-by: Toralf Förster
+Bug: https://bugs.gentoo.org/706456
+Signed-off-by: Sergei Trofimovich 
+---
+ squashfs-tools/mksquashfs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/squashfs-tools/mksquashfs.h b/squashfs-tools/mksquashfs.h
+index 1beefef7..b6503063 100644
+--- a/squashfs-tools/mksquashfs.h
 b/squashfs-tools/mksquashfs.h
+@@ -143,7 +143,7 @@ struct append_file {
+ #endif
+ 
+ extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache;
+-struct cache *bwriter_buffer, *fwriter_buffer;
++extern struct cache *bwriter_buffer, *fwriter_buffer;
+ extern struct queue *to_reader, *to_deflate, *to_writer, *from_writer,
+   *to_frag, *locked_fragment, *to_process_frag;
+ extern struct append_file **file_mapping;
-- 
2.26.0.rc2


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


[OpenWrt-Devel] [PATCH] ath79: align Ubiquiti AC Pro ethernet map to factory

2020-03-19 Thread David Bauer
The Uniquiti AC Pro and Ubiquiti AC Mesh Pro currently have the
"Primary" and "Secondary" ethernet ports configured to offer LAN as well
as WAN. However, Uiquiti describes the following behavior for the
devices Ethernet ports:

 > Secondary UniFi Access Point (UAP) Ethernet ports don't
 > provide PoE passthrough (to run current to a second powered
 > device), but they do support data passthrough.
 > It serves as a bridged interface between main / secondary
 > Ethernet port.

To reduce confusion for users (as LAN and WAN functionality is not
visible on the device itself), configure both ports to offer LAN
functionality. Users can still configure a WAN interface on a port they
are able to choose.

CC: Lucian Cristian 
Reported-by: Florian Klink 
Signed-off-by: David Bauer 
---
 .../linux/ath79/generic/base-files/etc/board.d/02_network  | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network 
b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index dbb722482b..610e3e3ce8 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -183,8 +183,6 @@ ath79_setup_interfaces()
;;
nec,wg1200cr|\
ubnt,nanostation-ac|\
-   ubnt,unifiac-mesh-pro|\
-   ubnt,unifiac-pro|\
yuncore,a782|\
yuncore,xd4200)
ucidef_add_switch "switch0" \
@@ -305,6 +303,11 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "5:lan" "1:wan"
;;
+   ubnt,unifiac-mesh-pro|\
+   ubnt,unifiac-pro)
+   ucidef_add_switch "switch0" \
+   "0@eth0" "2:lan:1" "3:lan:2"
+   ;;
zbtlink,zbt-wd323|\
xiaomi,mi-router-4q)
ucidef_set_interface_wan "eth1"
-- 
2.25.1


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