Re: [OpenWrt-Devel] [PATCH] ramips, mt7520: reproducible elecom-header uid/gid

2019-11-06 Thread Bjørn Mork
subject typo.  I was curious about that new chip :-)


Bjørn

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


[OpenWrt-Devel] [PATCH] ath79: update uboot-envtools for Netgear WNR routers

2019-11-06 Thread Michal Cieslakiewicz
Boards added: WNR1000v2, WNR2000v3, WNR612v2, WNDR3700.

Signed-off-by: Michal Cieslakiewicz 
---
 package/boot/uboot-envtools/files/ath79 | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/package/boot/uboot-envtools/files/ath79 
b/package/boot/uboot-envtools/files/ath79
index 5da5df2420..fefbb48801 100644
--- a/package/boot/uboot-envtools/files/ath79
+++ b/package/boot/uboot-envtools/files/ath79
@@ -22,8 +22,11 @@ glinet,gl-ar300m-nor|\
 librerouter,librerouter-v1|\
 netgear,ex6400|\
 netgear,ex7300|\
+netgear,wnr1000-v2|\
+netgear,wnr2000-v3|\
 netgear,wnr2200-8m|\
 netgear,wnr2200-16m|\
+netgear,wnr612-v2|\
 ocedo,koala|\
 ocedo,raccoon|\
 openmesh,om5p-ac-v2|\
@@ -33,6 +36,9 @@ yuncore,a770)
 buffalo,wzr-hp-ag300h)
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1" "0x1"
;;
+netgear,wndr3700)
+   ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2" "0x1"
+   ;;
 netgear,wndr4300)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x4" "0x2"
;;
-- 
2.24.0


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


[OpenWrt-Devel] [PATCH] ar71xx: update uboot-envtools for Netgear WNR routers

2019-11-06 Thread Michal Cieslakiewicz
Boards added: WNR1000v2, WNR2000v3, WNR2200, WNR612v2, WNDR4300.
Boards changed: WNDR3700 (u-boot env size is 2 sectors not 1).

Signed-off-by: Michal Cieslakiewicz 
---
 package/boot/uboot-envtools/files/ar71xx | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/package/boot/uboot-envtools/files/ar71xx 
b/package/boot/uboot-envtools/files/ar71xx
index b4e8d995c8..bc415e3b8c 100644
--- a/package/boot/uboot-envtools/files/ar71xx
+++ b/package/boot/uboot-envtools/files/ar71xx
@@ -58,7 +58,10 @@ sr3200|\
 t830|\
 tube2h|\
 wam250|\
-wndr3700|\
+wnr1000-v2|\
+wnr2000-v3|\
+wnr2200|\
+wnr612-v2|\
 xd3200)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1" "0x1"
;;
@@ -92,6 +95,12 @@ qihoo-c301)
 wi2a-ac200i)
ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x8000" "0x1"
;;
+wndr3700)
+   ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2" "0x1"
+   ;;
+wndr4300)
+   ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x4" "0x2"
+   ;;
 esac
 
 config_load ubootenv
-- 
2.24.0


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


[OpenWrt-Devel] [PATCH 19.07 04/14] hostapd: SAE/EAP-pwd side-channel attack update

2019-11-06 Thread Petr Štetiar
From: Hauke Mehrtens 

Fixes this security problem:
* SAE/EAP-pwd side-channel attack update
https://w1.fi/security/2019-6/sae-eap-pwd-side-channel-attack-update.txt

Signed-off-by: Hauke Mehrtens 
(cherry picked from commit 7bed9bf10fc8d05df34c7efc66e8b4ade37a1a0c)
---
 package/network/services/hostapd/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index 18e4ea44906c..233ef389ae50 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=8
+PKG_RELEASE:=9
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git

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


[OpenWrt-Devel] [PATCH 19.07 02/14] hostapd: Allow CONFIG_IEEE80211W for all but mini variant

2019-11-06 Thread Petr Štetiar
From: Hauke Mehrtens 

This commit will activate CONFIG_IEEE80211W for all, but the mini
variant when at least one driver supports it. This will add ieee80211w
support for the mesh variant for example.

Fixes: FS#2397
Signed-off-by: Hauke Mehrtens 
(cherry picked from commit 1d4df52c215874a5238ddef7bccf0139f7758c24)
---
 package/network/services/hostapd/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index 233ef389ae50..d0866f670c0b 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=9
+PKG_RELEASE:=7
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git

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


[OpenWrt-Devel] [PATCH 19.07 03/14] hostapd: Fix security problem

2019-11-06 Thread Petr Štetiar
From: Hauke Mehrtens 

This fixes:
CVE-2019-11555 "EAP-pwd message reassembly issue with unexpected fragment"
https://w1.fi/security/2019-5/eap-pwd-message-reassembly-issue-with-unexpected-fragment.txt

This shouöld not affect OpenWrt in the default settings as we do not use
EAP-pwd.

Signed-off-by: Hauke Mehrtens 
(cherry picked from commit 9f34bf51d60a237696b1d4cc9b5f4835b95e7ea2)
---
 package/network/services/hostapd/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index d0866f670c0b..18e4ea44906c 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git

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


[OpenWrt-Devel] [PATCH 19.07 01/14] hostapd: adjust removed wolfssl options

2019-11-06 Thread Petr Štetiar
From: Eneas U de Queiroz 

This edjusts the selection of recently removed wolfssl options which
have always been built into the library even in their abscence.
Also remove the selection of libwolfssl itself, allowing the library to
be built as a module.

Signed-off-by: Eneas U de Queiroz 
(cherry picked from commit 94d131332b5adbcf885a92608c40a22b79b3c708)
---
 package/network/services/hostapd/Config.in | 4 
 1 file changed, 4 deletions(-)

diff --git a/package/network/services/hostapd/Config.in 
b/package/network/services/hostapd/Config.in
index 22719e46d8d9..9dfa44e3132d 100644
--- a/package/network/services/hostapd/Config.in
+++ b/package/network/services/hostapd/Config.in
@@ -51,14 +51,10 @@ config WPA_WOLFSSL
PACKAGE_wpad-wolfssl ||\
PACKAGE_wpad-mesh-wolfssl ||\
PACKAGE_eapol-test-wolfssl
-   select PACKAGE_libwolfssl
select WOLFSSL_HAS_AES_CCM
select WOLFSSL_HAS_ARC4
-   select WOLFSSL_HAS_DES3
select WOLFSSL_HAS_DH
-   select WOLFSSL_HAS_ECC
select WOLFSSL_HAS_OCSP
-   select WOLFSSL_HAS_PSK
select WOLFSSL_HAS_SESSION_TICKET
select WOLFSSL_HAS_WPAS
 

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


[OpenWrt-Devel] [PATCH 19.07 00/14] bump hostap to latest stable release

2019-11-06 Thread Petr Štetiar
Hi,

TL;DR I would like to propose backport of most of hostap patches from master
and thus bumping hostapd in 19.07 to the latest stable release v2.9.

I understand, that it's quite a radical change as we've 19.07-rc1 already
tagged, but bellow you can find a filtered list of 147 (total count is 1195)
interesting commits which are worth considering of this bump of hostap for
19.07-rc2.

I would like to add, that v2.9 has been tested for some time already, I'm not
aware about any issues and v2.9 is going to make the backporting of fixes much
easier as well.

 d776bf8c66ff EAP-TEAP peer: Fix fragmentation of final message
 1c7e61a35aff wolfssl: Avoid void pointer arithmetic
 7122a02fa5b7 SAE: Fix order_len for FFC groups
 ac734a342ed1 SAE: Fix KCK, PMK, and PMKID derivation for groups 22, 23, 24
 c65168ccd29c OpenSSL: Fix crypto_bignum_to_bin() with padlen == 0
 64e37be9454c Avoid nested enum wpas_mode declaration to allow C++ compilation
 fe2e1edf431d EAP-SIM server: Avoid void pointer arithmetic
 cfc9ebea0326 EAP-AKA server: Avoid void pointer arithmetic
 bd0414043594 trace: Avoid void pointer arithmetic
 fc03ea2c1fc7 DPP: Avoid void pointer arithmetic
 4da91881cbf0 P2P: Fix memory size for os_memmove() in p2p_check_pref_chan()
 f74618cb928e wpa_supplicant: Fix type for ssid->mode comparisons
 30bbff142d04 DPP: Fix documentation to include operating class for URI
 29f85561894d HE: Fix HE capability check for PPE threshold present
 ce11c281ad1d TLS: Fix X.509v3 BasicConstraints parsing
 09448d94a7c9 Avoid use of a shadowed local variable
 2552a3735a13 SAE: Fix external_auth status in driver-SME STA case with AP SME 
support
 8f5fc369e263 HE: Fix HE Capabilities element variable length encoding
 0dbc894f466e HE: Fix HE Capabilities indication from driver
 39b9d059cd98 HE: Remove vht_ prefix from acs_adjust_vht_center_freq()
 7118a697f4b9 HE: Remove vht_ prefix from seg0/seg1_idx in DFS
 f428332d322d HE: Remove vht_ prefix from bw/seg0/seg1_idx in CSA fallback
 f200631c3563 HE: Remove vht_ prefix from CSA/bandwidth
 b04e43086ba3 HE: Remove vht_ prefix from shared set_freq argument
 464dcfd0304c HE: Remove VHT_ prefix from CHANWITDH_* define
 31bc66e4d193 More forceful clearing of stack memory with keys
 18f4fc43f280 hs20-osu-client: Check snprintf result to avoid compiler warnings
 0de46d8a6643 mesh: Fix RSN initialization failure handling
 baf8ab8ceca0 RADIUS server: Do not close fd=0 in error cases
 312ec34e40fc UBSan: Avoid dependency on undefined behavior in internal AES 
operation
 5bad612311ae WNM: Fix bounds checking in SSID List element matching
 e8ebef87cb4b WNM: Fix BSS Termination Duration subelement length validation
 b1aee7a622b8 DPP: Fix bootstrapping URI parser to handle channel list for an 
opclass
 a96c78364518 dbus: Fix some memory leaks on error paths
 e3b39e62c2de OpenSSL: Fix a memory leak in OCSP handling
 6602d9e3a6fa DPP: Fix a memory leak in testing sequence
 c5622b43cd8d DPP: Fix a memory leak on duplicate Authentication Response
 1cdfe8d23f9f DPP: Fix a memory leak in PKEX Qi/Qr derivation
 677e120181d3 dragonfly: Fix a memory leak on error path
 8925d2010d93 OpenSSL: Fix memory leak in crypto_dh_derive_secret()
 57ec74ea9b9a DPP: Fix memory leak in EC_GROUP handling
 7a9ddba6f524 DPP: Fix a memory leak in key pair generation
 f9cd1327adf7 OpenSSL: Fix memory leak in crypto_ecdh_init()
 6326fa0c408c Fix ENGINE support with OpenSSL 1.1+
 e6ca2f1139b3 nl80211: Fix handling of if_indices reallocation failure
 d42df8d6ce81 Fix a regression in storing of external_auth SSID/BSSID
 b1664c8e4f00 HE: Fix he_bss_color documentation
 e6f9eab90ebc HE: Fix HE Operation element byte order on bigendian CPUs
 3869c159d95e HE: Fix HE operation field size
 7cac255632e6 HE: Fix Operation Parameters order
 fa52bc8b98b8 EAP-PAX server: Fix message length checks for MSGDUMP level 
hexdump
 a3be79a14202 EAP-GPSK server: Fix memory freeing on error path
 24b06511e248 EAP-SAKE server: Fix memory freeing on error path
 a40bd06e9b8e FILS: Fix PTK rekeying
 d2d1a324ce93 EAP-pwd peer: Fix reassembly buffer handling
 fe76f487e28b EAP-pwd server: Fix reassembly buffer handling
 a9d224f560be EAP-pwd server: Fix a memory leak on error path
 824cb5a530a8 RSN: Ignore IGTK configuration errors with swapped KeyID values
 fe01cd0067e8 Fix FILS ERP association event with 4-way HS offload drivers
 0be8b9238f6c mka: Avoid memory leak in unexpected case in RECEIVE
 984d5b7e1fdd mesh: Fix random llid generation in an error case
 10cf866bac4b mesh: Fix operations after SAE state machine removing the STA
 153d4c501a82 mesh: Fix SAE reauthentication processing
 2f6805139559 Fix hostapd BSS_TM_REQ handling of bss_term parameter
 2e70e807c8b8 D-Bus: Fix P2P GroupStarted signal not to use uninitialized IP 
buffer
 6570949b2c1d OpenSSL: Fix server side openssl_ecdh_curves configuration with 
1.0.2
 ac8fa9ef1986 SAE: Fix confirm message validation in error cases
 362704dda045 SAE: Avoid branches in is_quadratic_residue_blind()
 aaf6

[OpenWrt-Devel] [PATCH 19.07 08/14] hostapd: mirror ieee80211w ap mode defaults in station mode

2019-11-06 Thread Petr Štetiar
From: Jo-Philipp Wich 

For AP mode, OpenWrt automatically sets ieee80211w to either 1 or 2, depending
on whether the encryption is set to sae-mixed, or sae/owe/eap suite-b.

Mirror the same defaults for client mode connections, in order to allow an
OpenWrt station to associate to an OpenWrt ap with SAE, OWE or Suite-B 
encryption
without the need to manually specify "option ieee80211w" on the station.

Signed-off-by: Jo-Philipp Wich 
(cherry picked from commit abb4f4075e791789fdb00731035e08a8cf51555f)
---
 package/network/services/hostapd/Makefile | 2 +-
 package/network/services/hostapd/files/hostapd.sh | 9 +
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index e94d66211d9f..63e7a5dea146 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=10
+PKG_RELEASE:=11
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
diff --git a/package/network/services/hostapd/files/hostapd.sh 
b/package/network/services/hostapd/files/hostapd.sh
index 96cfc13a7db0..fdbce815dff3 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -754,6 +754,15 @@ wpa_supplicant_add_network() {
ieee80211w ieee80211r \
multi_ap
 
+   case "$auth_type" in
+   sae|owe|eap192|eap-eap192)
+   set_default ieee80211w 2
+   ;;
+   psk-sae)
+   set_default ieee80211w 1
+   ;;
+   esac
+
set_default ieee80211r 0
set_default multi_ap 0
 

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


[OpenWrt-Devel] [PATCH 19.07 05/14] hostapd: revert signature change in patch

2019-11-06 Thread Petr Štetiar
From: "Leon M. George" 

The original wpa_hexdump uses a 'void *' for the payload.  With patch
410-limit_debug_messages, the signature changes and compiler warnings
occur at various places.  One such warning is:

 wpa_debug.h:106:20: note: expected 'const u8 * {aka const unsigned char *}' 
but argument is of type 'struct wpa_eapol_key *'

Signed-off-by: Leon M. George 
[commit message facelift]
Signed-off-by: Petr Štetiar 
(cherry picked from commit a123df275846b1b83aaf3d7488a1544f7c0e09aa)
---
 .../services/hostapd/patches/410-limit_debug_messages.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/package/network/services/hostapd/patches/410-limit_debug_messages.patch 
b/package/network/services/hostapd/patches/410-limit_debug_messages.patch
index d182e8d98681..687589d74638 100644
--- a/package/network/services/hostapd/patches/410-limit_debug_messages.patch
+++ b/package/network/services/hostapd/patches/410-limit_debug_messages.patch
@@ -124,7 +124,7 @@
   * configuration. The contents of buf is printed out has hex dump.
   */
 -void wpa_hexdump(int level, const char *title, const void *buf, size_t len);
-+static inline void wpa_hexdump(int level, const char *title, const u8 *buf, 
size_t len)
++static inline void wpa_hexdump(int level, const char *title, const void *buf, 
size_t len)
 +{
 +  if (level < CONFIG_MSG_MIN_PRIORITY)
 +  return;

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


[OpenWrt-Devel] [PATCH 19.07 07/14] hostapd: fix OWE settings in client mode

2019-11-06 Thread Petr Štetiar
From: Jo-Philipp Wich 

This changes fixes the generation of the wpa_supplicant client configuration
in WPA3 OWE client mode. Instead of incorrectly emitting key_mgmt=NONE, use
the proper key_mgmt=OWE setting instead.

Signed-off-by: Jo-Philipp Wich 
(cherry picked from commit 4209b28d23b8bf28575af5e8904194f49b81532e)
---
 package/network/services/hostapd/Makefile | 2 +-
 package/network/services/hostapd/files/hostapd.sh | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index 233ef389ae50..e94d66211d9f 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=9
+PKG_RELEASE:=10
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
diff --git a/package/network/services/hostapd/files/hostapd.sh 
b/package/network/services/hostapd/files/hostapd.sh
index 78fb736dd78c..96cfc13a7db0 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -795,6 +795,7 @@ wpa_supplicant_add_network() {
none) ;;
owe)
hostapd_append_wpa_key_mgmt
+   key_mgmt="$wpa_key_mgmt"
;;
wep)
local wep_keyidx=0

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


[OpenWrt-Devel] [PATCH 19.07 06/14] hostapd: declare struct wpa_bss early

2019-11-06 Thread Petr Štetiar
From: "Leon M. George" 

wps_supplicant.h assumes that 'struct wpa_bss' is forward declared if
CONFIG_WPS is not defined.  With the later inclusion of
600-ubus_support, the issue manifests in warnings like these:

wps_supplicant.h:113:15: warning: 'struct wpa_bss' declared inside parameter 
list will not be visible outside of this definition or declaration
struct wpa_bss *bss)
   ^~~

This patch forward declares 'struct wpa_bss' regardless.

Signed-off-by: Leon M. George 
[commit message facelift]
Signed-off-by: Petr Štetiar 
(cherry picked from commit f974f8213b94578581b35e6b3f8fb1fd5a35f753)
---
 .../599-wpa_supplicant-fix-warnings.patch | 19 +++
 1 file changed, 19 insertions(+)
 create mode 100644 
package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch

diff --git 
a/package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch
 
b/package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch
new file mode 100644
index ..e70dc61419da
--- /dev/null
+++ 
b/package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch
@@ -0,0 +1,19 @@
+--- a/wpa_supplicant/wps_supplicant.h
 b/wpa_supplicant/wps_supplicant.h
+@@ -9,6 +9,7 @@
+ #ifndef WPS_SUPPLICANT_H
+ #define WPS_SUPPLICANT_H
+ 
++struct wpa_bss;
+ struct wpa_scan_results;
+ 
+ #ifdef CONFIG_WPS
+@@ -16,8 +17,6 @@ struct wpa_scan_results;
+ #include "wps/wps.h"
+ #include "wps/wps_defs.h"
+ 
+-struct wpa_bss;
+-
+ struct wps_new_ap_settings {
+   const char *ssid_hex;
+   const char *auth;

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


Re: [OpenWrt-Devel] [PATCH 19.07 02/14] hostapd: Allow CONFIG_IEEE80211W for all but mini variant

2019-11-06 Thread Daniel Golle
Hi Petr,

On Wed, Nov 06, 2019 at 12:05:07PM +0100, Petr Štetiar wrote:
> From: Hauke Mehrtens 
> 
> This commit will activate CONFIG_IEEE80211W for all, but the mini
> variant when at least one driver supports it. This will add ieee80211w
> support for the mesh variant for example.
> 
> Fixes: FS#2397
> Signed-off-by: Hauke Mehrtens 
> (cherry picked from commit 1d4df52c215874a5238ddef7bccf0139f7758c24)
> ---
>  package/network/services/hostapd/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/network/services/hostapd/Makefile 
> b/package/network/services/hostapd/Makefile
> index 233ef389ae50..d0866f670c0b 100644
> --- a/package/network/services/hostapd/Makefile
> +++ b/package/network/services/hostapd/Makefile
> @@ -7,7 +7,7 @@
>  include $(TOPDIR)/rules.mk
>  
>  PKG_NAME:=hostapd
> -PKG_RELEASE:=9
> +PKG_RELEASE:=7
>  
>  PKG_SOURCE_URL:=http://w1.fi/hostap.git
>  PKG_SOURCE_PROTO:=git
> 

Looks like you forgot to `git add`, also in patch 3 and 4...

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


Re: [OpenWrt-Devel] [PATCH 19.07 02/14] hostapd: Allow CONFIG_IEEE80211W for all but mini variant

2019-11-06 Thread Petr Štetiar
Daniel Golle  [2019-11-06 12:15:47]:

Hi,

> > Signed-off-by: Hauke Mehrtens 
> > (cherry picked from commit 1d4df52c215874a5238ddef7bccf0139f7758c24)
> 
> Looks like you forgot to `git add`, also in patch 3 and 4...

hm, thanks for spotting it, this is interesting as I've used `git
cherry-pick -x hash`, I'll fix that.

-- ynezz

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


[OpenWrt-Devel] Wiki going down for maintenance

2019-11-06 Thread Stijn Tintel

Hi,

As the server that is hosting the OpenWrt.org wiki is running out of 
disk space, we will take it down to resize it.


Stijn


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


Re: [OpenWrt-Devel] Wiki going down for maintenance

2019-11-06 Thread Stijn Tintel

On 6/11/2019 12:51, Stijn Tintel wrote:

Hi,

As the server that is hosting the OpenWrt.org wiki is running out of 
disk space, we will take it down to resize it.



And it's back.

Stijn


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


[OpenWrt-Devel] [PATCH] ipq40xx: wpj419: use reset-gpios property for phy reset

2019-11-06 Thread Daniel Danzberger
The old GPIO based phy reset (phy-reset-gpio) will be removed form
the ipq40xx mdio driver in the future.

Signed-off-by: Daniel Danzberger 
---
 .../files-4.19/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts 
b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts
index b6eb99278b..e75d07606a 100644
--- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts
+++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts
@@ -236,9 +236,10 @@
 
mdio@9 {
status = "okay";
-   phy-reset-gpio = <&tlmm 47 0>;
pinctrl-0 = <&mdio_pins>;
pinctrl-names = "default";
+   reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
+   reset-delay-us = <5000>;
};
 
ess-psgmii@98000 {
-- 
2.24.0.rc1


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


[OpenWrt-Devel] [PATCH v2 19.07 02/12] hostapd: revert signature change in patch

2019-11-06 Thread Petr Štetiar
From: "Leon M. George" 

The original wpa_hexdump uses a 'void *' for the payload.  With patch
410-limit_debug_messages, the signature changes and compiler warnings
occur at various places.  One such warning is:

 wpa_debug.h:106:20: note: expected 'const u8 * {aka const unsigned char *}' 
but argument is of type 'struct wpa_eapol_key *'

Signed-off-by: Leon M. George 
[commit message facelift]
Signed-off-by: Petr Štetiar 
(cherry picked from commit a123df275846b1b83aaf3d7488a1544f7c0e09aa)
---
 .../services/hostapd/patches/410-limit_debug_messages.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/package/network/services/hostapd/patches/410-limit_debug_messages.patch 
b/package/network/services/hostapd/patches/410-limit_debug_messages.patch
index d182e8d98681..687589d74638 100644
--- a/package/network/services/hostapd/patches/410-limit_debug_messages.patch
+++ b/package/network/services/hostapd/patches/410-limit_debug_messages.patch
@@ -124,7 +124,7 @@
   * configuration. The contents of buf is printed out has hex dump.
   */
 -void wpa_hexdump(int level, const char *title, const void *buf, size_t len);
-+static inline void wpa_hexdump(int level, const char *title, const u8 *buf, 
size_t len)
++static inline void wpa_hexdump(int level, const char *title, const void *buf, 
size_t len)
 +{
 +  if (level < CONFIG_MSG_MIN_PRIORITY)
 +  return;

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


[OpenWrt-Devel] [PATCH v2 19.07 04/12] hostapd: fix OWE settings in client mode

2019-11-06 Thread Petr Štetiar
From: Jo-Philipp Wich 

This changes fixes the generation of the wpa_supplicant client configuration
in WPA3 OWE client mode. Instead of incorrectly emitting key_mgmt=NONE, use
the proper key_mgmt=OWE setting instead.

Signed-off-by: Jo-Philipp Wich 
(cherry picked from commit 4209b28d23b8bf28575af5e8904194f49b81532e)
---
 package/network/services/hostapd/Makefile | 2 +-
 package/network/services/hostapd/files/hostapd.sh | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index 233ef389ae50..e94d66211d9f 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=9
+PKG_RELEASE:=10
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
diff --git a/package/network/services/hostapd/files/hostapd.sh 
b/package/network/services/hostapd/files/hostapd.sh
index 78fb736dd78c..96cfc13a7db0 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -795,6 +795,7 @@ wpa_supplicant_add_network() {
none) ;;
owe)
hostapd_append_wpa_key_mgmt
+   key_mgmt="$wpa_key_mgmt"
;;
wep)
local wep_keyidx=0

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


[OpenWrt-Devel] [PATCH v2 19.07 03/12] hostapd: declare struct wpa_bss early

2019-11-06 Thread Petr Štetiar
From: "Leon M. George" 

wps_supplicant.h assumes that 'struct wpa_bss' is forward declared if
CONFIG_WPS is not defined.  With the later inclusion of
600-ubus_support, the issue manifests in warnings like these:

wps_supplicant.h:113:15: warning: 'struct wpa_bss' declared inside parameter 
list will not be visible outside of this definition or declaration
struct wpa_bss *bss)
   ^~~

This patch forward declares 'struct wpa_bss' regardless.

Signed-off-by: Leon M. George 
[commit message facelift]
Signed-off-by: Petr Štetiar 
(cherry picked from commit f974f8213b94578581b35e6b3f8fb1fd5a35f753)
---
 .../599-wpa_supplicant-fix-warnings.patch | 19 +++
 1 file changed, 19 insertions(+)
 create mode 100644 
package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch

diff --git 
a/package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch
 
b/package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch
new file mode 100644
index ..e70dc61419da
--- /dev/null
+++ 
b/package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch
@@ -0,0 +1,19 @@
+--- a/wpa_supplicant/wps_supplicant.h
 b/wpa_supplicant/wps_supplicant.h
+@@ -9,6 +9,7 @@
+ #ifndef WPS_SUPPLICANT_H
+ #define WPS_SUPPLICANT_H
+ 
++struct wpa_bss;
+ struct wpa_scan_results;
+ 
+ #ifdef CONFIG_WPS
+@@ -16,8 +17,6 @@ struct wpa_scan_results;
+ #include "wps/wps.h"
+ #include "wps/wps_defs.h"
+ 
+-struct wpa_bss;
+-
+ struct wps_new_ap_settings {
+   const char *ssid_hex;
+   const char *auth;

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


[OpenWrt-Devel] [PATCH v2 19.07 01/12] hostapd: adjust removed wolfssl options

2019-11-06 Thread Petr Štetiar
From: Eneas U de Queiroz 

This edjusts the selection of recently removed wolfssl options which
have always been built into the library even in their abscence.
Also remove the selection of libwolfssl itself, allowing the library to
be built as a module.

Signed-off-by: Eneas U de Queiroz 
(cherry picked from commit 94d131332b5adbcf885a92608c40a22b79b3c708)
---
 package/network/services/hostapd/Config.in | 4 
 1 file changed, 4 deletions(-)

diff --git a/package/network/services/hostapd/Config.in 
b/package/network/services/hostapd/Config.in
index 22719e46d8d9..9dfa44e3132d 100644
--- a/package/network/services/hostapd/Config.in
+++ b/package/network/services/hostapd/Config.in
@@ -51,14 +51,10 @@ config WPA_WOLFSSL
PACKAGE_wpad-wolfssl ||\
PACKAGE_wpad-mesh-wolfssl ||\
PACKAGE_eapol-test-wolfssl
-   select PACKAGE_libwolfssl
select WOLFSSL_HAS_AES_CCM
select WOLFSSL_HAS_ARC4
-   select WOLFSSL_HAS_DES3
select WOLFSSL_HAS_DH
-   select WOLFSSL_HAS_ECC
select WOLFSSL_HAS_OCSP
-   select WOLFSSL_HAS_PSK
select WOLFSSL_HAS_SESSION_TICKET
select WOLFSSL_HAS_WPAS
 

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


[OpenWrt-Devel] [PATCH v2 19.07 00/12] bump hostap to latest stable release

2019-11-06 Thread Petr Štetiar
Hi,

v1 patches were somehow screwed probably due to the rebase, so this v2 series
is done from scratch again. Previous cover letter[1] for reference, and Git
branch[2] with all the patches.

1. https://patchwork.ozlabs.org/cover/1190274/
2. 
https://git.openwrt.org/?p=openwrt/staging/ynezz.git;a=shortlog;h=refs/heads/upstream/19.07/hostapd-backports

Eneas U de Queiroz (1):
  hostapd: adjust removed wolfssl options

Hauke Mehrtens (6):
  hostapd: Update to version 2.8 (2019-04-21)
  hostapd: Update to version 2.9 (2019-08-08)
  hostapd: use config option CONFIG_NO_LINUX_PACKET_SOCKET_WAR
  hostapd: Remove unneeded patch
  hostapd: use getrandom syscall
  hostapd: Add mesh support for wpad full

Jo-Philipp Wich (2):
  hostapd: fix OWE settings in client mode
  hostapd: mirror ieee80211w ap mode defaults in station mode

Kyle Copperfield (1):
  hostapd: add IEEE 802.11k support

Leon M. George (2):
  hostapd: revert signature change in patch
  hostapd: declare struct wpa_bss early

 package/network/services/hostapd/Config.in|   4 -
 package/network/services/hostapd/Makefile |  12 +-
 .../hostapd/files/hostapd-basic.config|  34 +-
 .../hostapd/files/hostapd-full.config |  26 +-
 .../hostapd/files/hostapd-mini.config |  26 +-
 .../network/services/hostapd/files/hostapd.sh |  23 ++
 .../hostapd/files/wpa_supplicant-basic.config |  64 ++--
 .../hostapd/files/wpa_supplicant-full.config  |  44 ++-
 .../hostapd/files/wpa_supplicant-mini.config  |  44 ++-
 .../hostapd/files/wpa_supplicant-p2p.config   |  44 ++-
 ...1-mesh-factor-out-mesh-join-function.patch | 211 ---
 ...2-mesh-factor-out-rsn-initialization.patch | 133 ---
 .../003-mesh-relocate-RSN-init-function.patch |  41 ---
 ...ompletion-callback-to-complete-mesh-.patch | 129 +--
 ...ountry-setting-to-mesh-configuration.patch |  35 --
 ...-frequency-as-pri-sec-channel-switch.patch |  26 ++
 ...rnel-driver-DFS-handler-in-userspace.patch |  14 +-
 ...annel-attributes-before-running-Mesh.patch |  38 +-
 ...ce-type-to-mesh-before-setting-inter.patch |  36 --
 .../009-mesh-set-mesh-center-frequency.patch  |  22 --
 ...-mesh-interface-on-dfs-event-handler.patch | 176 -
 ...hannels-to-be-selected-if-dfs-is-ena.patch |  29 +-
 ...-do-not-allow-pri-sec-channel-switch.patch |  34 +-
 ...ot-allow-scan-result-to-swap-pri-sec.patch |  24 --
 ...sh-do-not-use-offchan-mgmt-tx-on-DFS.patch |  56 +--
 ...-fix-channel-switch-error-during-CAC.patch |  43 +--
 ...nterface-context-to-send-DFS-event-m.patch | 107 --
 ...18-mesh-make-forwarding-configurable.patch |  36 +-
 ...CHANWIDTH_USE_HT-to-max_oper_chwidth.patch |  49 ---
 ...ent-use-of-VHT20-config-in-mesh-mode.patch |  82 -
 ...EE80211X-y-build-without-CONFIG_FILS.patch |  33 --
 ...ix-race-condition-in-mesh-mpm-new-pe.patch |   2 +-
 ...tant-time-operations-for-private-big.patch |  88 -
 ...nctions-for-constant-time-operations.patch | 212 ---
 ...tant-time-selection-for-crypto_bignu.patch |  55 ---
 ...timing-differences-in-PWE-derivation.patch | 242 -
 ...anches-in-is_quadratic_residue_blind.patch | 139 ---
 ...-Mask-timing-of-MODP-groups-22-23-24.patch | 113 --
 ...-const_time-selection-for-PWE-in-FFC.patch | 100 -
 ...-time-operations-in-sae_test_pwd_see.patch | 133 ---
 ...tant-time-and-memory-access-for-find.patch | 319 
 ...rm-message-validation-in-error-cases.patch |  52 ---
 ...r-Verify-received-scalar-and-element.patch |  53 ---
 ...pwd-server-Detect-reflection-attacks.patch |  40 --
 ...t-Verify-received-scalar-and-element.patch |  53 ---
 ...k-element-x-y-coordinates-explicitly.patch | 320 
 ...erver-Fix-reassembly-buffer-handling.patch |  40 --
 ...-peer-Fix-reassembly-buffer-handling.patch |  40 --
 ...-ECC-groups-with-a-prime-under-256-b.patch |  40 --
 ...itable-groups-based-on-REVmd-changes.patch |  54 ---
 ...me_memcmp-for-pwd_value-prime-compar.patch |  26 --
 ...t_time_memcmp-for-pwd_value-prime-co.patch |  65 
 ...n2binpad-or-BN_bn2bin_padded-if-avai.patch |  61 
 ...prf-result-processing-even-if-it-pri.patch |  54 ---
 ...ugh-prf-result-processing-even-if-it.patch |  52 ---
 ...e-use-of-groups-using-Brainpool-curv.patch |  44 ---
 ...re-management-frame-from-unexpected-.patch |   4 +-
 .../hostapd/patches/110-no_eapol_fix.patch|  14 -
 ...120-disable_bridge_packet_workaround.patch |  12 -
 .../hostapd/patches/200-multicall.patch   |  54 +--
 .../services/hostapd/patches/300-noscan.patch |  10 +-
 .../hostapd/patches/301-mesh-noscan.patch |  14 +-
 .../patches/310-rescan_immediately.patch  |   2 +-
 .../hostapd/patches/320-optional_rfkill.patch |  12 +-
 .../patches/330-nl80211_fix_set_freq.patch|   4 +-
 .../patches/340-reload_freq_change.patch  |  26 +-
 .../341-mesh-ctrl-iface-channel-switch.patch  |   2 +-
 .../patches/350-nl80211_del_beacon_bss.patch  |  10 +-
 .../patches/360-ctrl_iface_reload.patch   |   4 +-
 .../hostapd/patche

[OpenWrt-Devel] [PATCH v2 19.07 05/12] hostapd: mirror ieee80211w ap mode defaults in station mode

2019-11-06 Thread Petr Štetiar
From: Jo-Philipp Wich 

For AP mode, OpenWrt automatically sets ieee80211w to either 1 or 2, depending
on whether the encryption is set to sae-mixed, or sae/owe/eap suite-b.

Mirror the same defaults for client mode connections, in order to allow an
OpenWrt station to associate to an OpenWrt ap with SAE, OWE or Suite-B 
encryption
without the need to manually specify "option ieee80211w" on the station.

Signed-off-by: Jo-Philipp Wich 
(cherry picked from commit abb4f4075e791789fdb00731035e08a8cf51555f)
---
 package/network/services/hostapd/Makefile | 2 +-
 package/network/services/hostapd/files/hostapd.sh | 9 +
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index e94d66211d9f..63e7a5dea146 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=10
+PKG_RELEASE:=11
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
diff --git a/package/network/services/hostapd/files/hostapd.sh 
b/package/network/services/hostapd/files/hostapd.sh
index 96cfc13a7db0..fdbce815dff3 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -754,6 +754,15 @@ wpa_supplicant_add_network() {
ieee80211w ieee80211r \
multi_ap
 
+   case "$auth_type" in
+   sae|owe|eap192|eap-eap192)
+   set_default ieee80211w 2
+   ;;
+   psk-sae)
+   set_default ieee80211w 1
+   ;;
+   esac
+
set_default ieee80211r 0
set_default multi_ap 0
 

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


[OpenWrt-Devel] [PATCH v2 19.07 08/12] hostapd: use config option CONFIG_NO_LINUX_PACKET_SOCKET_WAR

2019-11-06 Thread Petr Štetiar
From: Hauke Mehrtens 

Instead of patching the workaround away, just use the config option.

Signed-off-by: Hauke Mehrtens 
(cherry picked from commit 9b4a27455c17c00698ce7ce24e0bcad419c6319e)
---
 .../hostapd/files/wpa_supplicant-basic.config|  2 +-
 .../hostapd/files/wpa_supplicant-full.config |  2 +-
 .../hostapd/files/wpa_supplicant-mini.config |  2 +-
 .../services/hostapd/files/wpa_supplicant-p2p.config |  2 +-
 .../120-disable_bridge_packet_workaround.patch   | 12 
 5 files changed, 4 insertions(+), 16 deletions(-)
 delete mode 100644 
package/network/services/hostapd/patches/120-disable_bridge_packet_workaround.patch

diff --git a/package/network/services/hostapd/files/wpa_supplicant-basic.config 
b/package/network/services/hostapd/files/wpa_supplicant-basic.config
index 14f6e80896d7..f2fd20dbd772 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-basic.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-basic.config
@@ -308,7 +308,7 @@ CONFIG_BACKEND=file
 # in a bridge for EAPOL frames. This should be uncommented only if the kernel
 # is known to not have the regression issue in packet socket behavior with
 # bridge interfaces (commit 'bridge: respect RFC2863 operational state')').
-#CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
+CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
 
 # IEEE 802.11w (management frame protection), also known as PMF
 # Driver support is also needed for IEEE 802.11w.
diff --git a/package/network/services/hostapd/files/wpa_supplicant-full.config 
b/package/network/services/hostapd/files/wpa_supplicant-full.config
index 5f48d59eebaa..2e9328234a80 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-full.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-full.config
@@ -308,7 +308,7 @@ CONFIG_BACKEND=file
 # in a bridge for EAPOL frames. This should be uncommented only if the kernel
 # is known to not have the regression issue in packet socket behavior with
 # bridge interfaces (commit 'bridge: respect RFC2863 operational state')').
-#CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
+CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
 
 # IEEE 802.11w (management frame protection), also known as PMF
 # Driver support is also needed for IEEE 802.11w.
diff --git a/package/network/services/hostapd/files/wpa_supplicant-mini.config 
b/package/network/services/hostapd/files/wpa_supplicant-mini.config
index 9b1f03433f9f..a71ac9dfe31f 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-mini.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-mini.config
@@ -308,7 +308,7 @@ CONFIG_BACKEND=file
 # in a bridge for EAPOL frames. This should be uncommented only if the kernel
 # is known to not have the regression issue in packet socket behavior with
 # bridge interfaces (commit 'bridge: respect RFC2863 operational state')').
-#CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
+CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
 
 # IEEE 802.11w (management frame protection), also known as PMF
 # Driver support is also needed for IEEE 802.11w.
diff --git a/package/network/services/hostapd/files/wpa_supplicant-p2p.config 
b/package/network/services/hostapd/files/wpa_supplicant-p2p.config
index 03b9a6b65405..0edaf3d083b3 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-p2p.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-p2p.config
@@ -308,7 +308,7 @@ CONFIG_BACKEND=file
 # in a bridge for EAPOL frames. This should be uncommented only if the kernel
 # is known to not have the regression issue in packet socket behavior with
 # bridge interfaces (commit 'bridge: respect RFC2863 operational state')').
-#CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
+CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
 
 # IEEE 802.11w (management frame protection), also known as PMF
 # Driver support is also needed for IEEE 802.11w.
diff --git 
a/package/network/services/hostapd/patches/120-disable_bridge_packet_workaround.patch
 
b/package/network/services/hostapd/patches/120-disable_bridge_packet_workaround.patch
deleted file mode 100644
index 0900db5d..
--- 
a/package/network/services/hostapd/patches/120-disable_bridge_packet_workaround.patch
+++ /dev/null
@@ -1,12 +0,0 @@
 a/src/l2_packet/l2_packet_linux.c
-+++ b/src/l2_packet/l2_packet_linux.c
-@@ -360,8 +360,7 @@ struct l2_packet_data * l2_packet_init_b
- 
-   l2 = l2_packet_init(br_ifname, own_addr, protocol, rx_callback,
-   rx_callback_ctx, l2_hdr);
--  if (!l2)
--  return NULL;
-+  return l2;
- 
- #ifndef CONFIG_NO_LINUX_PACKET_SOCKET_WAR
-   /*

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


[OpenWrt-Devel] [PATCH v2 19.07 07/12] hostapd: Update to version 2.9 (2019-08-08)

2019-11-06 Thread Petr Štetiar
From: Hauke Mehrtens 

The size of the ipkgs increase a bit (between 0.7% and 1.1%):

old 2019-04-21 (2.8):
288264 wpad-basic_2019-04-21-63962824-1_mipsel_24kc.ipk
256188 wpad-mini_2019-04-21-63962824-1_mipsel_24kc.ipk
427475 wpad-openssl_2019-04-21-63962824-1_mipsel_24kc.ipk
423071 wpad-wolfssl_2019-04-21-63962824-1_mipsel_24kc.ipk

new 2019-08-08 (2.9):
290217 wpad-basic_2019-08-08-ca8c2bd2-1_mipsel_24kc.ipk
258745 wpad-mini_2019-08-08-ca8c2bd2-1_mipsel_24kc.ipk
431732 wpad-openssl_2019-08-08-ca8c2bd2-1_mipsel_24kc.ipk
427641 wpad-wolfssl_2019-08-08-ca8c2bd2-1_mipsel_24kc.ipk

Signed-off-by: Hauke Mehrtens 
(cherry picked from commit 167028b750028ae3dac24f5ff96bbb1ba04e8bd7)
---
 package/network/services/hostapd/Makefile |   6 +-
 .../hostapd/files/hostapd-basic.config|  16 +-
 .../hostapd/files/hostapd-full.config |  16 +-
 .../hostapd/files/hostapd-mini.config |  16 +-
 .../hostapd/files/wpa_supplicant-basic.config |  13 ++
 .../hostapd/files/wpa_supplicant-full.config  |  13 ++
 .../hostapd/files/wpa_supplicant-mini.config  |  13 ++
 .../hostapd/files/wpa_supplicant-p2p.config   |  13 ++
 ...ompletion-callback-to-complete-mesh-.patch |  18 +-
 ...-frequency-as-pri-sec-channel-switch.patch |   2 +-
 ...rnel-driver-DFS-handler-in-userspace.patch |   6 +-
 ...annel-attributes-before-running-Mesh.patch |   6 +-
 ...hannels-to-be-selected-if-dfs-is-ena.patch |  14 +-
 ...-do-not-allow-pri-sec-channel-switch.patch |   2 +-
 ...sh-do-not-use-offchan-mgmt-tx-on-DFS.patch |   6 +-
 ...-fix-channel-switch-error-during-CAC.patch |  12 +-
 ...18-mesh-make-forwarding-configurable.patch |  28 +--
 ...ix-race-condition-in-mesh-mpm-new-pe.patch |   2 +-
 ...me_memcmp-for-pwd_value-prime-compar.patch |  26 ---
 ...t_time_memcmp-for-pwd_value-prime-co.patch |  65 ---
 ...n2binpad-or-BN_bn2bin_padded-if-avai.patch |  61 ---
 ...prf-result-processing-even-if-it-pri.patch |  54 --
 ...ugh-prf-result-processing-even-if-it.patch |  52 --
 ...e-use-of-groups-using-Brainpool-curv.patch |  44 -
 ...re-management-frame-from-unexpected-.patch |   2 +-
 .../hostapd/patches/110-no_eapol_fix.patch|   2 +-
 .../hostapd/patches/200-multicall.patch   |  48 ++---
 .../services/hostapd/patches/300-noscan.patch |   4 +-
 .../hostapd/patches/301-mesh-noscan.patch |  10 +-
 .../patches/310-rescan_immediately.patch  |   2 +-
 .../patches/330-nl80211_fix_set_freq.patch|   4 +-
 .../patches/340-reload_freq_change.patch  |  26 +--
 .../341-mesh-ctrl-iface-channel-switch.patch  |   2 +-
 .../patches/350-nl80211_del_beacon_bss.patch  |  10 +-
 .../patches/360-ctrl_iface_reload.patch   |   4 +-
 .../hostapd/patches/370-ap_sta_support.patch  | 167 +-
 .../patches/380-disable_ctrl_iface_mib.patch  |  30 ++--
 .../patches/390-wpa_ie_cap_workaround.patch   |   4 +-
 .../patches/410-limit_debug_messages.patch|  12 +-
 .../patches/420-indicate-features.patch   |   4 +-
 .../patches/430-hostapd_cli_ifdef.patch   |   4 +-
 ...dd-new-config-params-to-be-used-with.patch |   6 +-
 ...-use-new-parameters-during-ibss-join.patch |   4 +-
 .../patches/463-add-mcast_rate-to-11s.patch   |   8 +-
 .../patches/464-fix-mesh-obss-check.patch |   2 +-
 .../patches/500-lto-jobserver-support.patch   |   4 +-
 .../hostapd/patches/600-ubus_support.patch|  48 ++---
 47 files changed, 272 insertions(+), 639 deletions(-)
 delete mode 100644 
package/network/services/hostapd/patches/066-0001-SAE-Use-const_time_memcmp-for-pwd_value-prime-compar.patch
 delete mode 100644 
package/network/services/hostapd/patches/066-0002-EAP-pwd-Use-const_time_memcmp-for-pwd_value-prime-co.patch
 delete mode 100644 
package/network/services/hostapd/patches/066-0003-OpenSSL-Use-BN_bn2binpad-or-BN_bn2bin_padded-if-avai.patch
 delete mode 100644 
package/network/services/hostapd/patches/066-0004-SAE-Run-through-prf-result-processing-even-if-it-pri.patch
 delete mode 100644 
package/network/services/hostapd/patches/066-0005-EAP-pwd-Run-through-prf-result-processing-even-if-it.patch
 delete mode 100644 
package/network/services/hostapd/patches/066-0006-dragonfly-Disable-use-of-groups-using-Brainpool-curv.patch

diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index 1697038ccc67..a723af2c5fba 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -11,9 +11,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2019-04-21
-PKG_SOURCE_VERSION:=63962824309bb428e5f73d9caae08fcb949fbe36
-PKG_MIRROR_HASH:=b31e09b22284785f84ee4d2dfc2b8fa94cad5d7375d957bf2862a50cb5bc1475
+PKG_SOURCE_DATE:=2019-08-08
+PKG_SOURCE_VERSION:=ca8c2bd28ad53f431d6ee60ef754e98cfdb4c17b
+PKG_MIRROR_HASH:=9d9f1c60afa5324ee17219bd3ec61c1a6fa4043b4187da9bb44e59025d3ed31d
 
 PKG_MAINTAINER:=Felix Fietkau 
 PKG_LICENSE:=BSD-3-Clause
diff --git a/package/network/services/hostapd/fil

[OpenWrt-Devel] [PATCH v2 19.07 09/12] hostapd: Remove unneeded patch

2019-11-06 Thread Petr Štetiar
From: Hauke Mehrtens 

All the content of this function is proceeded by IEEE8021X_EAPOL no code
accesses the ssid variable outside of this ifdef.

Signed-off-by: Hauke Mehrtens 
(cherry picked from commit 0d86bf518aaefa57bef577d09a18aff03eccb70c)
---
 .../hostapd/patches/110-no_eapol_fix.patch | 14 --
 .../services/hostapd/patches/200-multicall.patch   |  6 +++---
 .../services/hostapd/patches/301-mesh-noscan.patch |  4 ++--
 .../hostapd/patches/310-rescan_immediately.patch   |  2 +-
 .../hostapd/patches/370-ap_sta_support.patch   |  8 
 ...ant-add-new-config-params-to-be-used-with.patch |  2 +-
 .../hostapd/patches/464-fix-mesh-obss-check.patch  |  2 +-
 .../hostapd/patches/600-ubus_support.patch |  4 ++--
 8 files changed, 14 insertions(+), 28 deletions(-)
 delete mode 100644 
package/network/services/hostapd/patches/110-no_eapol_fix.patch

diff --git a/package/network/services/hostapd/patches/110-no_eapol_fix.patch 
b/package/network/services/hostapd/patches/110-no_eapol_fix.patch
deleted file mode 100644
index b912c3991b24..
--- a/package/network/services/hostapd/patches/110-no_eapol_fix.patch
+++ /dev/null
@@ -1,14 +0,0 @@
 a/wpa_supplicant/wpa_supplicant.c
-+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -297,9 +297,10 @@ void wpa_supplicant_cancel_auth_timeout(
-  */
- void wpa_supplicant_initiate_eapol(struct wpa_supplicant *wpa_s)
- {
-+  struct wpa_ssid *ssid = wpa_s->current_ssid;
-+
- #ifdef IEEE8021X_EAPOL
-   struct eapol_config eapol_conf;
--  struct wpa_ssid *ssid = wpa_s->current_ssid;
- 
- #ifdef CONFIG_IBSS_RSN
-   if (ssid->mode == WPAS_MODE_IBSS &&
diff --git a/package/network/services/hostapd/patches/200-multicall.patch 
b/package/network/services/hostapd/patches/200-multicall.patch
index 1c4efed6321c..a8597edae4fb 100644
--- a/package/network/services/hostapd/patches/200-multicall.patch
+++ b/package/network/services/hostapd/patches/200-multicall.patch
@@ -253,7 +253,7 @@
struct wpa_supplicant *wpa_s;
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -6097,7 +6097,6 @@ struct wpa_interface * wpa_supplicant_ma
+@@ -6096,7 +6096,6 @@ struct wpa_interface * wpa_supplicant_ma
return NULL;
  }
  
@@ -261,7 +261,7 @@
  /**
   * wpa_supplicant_match_existing - Match existing interfaces
   * @global: Pointer to global data from wpa_supplicant_init()
-@@ -6134,6 +6133,11 @@ static int wpa_supplicant_match_existing
+@@ -6133,6 +6132,11 @@ static int wpa_supplicant_match_existing
  
  #endif /* CONFIG_MATCH_IFACE */
  
@@ -273,7 +273,7 @@
  
  /**
   * wpa_supplicant_add_iface - Add a new network interface
-@@ -6390,6 +6394,8 @@ struct wpa_global * wpa_supplicant_init(
+@@ -6389,6 +6393,8 @@ struct wpa_global * wpa_supplicant_init(
  #ifndef CONFIG_NO_WPA_MSG
wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
  #endif /* CONFIG_NO_WPA_MSG */
diff --git a/package/network/services/hostapd/patches/301-mesh-noscan.patch 
b/package/network/services/hostapd/patches/301-mesh-noscan.patch
index 18db9bc9c02d..b1450ef6dbc9 100644
--- a/package/network/services/hostapd/patches/301-mesh-noscan.patch
+++ b/package/network/services/hostapd/patches/301-mesh-noscan.patch
@@ -31,7 +31,7 @@
if (conf->hw_mode == HOSTAPD_MODE_IEEE80211A && ssid->vht) {
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2144,12 +2144,12 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -2143,12 +2143,12 @@ void ibss_mesh_setup_freq(struct wpa_sup
int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode);
enum hostapd_hw_mode hw_mode;
struct hostapd_hw_modes *mode = NULL;
@@ -46,7 +46,7 @@
unsigned int j, k;
struct hostapd_freq_params vht_freq;
int chwidth, seg0, seg1;
-@@ -,7 +,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -2221,7 +2221,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
return;
  
/* Setup higher BW only for 5 GHz */
diff --git 
a/package/network/services/hostapd/patches/310-rescan_immediately.patch 
b/package/network/services/hostapd/patches/310-rescan_immediately.patch
index f69bb388a6b0..8d0307c3a28c 100644
--- a/package/network/services/hostapd/patches/310-rescan_immediately.patch
+++ b/package/network/services/hostapd/patches/310-rescan_immediately.patch
@@ -1,6 +1,6 @@
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -4475,7 +4475,7 @@ wpa_supplicant_alloc(struct wpa_supplica
+@@ -4474,7 +4474,7 @@ wpa_supplicant_alloc(struct wpa_supplica
if (wpa_s == NULL)
return NULL;
wpa_s->scan_req = INITIAL_SCAN_REQ;
diff --git a/package/network/services/hostapd/patches/370-ap_sta_support.patch 
b/package/network/services/hostapd/patches/370-ap_sta_support.patch
index 5916619fa503..f8d420652979 100644
--- a/package/network/services/hostapd/patches/370-ap_sta_support.patch
+++ b/package/network/services/hostapd/pa

Re: [OpenWrt-Devel] [PATCH v2] ath79: use gpio_hog instead of gpio-export

2019-11-06 Thread Adrian Schmutzler
Hi,

> Wouldn't it make more sense to spend time now on implementing
> future-proof solution and switch to it when it's ready?

Obviously, yes. But for the meantime, I'd like to have a less-arbitrary status 
quo.

> I believe the major issue here is that there is no 'in place'
> replacement for 'gpio-export' (or I'm just not aware of it).
> 
[...]
> 
> Are there any other reasons to get rid of 'gpio-export' _now_, other
> than the fact upstream rejected this approach?
> 
 [...]
> 
> '03_gpio_switches' doesn't handle inputs.
> 
> Of course, it has advantages, like the fact it makes the GPIO setup
> uci-based but on the other hand... it does its job fairly late during
> bootup. In some cases, you might want to, for example, enable power for
> 3/4G modem as early as possible, to give it time to register in network.
> 
> Anyway, under the hood, it's the same approach, export named GPIO using
> _deprecated_ sysfs. Excluding uci and place in boot time where it
> happens, the difference is where the GPIOs are defined, DTS vs.
> user-space scripts.
> 

So, both 03_gpio_switches and gpio-hogs provide less functionality than 
gpio-exports with no striking benefit. From that point of view we should 
actually allow gpio-exports in device support submissions again, and actually 
discourage gpio_hogs for the status quo ... (and it would be better to convert 
hogs to exports and not the other way around ...)

Best

Adrian


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH libnl-tiny 1/3] use offsetof macro to make scan-build happy

2019-11-06 Thread Petr Štetiar
scan-build from clang version 9 complains about following:

 cache.c:106:2: warning: Dereference of null pointer
nl_list_for_each_entry_safe(obj, tmp, &cache->c_items, ce_list)
^~~
 include/netlink/list.h:83:20: note: expanded from macro 
'nl_list_for_each_entry_safe'
 pos = n, n = nl_list_entry(n->member.next, typeof(*n), member))
  ^
 include/netlink/list.h:60:2: note: expanded from macro 'nl_list_entry'
nl_container_of(ptr, type, member)
^~
 include/netlink/list.h:56:55: note: expanded from macro 'nl_container_of'
const typeof( ((type *)0)->member ) *__mptr = (ptr);\
  ^

Signed-off-by: Petr Štetiar 
---
 include/netlink/list.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/netlink/list.h b/include/netlink/list.h
index c6876a77f76c..6eae2160327a 100644
--- a/include/netlink/list.h
+++ b/include/netlink/list.h
@@ -12,6 +12,8 @@
 #ifndef NETLINK_LIST_H_
 #define NETLINK_LIST_H_
 
+#include 
+
 struct nl_list_head
 {
struct nl_list_head *   next;
@@ -54,7 +56,7 @@ static inline int nl_list_empty(struct nl_list_head *head)
 
 #define nl_container_of(ptr, type, member) ({  \
 const typeof( ((type *)0)->member ) *__mptr = (ptr);   \
-(type *)( (char *)__mptr - ((size_t) &((type *)0)->member));})
+(type *) ((char *) __mptr - (offsetof(type, member)));})
 
 #define nl_list_entry(ptr, type, member) \
nl_container_of(ptr, type, member)

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


[OpenWrt-Devel] [PATCH libnl-tiny 3/3] remove never used err variable assignment disliked by scan-build

2019-11-06 Thread Petr Štetiar
scan-build from clang version 9 complains about following:

 nl.c:648:3: warning: Value stored to 'err' is never read
err = 0;
^ ~

Signed-off-by: Petr Štetiar 
---
 nl.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/nl.c b/nl.c
index 505965fd16aa..c875573bb05c 100644
--- a/nl.c
+++ b/nl.c
@@ -645,7 +645,6 @@ continue_reading:
NL_CB_CALL(cb, NL_CB_VALID, msg);
}
 skip:
-   err = 0;
hdr = nlmsg_next(hdr, &n);
}


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


[OpenWrt-Devel] [PATCH libnl-tiny 2/3] silence use after the free clang analyzer warning

2019-11-06 Thread Petr Štetiar
scan-build from clang version 9 complains about following:

 nl.c:507:9: warning: Use of memory after it is freed
while (nlmsg_ok(hdr, n)) {
   ^~~~

which seems to be impossible codepath as clang analyzer doesn't somehow
account properly nl_syserr2nlerr(errno) return value:

 } else {
free(msg.msg_control);
free(*buf);
return -nl_syserr2nlerr(errno);
 }

which should be always < 0, but analyzer is still checking for > 0 code
path as well for some reason. So in order to make the analyzer happy,
set the buf pointer to NULL explicitly and add assert to make it clear,
that this codepath should never happen.

Signed-off-by: Petr Štetiar 
---
 nl.c | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/nl.c b/nl.c
index 2649470f542f..505965fd16aa 100644
--- a/nl.c
+++ b/nl.c
@@ -400,7 +400,9 @@ int nl_recv(struct nl_sock *sk, struct sockaddr_nl *nla,
page_size = getpagesize() * 4;
 
iov.iov_len = page_size;
-   iov.iov_base = *buf = malloc(iov.iov_len);
+   iov.iov_base = *buf = calloc(1, iov.iov_len);
+   if (!*buf)
+   return -nl_syserr2nlerr(errno);
 
if (sk->s_flags & NL_SOCK_PASSCRED) {
msg.msg_controllen = CMSG_SPACE(sizeof(struct ucred));
@@ -421,6 +423,7 @@ retry:
} else {
free(msg.msg_control);
free(*buf);
+   *buf = NULL;
return -nl_syserr2nlerr(errno);
}
}
@@ -445,6 +448,7 @@ retry:
if (msg.msg_namelen != sizeof(struct sockaddr_nl)) {
free(msg.msg_control);
free(*buf);
+   *buf = NULL;
return -NLE_NOADDR;
}
 
@@ -463,6 +467,7 @@ retry:
 abort:
free(msg.msg_control);
free(*buf);
+   *buf = NULL;
return 0;
 }
 
@@ -501,6 +506,9 @@ continue_reading:
if (n <= 0)
return n;
 
+   /* make clang analyzer happy */
+   assert(n > 0 && buf);
+
NL_DBG(3, "recvmsgs(%p): Read %d bytes\n", sk, n);
 
hdr = (struct nlmsghdr *) buf;

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


[OpenWrt-Devel] [PATCH v2] ramips, mt7620: reproducible elecom-header uid/gid

2019-11-06 Thread Paul Spooren
The elecom-header renames the firmware image to v_0.0.0.bin, stores its
MD5 sum as v_0.0.0.md5 and tars both files again.

Both v_0.0.0 files are created as the build user making it harder to
reproduce.

This commit sets the owner/group of both files to root by adding extra
options to the final tar command.

Before:
0 buildbot   (101) buildbot   (102)  3932164 2019-11-05 14:43:22.00 
v_0.0.0.bin
0 buildbot   (101) buildbot   (102)   33 2019-11-05 14:43:22.00 
v_0.0.0.md5

After:
0 root (0) root (0)  3932164 2019-11-05 23:43:08.00 
v_0.0.0.bin
0 root (0) root (0)   33 2019-11-05 23:43:08.00 
v_0.0.0.md5

Signed-off-by: Paul Spooren 
---
v2: rename mt7520 to mt7620

 target/linux/ramips/image/mt7620.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/image/mt7620.mk 
b/target/linux/ramips/image/mt7620.mk
index bca2363699..88437a6904 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -13,7 +13,7 @@ define Build/elecom-header
) | mkhash md5 > $(KDIR)/v_0.0.0.md5
$(STAGING_DIR_HOST)/bin/tar -c \
$(if $(SOURCE_DATE_EPOCH),--mtime=@$(SOURCE_DATE_EPOCH)) \
-   -f $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5
+   --owner=0 --group=0 -f $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5
 endef
 
 define Device/aigale_ai-br100
-- 
2.24.0.rc1


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


Re: [OpenWrt-Devel] [PATCH] ramips, mt7520: reproducible elecom-header uid/gid

2019-11-06 Thread Paul Spooren

Oh thanks, updated...

On 11/5/19 10:01 PM, Bjørn Mork wrote:

subject typo.  I was curious about that new chip :-)


Bjørn


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


[OpenWrt-Devel] [PATCH] wolfssl: update to v4.2.0-stable

2019-11-06 Thread Eneas U de Queiroz
Many bugs were fixed--2 patches removed here.

This release of wolfSSL includes fixes for 5 security vulnerabilities,
including two CVEs with high/critical base scores:

- potential invalid read with TLS 1.3 PSK, including session tickets
- potential hang with ocspstaping2 (always enabled in openwrt)
- CVE-2019-15651: 1-byte overread when decoding certificate extensions
- CVE-2019-16748: 1-byte overread when checking certificate signatures
- DSA attack to recover DSA private keys

Signed-off-by: Eneas U de Queiroz 
---
This was run-tested on WRT3200ACM, using uhttpdi, uclient-fetch, curl &
wpad-wolfssl.

diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile
index 778754ffdc..3d2a56a97f 100644
--- a/package/libs/wolfssl/Makefile
+++ b/package/libs/wolfssl/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wolfssl
-PKG_VERSION:=4.1.0-stable
-PKG_RELEASE:=2
+PKG_VERSION:=4.2.0-stable
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
-PKG_HASH:=f0d630c3ddfeb692b8ae38cc739f47d5e9f0fb708662aa241ede0c42a5eb3dd8
+PKG_HASH:=3562af485c26cd7abe94d9404fbfc0c5c9bceb4aab29b81ebf5e6c2467507e12
 
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
@@ -44,7 +44,7 @@ define Package/libwolfssl
   MENU:=1
   PROVIDES:=libcyassl
   DEPENDS:=+WOLFSSL_HAS_DEVCRYPTO:kmod-cryptodev 
+WOLFSSL_HAS_AFALG:kmod-crypto-user
-  ABI_VERSION:=19
+  ABI_VERSION:=23
 endef
 
 define Package/libwolfssl/description
diff --git 
a/package/libs/wolfssl/patches/010-build-with-devcrypto-and-aesccm.patch 
b/package/libs/wolfssl/patches/010-build-with-devcrypto-and-aesccm.patch
deleted file mode 100644
index a9b8aee918..00
--- a/package/libs/wolfssl/patches/010-build-with-devcrypto-and-aesccm.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From e8e1d35744c68b165e172a687e870a549438bdf0 Mon Sep 17 00:00:00 2001
-From: Jacob Barthelmeh 
-Date: Tue, 13 Aug 2019 14:12:45 -0600
-Subject: [PATCH] build with devcrypto and aesccm
-
-
-diff --git a/configure.ac b/configure.ac
-index f943cc6ef..cf03e7f52 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -1096,6 +1096,10 @@ then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_CBC"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_AES"
-+if test "$ENABLED_AESCCM" = "yes"
-+then
-+AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT"
-+fi
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_HASH"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_HASH_RAW"
- ENABLED_DEVCRYPTO=yes
-@@ -1106,6 +1110,10 @@ then
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_AES"
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DEVCRYPTO_CBC"
-+if test "$ENABLED_AESCCM" = "yes"
-+then
-+AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT"
-+fi
- ENABLED_DEVCRYPTO=yes
- fi
- if test "$ENABLED_DEVCRYPTO" = "cbc"
-diff --git a/wolfcrypt/src/aes.c b/wolfcrypt/src/aes.c
-index beeae72a6..b583d03e9 100644
 a/wolfcrypt/src/aes.c
-+++ b/wolfcrypt/src/aes.c
-@@ -760,6 +760,14 @@
- #elif defined(WOLFSSL_DEVCRYPTO_AES)
- /* if all AES is enabled with devcrypto then tables are not needed */
- 
-+#if defined(HAVE_AESCCM)
-+static int wc_AesEncrypt(Aes* aes, const byte* inBlock, byte* outBlock)
-+{
-+wc_AesEncryptDirect(aes, outBlock, inBlock);
-+return 0;
-+}
-+#endif
-+
- #else
- 
- /* using wolfCrypt software implementation */
-@@ -1314,7 +1322,8 @@ static const word32 Td[4][256] = {
- };
- 
- 
--#if defined(HAVE_AES_CBC) || defined(WOLFSSL_AES_DIRECT)
-+#if (defined(HAVE_AES_CBC) && !defined(WOLFSSL_DEVCRYPTO_CBC)) \
-+  || defined(WOLFSSL_AES_DIRECT)
- static const byte Td4[256] =
- {
- 0x52U, 0x09U, 0x6aU, 0xd5U, 0x30U, 0x36U, 0xa5U, 0x38U,
-diff --git a/wolfcrypt/src/port/devcrypto/devcrypto_aes.c 
b/wolfcrypt/src/port/devcrypto/devcrypto_aes.c
-index 5c63421e2..d5061f364 100644
 a/wolfcrypt/src/port/devcrypto/devcrypto_aes.c
-+++ b/wolfcrypt/src/port/devcrypto/devcrypto_aes.c
-@@ -168,7 +168,7 @@ static int wc_DevCrypto_AesDirect(Aes* aes, byte* out, 
const byte* in,
- #endif
- 
- 
--#if defined(WOLFSSL_AES_DIRECT)
-+#if defined(WOLFSSL_AES_DIRECT) || defined(HAVE_AESCCM)
- void wc_AesEncryptDirect(Aes* aes, byte* out, const byte* in)
- {
- wc_DevCrypto_AesDirect(aes, out, in, AES_BLOCK_SIZE, COP_ENCRYPT);
diff --git 
a/package/libs/wolfssl/patches/020-build-fix-for-aesccm-devcrypto-cbc-wpas-and-afalg.patch
 
b/package/libs/wolfssl/patches/020-build-fix-for-aesccm-devcrypto-cbc-wpas-and-afalg.patch
deleted file mode 100644
index bb4c6fd04b..00
--- 
a/package/libs/wolfssl/patches/020-build-fix-for-aesccm-devcrypto-cbc-wpas-and-afalg.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 9fd38dc340c38dee6e5935da174f90270a63bfbf Mon Sep 17 00:00:00 2001
-From: Jacob Barthelmeh 
-Date: Fri, 30 Aug 2019 16:15:48 -0600
-Subject: [PATCH] build fix for aesccm + devc

[OpenWrt-Devel] [PATCH] kernel: add crypto_user mod to crypto-user pkg

2019-11-06 Thread Eneas U de Queiroz
This is needed to export crypto information to netfilter, allowing
the alt. afalg openssl engine to obtain information about the drivers
being used.

Signed-off-by: Eneas U de Queiroz 
---
Tested on WRT3200ACM, running openrt master.  For mvebu, this
increases the package size from 17,097 to 20,452.

diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk
index 5ce6795895..d95f234d93 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -786,6 +786,7 @@ define KernelPackage/crypto-user
   TITLE:=CryptoAPI userspace interface
   DEPENDS:=+kmod-crypto-hash +kmod-crypto-manager
   KCONFIG:= \
+   CONFIG_CRYPTO_USER \
CONFIG_CRYPTO_USER_API \
CONFIG_CRYPTO_USER_API_AEAD \
CONFIG_CRYPTO_USER_API_HASH \
@@ -796,8 +797,9 @@ define KernelPackage/crypto-user
$(LINUX_DIR)/crypto/algif_aead.ko \
$(LINUX_DIR)/crypto/algif_hash.ko \
$(LINUX_DIR)/crypto/algif_rng.ko \
-   $(LINUX_DIR)/crypto/algif_skcipher.ko
-  AUTOLOAD:=$(call AutoLoad,09,af_alg algif_aead algif_hash algif_rng 
algif_skcipher)
+   $(LINUX_DIR)/crypto/algif_skcipher.ko \
+   $(LINUX_DIR)/crypto/crypto_user.ko
+  AUTOLOAD:=$(call AutoLoad,09,af_alg algif_aead algif_hash algif_rng 
algif_skcipher crypto_user)
   $(call AddDepends/crypto)
 endef
 

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


[OpenWrt-Devel] ath79 QCA9563 channel 52+ device not supported

2019-11-06 Thread mail
Hi,

for the to-be-supported TP-Link Archer C6/A6 v2 US (QCA9563) there are reports 
that 5 GHz channels from 52 to 144 lead to "Device is not active" messages and 
5 GHz WiFi disabled:

https://github.com/openwrt/openwrt/pull/2470#issuecomment-550444362

Since 52 is the first DFS channel, I wonder whether this can be a DFS related 
problem. I have no experience with DFS at all, so I would be happy about any 
hints.

Best

Adrian


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Wiki going down for maintenance

2019-11-06 Thread tmo26
> On 6/11/2019 12:51, Stijn Tintel wrote:
> > Hi,
> >
> > As the server that is hosting the OpenWrt.org wiki is running out of
> > disk space, we will take it down to resize it.
> >
> And it's back.

Thanks for the upgrade!

Thomas


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


Re: [OpenWrt-Devel] [PATCH] ath79: add D-Link DIR-615 rev. E4

2019-11-06 Thread tmo26
Hi Paul,

> Support ported from ar71xx.
>
> Signed-off-by: Paul Fertser 

[...]

Can you please add installation instructions?

Thanks!

Thomas


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


Re: [OpenWrt-Devel] ath79 QCA9563 channel 52+ device not supported

2019-11-06 Thread David Bauer
Hello Adrian,

On 11/6/19 11:16 PM, m...@adrianschmutzler.de wrote:
> Hi,
> 
> for the to-be-supported TP-Link Archer C6/A6 v2 US (QCA9563) there are 
> reports that 5 GHz channels from 52 to 144 lead to "Device is not active" 
> messages and 5 GHz WiFi disabled:
> 
> https://github.com/openwrt/openwrt/pull/2470#issuecomment-550444362
> 
> Since 52 is the first DFS channel, I wonder whether this can be a DFS related 
> problem. I have no experience with DFS at all, so I would be happy about any 
> hints.
This has most likely nothing to do with the QCA9563, as it only handles 2.4 GHz
on the wireless side of things.

Have you set a valid regulatory domain / country for the 5GHz radio? Otherwise,
you won't be able to activate DFS channels, as the driver will need this
information to determine whether to use FCC or ETSI radar patterns.

Best wishes
David

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


Re: [OpenWrt-Devel] [PATCH 1/2] build: sysupgrade-tar alt-board= for legacy upgrades

2019-11-06 Thread Daniel Golle
Hi Jeff,

On Thu, Oct 24, 2019 at 08:57:52PM -0700, Jeff Kletsky wrote:
> From: Jeff Kletsky 
> 
> Targets that use nand_do_platform_check() can't use SUPPORTED_DEVICES
> as the check requires ./sysupgrade-legacy_boardname/CONTROL to be
> non-zero length as extracted from the tar file. Previously, only
> ./sysupgrade-new_boardname/CONTROL was present.
> 
> This prevents upgrade without --force from, for example, ar71xx to ath79
> 
> Add an optional alt-board= parameter to parsing of sysupgrade-tar that
> creates a directory at the expected location for the alt-board name,
> copying over the CONTROL file.
> 
> The contents of CONTROL are unmodified by this commit.
> 
> Careful ordering of the tar file is required as existing builds
> expect the kernel and root assets to be in the first directory
> returned by tar -tf that matches sysupgrade-*/
> 
> Run-tested-on: EA8300, GL-AR300M, GL-AR750S
> 
> Signed-off-by: Jeff Kletsky 
> ---
>  include/image-commands.mk |  1 +
>  scripts/sysupgrade-tar.sh | 40 +--
>  2 files changed, 35 insertions(+), 6 deletions(-)
> 
> diff --git a/include/image-commands.mk b/include/image-commands.mk
> index 5dfd6a2c2f..011e30a7e3 100644
> --- a/include/image-commands.mk
> +++ b/include/image-commands.mk
> @@ -321,6 +321,7 @@ endef
>  define Build/sysupgrade-tar
>   sh $(TOPDIR)/scripts/sysupgrade-tar.sh \
>   --board $(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)) \
> + --alt-boards "$(call param_get,alt-board,$(1))" \
>   --kernel $(call param_get_default,kernel,$(1),$(IMAGE_KERNEL)) \
>   --rootfs $(call param_get_default,rootfs,$(1),$(IMAGE_ROOTFS)) \
>   $@
> diff --git a/scripts/sysupgrade-tar.sh b/scripts/sysupgrade-tar.sh
> index b93b2584bb..5071a2f5f8 100755
> --- a/scripts/sysupgrade-tar.sh
> +++ b/scripts/sysupgrade-tar.sh
> @@ -3,11 +3,17 @@
>  . $TOPDIR/scripts/functions.sh
>  
>  board=""
> +alt_boards=""
>  kernel=""
>  rootfs=""
>  outfile=""
>  err=""
>  
> +do_exit() {
> + [ -d "$tmpdir" ] && rm -rf "$tmpdir"
> + exit $err
> +}
> +
>  while [ "$1" ]; do
>   case "$1" in
>   "--board")
> @@ -16,6 +22,12 @@ while [ "$1" ]; do
>   shift
>   continue
>   ;;
> + "--alt-boards")
> + alt_boards="$2"
> + shift
> + shift
> + continue
> + ;;
>   "--kernel")
>   kernel="$2"
>   shift
> @@ -39,7 +51,7 @@ while [ "$1" ]; do
>  done
>  
>  if [ ! -n "$board" -o ! -r "$kernel" -a  ! -r "$rootfs" -o ! "$outfile" ]; 
> then
> - echo "syntax: $0 [--board boardname] [--kernel kernelimage] [--rootfs 
> rootfs] out"
> + echo "syntax: $0 [--board boardname] [--alt-boards 'alt board list'] 
> [--kernel kernelimage] [--rootfs rootfs] out"
>   exit 1
>  fi
>  
> @@ -54,6 +66,7 @@ if [ -z "$tmpdir" ]; then
>  fi
>  
>  mkdir -p "${tmpdir}/sysupgrade-${board}"
> +
>  echo "BOARD=${board}" > "${tmpdir}/sysupgrade-${board}/CONTROL"
>  if [ -n "${rootfs}" ]; then
>   case "$( get_fs_type ${rootfs} )" in
> @@ -67,18 +80,33 @@ if [ -n "${rootfs}" ]; then
>  fi
>  [ -z "${kernel}" ] || cp "${kernel}" "${tmpdir}/sysupgrade-${board}/kernel"
>  
> -mtime=""
> +# "Legacy" nand_upgrade_tar() finds asset directory with
> +# $(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
> +# and doesn't use CONTROL at all; add the "real" files first
> +
> +tar_args="--directory ${tmpdir} --sort=name --owner=0 --group=0 
> --numeric-owner \
> +  -vf ${tmpdir}/sysupgrade.tar"
>  if [ -n "$SOURCE_DATE_EPOCH" ]; then
> - mtime="--mtime=@${SOURCE_DATE_EPOCH}"
> + tar_args="${tar_args} --mtime=@${SOURCE_DATE_EPOCH}"
>  fi
>  
> -(cd "$tmpdir"; tar --sort=name --owner=0 --group=0 --numeric-owner -cvf 
> sysupgrade.tar sysupgrade-${board} ${mtime})
> +tar -c $tar_args $(ls -A "${tmpdir}")
>  err="$?"
> +[ "$err" != 0 ] && do_exit
> +
> +for ab in $alt_boards ; do
> + [ "$ab" = "$board" ] && continue
> + mkdir "${tmpdir}/sysupgrade-${ab}/"
> + cp -vp "${tmpdir}/sysupgrade-${board}/CONTROL" 
> "${tmpdir}/sysupgrade-${ab}/"

Why not just add a symlink to the tar archive instead of a copy?
I know it doesn't matter much due to compress, jet I'd consider it a
more clean solution.

> + tar -r $tar_args "sysupgrade-${ab}/CONTROL"
> + err="$?"
> + [ "$err" != 0 ] && do_exit
> +done
> +
>  if [ -e "$tmpdir/sysupgrade.tar" ]; then
>   cp "$tmpdir/sysupgrade.tar" "$outfile"
>  else
>   err=2
>  fi
> -rm -rf "$tmpdir"
>  
> -exit $err
> +do_exit
> -- 
> 2.20.1
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

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


Re: [OpenWrt-Devel] [PATCH 19.07 02/14] hostapd: Allow CONFIG_IEEE80211W for all but mini variant

2019-11-06 Thread Hauke Mehrtens
On 11/6/19 12:46 PM, Petr Štetiar wrote:
> Daniel Golle  [2019-11-06 12:15:47]:
> 
> Hi,
> 
>>> Signed-off-by: Hauke Mehrtens 
>>> (cherry picked from commit 1d4df52c215874a5238ddef7bccf0139f7758c24)
>>
>> Looks like you forgot to `git add`, also in patch 3 and 4...
> 
> hm, thanks for spotting it, this is interesting as I've used `git
> cherry-pick -x hash`, I'll fix that.
> 
> -- ynezz

Some of these patches are already backported to the 19.07 branch.

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


Re: [OpenWrt-Devel] [PATCH 19.07 09/14] hostapd: Update to version 2.8 (2019-04-21)

2019-11-06 Thread Hauke Mehrtens
On 11/6/19 12:05 PM, Petr Štetiar wrote:
> From: Hauke Mehrtens 
> 
> This also syncs the configuration files with the default configuration
> files, but no extra options are activated or deactivated.
> 
> The mesh patches were partially merged into hostapd 2.8, the remaining
> patches were extracted from patchwork and are now applied by OpenWrt.
> The patches still have open questions which are not fixed by the author.
> They were taken from this page:
> https://patchwork.ozlabs.org/project/hostap/list/?series=62725&state=*
> 
> The changes in 007-mesh-apply-channel-attributes-before-running-Mesh.patch
> where first applied to hostapd, but later reverted in hostapd commit
> 3e949655ccc5 because they caused memory leaks.
> 
> The size of the ipkgs increase a bit (between 1.3% and 2.3%):
> 
> old 2018-12-02 (2.7):
> 283337 wpad-basic_2018-12-02-c2c6c01b-11_mipsel_24kc.ipk
> 252857 wpad-mini_2018-12-02-c2c6c01b-11_mipsel_24kc.ipk
> 417473 wpad-openssl_2018-12-02-c2c6c01b-11_mipsel_24kc.ipk
> 415105 wpad-wolfssl_2018-12-02-c2c6c01b-11_mipsel_24kc.ipk
> 
> new 2019-04-21 (2.8):
> 288264 wpad-basic_2019-04-21-63962824-1_mipsel_24kc.ipk
> 256188 wpad-mini_2019-04-21-63962824-1_mipsel_24kc.ipk
> 427475 wpad-openssl_2019-04-21-63962824-1_mipsel_24kc.ipk
> 423071 wpad-wolfssl_2019-04-21-63962824-1_mipsel_24kc.ipk
> 
> Signed-off-by: Hauke Mehrtens 
> Tested-by: Stefan Lippers-Hollmann 
> (cherry picked from commit 8af79550e6c280717660f66032d89d21007b15d2)

Please cherry-pick the update to hostapd 2.9 in addition to match what
we use in master.

Hauke

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


Re: [OpenWrt-Devel] [PATCH v2 19.07 00/12] bump hostap to latest stable release

2019-11-06 Thread Hauke Mehrtens
On 11/6/19 2:30 PM, Petr Štetiar wrote:
> Hi,
> 
> v1 patches were somehow screwed probably due to the rebase, so this v2 series
> is done from scratch again. Previous cover letter[1] for reference, and Git
> branch[2] with all the patches.
> 
> 1. https://patchwork.ozlabs.org/cover/1190274/
> 2. 
> https://git.openwrt.org/?p=openwrt/staging/ynezz.git;a=shortlog;h=refs/heads/upstream/19.07/hostapd-backports
> 
> Eneas U de Queiroz (1):
>   hostapd: adjust removed wolfssl options
> 
> Hauke Mehrtens (6):
>   hostapd: Update to version 2.8 (2019-04-21)
>   hostapd: Update to version 2.9 (2019-08-08)
>   hostapd: use config option CONFIG_NO_LINUX_PACKET_SOCKET_WAR
>   hostapd: Remove unneeded patch
>   hostapd: use getrandom syscall
>   hostapd: Add mesh support for wpad full
> 
> Jo-Philipp Wich (2):
>   hostapd: fix OWE settings in client mode
>   hostapd: mirror ieee80211w ap mode defaults in station mode
> 
> Kyle Copperfield (1):
>   hostapd: add IEEE 802.11k support
> 
> Leon M. George (2):
>   hostapd: revert signature change in patch
>   hostapd: declare struct wpa_bss early
> 

Acked-by: Hauke Mehrtens 



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH uci 2/2] build: Add -Wclobbered to detect problems with longjmp

2019-11-06 Thread Hauke Mehrtens
On 11/5/19 1:27 AM, Petr Štetiar wrote:
> Hi,
> 
> Hauke Mehrtens  [2019-11-01 17:06:34]:
> 
>> +ADD_DEFINITIONS(-Os -Wall -Werror -Wclobbered --std=gnu99 -g3 -I. 
>> -DUCI_PREFIX="${CMAKE_INSTALL_PREFIX}")
> 
> is there any reason to not use -Wextra directly?

I was looking on how we could prevent to have a similar problem as the
one described in CVE-2019-15513 and found this warning which should have
warned us about this problem. First I was trying to understand this CVE
and then I wanted to learn from it to prevent such problems next time.

I support adding -Wextra it is even better.

> 
>  list.c:140:11: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  file.c:572:51: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  file.c:850:15: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  file.c:865:15: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  delta.c:199:6: error: this statement may fall through 
> [-Werror=implicit-fallthrough=]
>  parse.c:80:12: error: this statement may fall through 
> [-Werror=implicit-fallthrough=]
>  parse.c:81:12: error: this statement may fall through 
> [-Werror=implicit-fallthrough=]
>  file.c:572:51: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  file.c:850:15: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  file.c:865:15: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  delta.c:199:6: error: this statement may fall through 
> [-Werror=implicit-fallthrough=]
>  parse.c:80:12: error: this statement may fall through 
> [-Werror=implicit-fallthrough=]
>  parse.c:81:12: error: this statement may fall through 
> [-Werror=implicit-fallthrough=]
>  ucimap.c:146:16: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  ucimap.c:151:17: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  ucimap.c:243:34: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  ucimap.c:247:9: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  ucimap.c:254:39: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  ucimap.c:258:9: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  ucimap.c:285:34: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  ucimap.c:363:17: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  ucimap.c:563:12: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  ucimap.c:753:18: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
>  ucimap.c:879:17: error: comparison between signed and unsigned integer 
> expressions [-Werror=sign-compare]
> 
> Yousong Zhou  [2019-11-04 11:29:05]:
> 
>> The -Wclobber check can produce false-positives right?
> 
> I didn't looked deeper, but GCC 6,7,8,9 on x86/64 reports following:
> 
>  list.c:626:21: error: variable ‘prev’ might be clobbered by ‘longjmp’ or 
> ‘vfork’ [-Werror=clobbered]
>   626 |  struct uci_option *prev = NULL;
>   | ^~~~
> 
>  list.c:627:14: error: variable ‘value2’ might be clobbered by ‘longjmp’ or 
> ‘vfork’ [-Werror=clobbered]
>   627 |  const char *value2 = NULL;
>   |  ^~

I think I also saw these problems in my manual review, but the
-Wclobbered did not complain about them for me with gcc 8.3 on MIPS.

> 
> but clang 9,10 on x86/64 doesn't.
> 
> -- ynezz
> 

Hauke



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/2] build: sysupgrade-tar alt-board= for legacy upgrades

2019-11-06 Thread Jeff Kletsky

On 11/6/19 2:47 PM, Daniel Golle wrote:


Hi Jeff,

On Thu, Oct 24, 2019 at 08:57:52PM -0700, Jeff Kletsky wrote:

From: Jeff Kletsky 

Targets that use nand_do_platform_check() can't use SUPPORTED_DEVICES
as the check requires ./sysupgrade-legacy_boardname/CONTROL to be
non-zero length as extracted from the tar file. Previously, only
./sysupgrade-new_boardname/CONTROL was present.

[...]

+
+for ab in $alt_boards ; do
+   [ "$ab" = "$board" ] && continue
+   mkdir "${tmpdir}/sysupgrade-${ab}/"
+   cp -vp "${tmpdir}/sysupgrade-${board}/CONTROL" 
"${tmpdir}/sysupgrade-${ab}/"

Why not just add a symlink to the tar archive instead of a copy?
I know it doesn't matter much due to compress, jet I'd consider it a
more clean solution.



Thanks for taking a look at this!

If/when I pick it up again, I'll definitely re-check if symlinks can
be used.

It's been a while since I authored this, but my recollection is that
since the tar is not extracted "in whole" (to preserve space,
I assume), there is no target of the symlink to reference.

From: package/base-files/files/lib/upgrade/nand.sh (master)

nand_do_platform_check() {
    local board_name="$1"
    local tar_file="$2"
    local control_length=`(tar xf $tar_file 
sysupgrade-$board_name/CONTROL -O | wc -c) 2> /dev/null`

    local file_type="$(identify $2)"

    [ "$control_length" = 0 -a "$file_type" != "ubi" -a 
"$file_type" != "ubifs" ] && {

    echo "Invalid sysupgrade file."
    return 1
    }

    return 0
}


As this was primarily to handle upgrades from older firmware versions,
the upgrade tar needs to be compatible with previous code, which
`git blame` shows as commit 3dca5a158d, SVN-Revision: 41222, 2014-06-16


Jeff



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


Re: [OpenWrt-Devel] [PATCH] ath79: add D-Link DIR-615 rev. E4

2019-11-06 Thread Paul Fertser
Hello Thomas,

On Wed, Nov 06, 2019 at 11:31:23PM +0100, tm...@gmx.de wrote:
> > Support ported from ar71xx.
> >
> > Signed-off-by: Paul Fertser 
> 
> [...]
> 
> Can you please add installation instructions?

Please notice that this patch is WiP and some additional changes are
to be introduced in v2.

I would expect -factory.bin to be flashable by vendor
firmware. Closely looking at hexdump -C doesn't reveal any differences
between generated images by existing support in ar71xx target and this
ath79 port. Upgrading from OpenWrt is possible with sysupgrade. TFTP
to uboot doesn't work for me (I receive ARP request and send replies
back but they're apparently never heard) but with "loady" I'm able to
bootm an initramfs image and then sysupgrade from it.

I see there's some http server mentioned in the wiki article, haven't
tried it yet (and I can't understand what "simple" web browser it
talks about, probably there should be a curl command instead?), and
in my opinion it's ok to wait for a few minutes for slow serial upload
as it's to be performed only once anyway but if you can figure a
reliable http method it would be a nice alternative.

Where would you like to have the additional installation instructions,
on the wiki or in the commit message itself?

BTW, as a device user, what's your opinion regarding mac and lp
partitions, do you consider keeping them wasteful or not?

Thank you!
-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

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