Re: [OpenWrt-Devel] [PATCH 2/2] [RFC] kernel: bump 4.14 to 4.14.54 for 18.06

2018-07-12 Thread Stijn Segers


Op wo, 11 jul 2018 om 10:31 , schreef Koen Vandeputte 
:



On 2018-07-11 10:11, Kevin Darbyshire-Bryant wrote:
>
> Really not convinced I agree with the "patch 335 removes the whole 
code block where that one line changed in upstream”.  Did a refresh 
myself, several times, and patch 335 is a right confusing pain in the 
backside.  I think the block in question should look like:

>
> @@ -4619,38 +4605,37 @@ static int nf_tables_dump_obj(struct sk_
>rcu_read_lock();
>cb->seq = net->nft.base_seq;
>
> -  list_for_each_entry_rcu(afi, >nft.af_info, list) {
> -  if (family != NFPROTO_UNSPEC && family != afi->family)
> +  list_for_each_entry_rcu(table, >nft.tables, list) {
> +  if (family != NFPROTO_UNSPEC && family != table->afi->family)
>continue;
>
> -  list_for_each_entry_rcu(table, >tables, list) {
> -  list_for_each_entry_rcu(obj, >objects, list) {
> -  if (!nft_is_active(net, obj))
> -  goto cont;
> -  if (idx < s_idx)
> -  goto cont;
> -  if (idx > s_idx)
> -  memset(>args[1], 0,
> - sizeof(cb->args) - 
sizeof(cb->args[0]));
> -  if (filter && filter->table &&
> -  strcmp(filter->table, table->name))
> -  goto cont;
> -  if (filter &&
> -  filter->type != NFT_OBJECT_UNSPEC &&
> -  obj->ops->type->type != filter->type)
> -  goto cont;
> +  list_for_each_entry_rcu(obj, >objects, list) {
> +  if (!nft_is_active(net, obj))
> +  goto cont;
> +  if (idx < s_idx)
> +  goto cont;
> +  if (idx > s_idx)
> +  memset(>args[1], 0,
> + sizeof(cb->args) - sizeof(cb->args[0]));
> +  if (filter && filter->table &&
> +  strcmp(filter->table, table->name))
> +  goto cont;
> +  if (filter &&
> +  filter->type != NFT_OBJECT_UNSPEC &&
> +  obj->ops->type->type != filter->type)
> +  goto cont;
>
> -if (nf_tables_fill_obj_info(skb, net, 
NETLINK_CB(cb->skb).portid,

> -  cb->nlh->nlmsg_seq,
> -  NFT_MSG_NEWOBJ,
> -  NLM_F_MULTI | 
NLM_F_APPEND,
> -  afi->family, table, obj, 
reset) < 0)
> -  goto done;
> +			if (nf_tables_fill_obj_info(skb, net, 
NETLINK_CB(cb->skb).portid,

> +  cb->nlh->nlmsg_seq,
> +  NFT_MSG_NEWOBJ,
> +  NLM_F_MULTI | NLM_F_APPEND,
> +  table->afi->family, table,
> +  obj, reset) < 0)
> +  goto done;
>
> -  nl_dump_check_consistent(cb, nlmsg_hdr(skb));
> -cont:
> -  idx++;
> -  }
> +  nl_dump_check_consistent(cb, nlmsg_hdr(skb));
> +  cont:
> +  idx++;
>}
>}
>   done:
>
> There are a couple of similar blocks, which have probably confused 
me anyway.

>
> Overall this one patch in the refresh makes me distinctly 
uncomfortable.

>
>
+1 to get this cleaned up properly, but I would propose to do it
separately and after the kernel bump patch.

Koen


Hi Koen,

Thanks, you beat me to it - thank you.

Stijn


___
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


[OpenWrt-Devel] [PATCH 2/2] hostapd: fix conflicts hell

2018-07-12 Thread Mathias Kresin
Add each variant to the matching PROVIDERS variables after evaluating
the respective hostapd*, wpad* and wpa* variant.

Each package providing the same feature will automatically conflict with
all prior packages providing the same feature.

This way we can handle the conflicts automatically without introducing
recursive dependencies.

Signed-off-by: Mathias Kresin 
---
 package/network/services/hostapd/Makefile | 142 ++
 1 file changed, 47 insertions(+), 95 deletions(-)

diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index 5d53cb0..af92064 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -32,20 +32,10 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_DRIVER_11N_SUPPORT \
CONFIG_DRIVER_11AC_SUPPORT \
 
-WPAD_PROVIDERS:=wpad-mini wpad wpad-openssl wpad-wolfssl \
-   wpad-mesh-openssl wpad-mesh-wolfssl
-
-SUPPLICANT_ONLY_PROVIDERS:=wpa-supplicant-mini wpa-supplicant-p2p \
-  wpa-supplicant wpa-supplicant-openssl 
wpa-supplicant-wolfssl \
-  wpa-supplicant-mesh-openssl 
wpa-supplicant-mesh-wolfssl
-
-HOSTAPD_ONLY_PROVIDERS:=hostapd-mini hostapd hostapd-openssl hostapd-wolfssl
-
 EAPOL_TEST_PROVIDERS:=eapol-test eapol-test-openssl eapol-test-wolfssl
 
-SUPPLICANT_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS)
-HOSTAPD_PROVIDERS:=$(WPAD_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS)
-ANY_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS) 
$(HOSTAPD_ONLY_PROVIDERS)
+SUPPLICANT_PROVIDERS:=
+HOSTAPD_PROVIDERS:=
 
 LOCAL_TYPE=$(strip \
$(if $(findstring wpad,$(BUILD_VARIANT)),wpad, \
@@ -153,10 +143,12 @@ define Package/hostapd/Default
   URL:=http://hostap.epitest.fi/
   DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
   PROVIDES:=hostapd
+  CONFLICTS:=$(HOSTAPD_PROVIDERS)
+  HOSTAPD_PROVIDERS+=$(1)
 endef
 
 define Package/hostapd
-$(call Package/hostapd/Default)
+$(call Package/hostapd/Default,$(1))
   TITLE+= (full)
   VARIANT:=full-internal
 endef
@@ -167,49 +159,33 @@ define Package/hostapd/description
 endef
 
 define Package/hostapd-openssl
-$(call Package/hostapd/Default)
+$(call Package/hostapd/Default,$(1))
   TITLE+= (full)
   VARIANT:=full-openssl
   DEPENDS+=+libopenssl
-  CONFLICTS:=$(filter-out hostapd-openssl ,$(HOSTAPD_ONLY_PROVIDERS))
 endef
 
 Package/hostapd-openssl/description = $(Package/hostapd/description)
 
 define Package/hostapd-wolfssl
-$(call Package/hostapd/Default)
+$(call Package/hostapd/Default,$(1))
   TITLE+= (full)
   VARIANT:=full-wolfssl
   DEPENDS+=+libwolfssl
-  CONFLICTS:=$(filter-out hostapd-openssl ,$(filter-out hostapd-wolfssl 
,$(HOSTAPD_ONLY_PROVIDERS)))
 endef
 
 Package/hostapd-wolfssl/description = $(Package/hostapd/description)
 
 define Package/hostapd-mini
-$(call Package/hostapd/Default)
+$(call Package/hostapd/Default,$(1))
   TITLE+= (WPA-PSK only)
   VARIANT:=mini
-  CONFLICTS:=$(filter-out hostapd-wolfssl ,$(filter-out hostapd-openssl 
,$(filter-out hostapd-mini ,$(HOSTAPD_ONLY_PROVIDERS
 endef
 
 define Package/hostapd-mini/description
  This package contains a minimal IEEE 802.1x/WPA Authenticator (WPA-PSK only).
 endef
 
-define Package/hostapd-utils
-  SECTION:=net
-  CATEGORY:=Network
-  TITLE:=IEEE 802.1x Authenticator (utils)
-  URL:=http://hostap.epitest.fi/
-  DEPENDS:=@$(subst $(space),||,$(foreach 
pkg,$(HOSTAPD_PROVIDERS),PACKAGE_$(pkg)))
-endef
-
-define Package/hostapd-utils/description
- This package contains a command line utility to control the
- IEEE 802.1x/WPA/EAP/RADIUS Authenticator.
-endef
-
 
 define Package/wpad/Default
   SECTION:=net
@@ -218,20 +194,15 @@ define Package/wpad/Default
   DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
   URL:=http://hostap.epitest.fi/
   PROVIDES:=hostapd wpa-supplicant
+  CONFLICTS:=$(HOSTAPD_PROVIDERS) $(SUPPLICANT_PROVIDERS)
+  HOSTAPD_PROVIDERS+=$(1)
+  SUPPLICANT_PROVIDERS+=$(1)
 endef
 
 define Package/wpad
-$(call Package/wpad/Default)
+$(call Package/wpad/Default,$(1))
   TITLE+= (full)
   VARIANT:=wpad-full-internal
-  CONFLICTS:=$(filter-out wpad-mesh-wolfssl,\
- $(filter-out wpad-mesh-openssl ,\
- $(filter-out wpad-openssl ,\
- $(filter-out wpad-wolfssl ,\
- $(filter-out wpad-wolfssl ,\
- $(filter-out wpad ,\
- $(ANY_PROVIDERS)\
- ))
 endef
 
 define Package/wpad/description
@@ -240,37 +211,27 @@ define Package/wpad/description
 endef
 
 define Package/wpad-openssl
-$(call Package/wpad/Default)
+$(call Package/wpad/Default,$(1))
   TITLE+= (full)
   VARIANT:=wpad-full-openssl
   DEPENDS+=+libopenssl
-  CONFLICTS:=$(filter-out wpad-mesh-wolfssl,\
- $(filter-out wpad-mesh-openssl ,\
- $(filter-out wpad-openssl ,\
- $(ANY_PROVIDERS
 endef
 
 Package/wpad-openssl/description = $(Package/wpad/description)
 
 define Package/wpad-wolfssl
-$(call 

[OpenWrt-Devel] [PATCH 1/2] hostapd: cleanup package definition

2018-07-12 Thread Mathias Kresin
Move common variables and/or values to the package (variant) default.
Add additional values in variant packages if necessary. Remove further
duplicates by introducing new templates.

Remove the ANY_[HOSTAPD|SUPPLICANT_PROVIDERS]_PROVIDERS. The are the
same as the variables without the any prefix. No need to maintain both
variables.

Signed-off-by: Mathias Kresin 
---
 package/network/services/hostapd/Makefile | 88 ---
 1 file changed, 45 insertions(+), 43 deletions(-)

diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index cf0b005..5d53cb0 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -45,8 +45,6 @@ EAPOL_TEST_PROVIDERS:=eapol-test eapol-test-openssl 
eapol-test-wolfssl
 
 SUPPLICANT_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS)
 HOSTAPD_PROVIDERS:=$(WPAD_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS)
-ANY_SUPPLICANT_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS)
-ANY_HOSTAPD_PROVIDERS:=$(WPAD_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS)
 ANY_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS) 
$(HOSTAPD_ONLY_PROVIDERS)
 
 LOCAL_TYPE=$(strip \
@@ -147,12 +145,14 @@ endif
 
 DRV_DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny
 
+
 define Package/hostapd/Default
   SECTION:=net
   CATEGORY:=Network
   TITLE:=IEEE 802.1x Authenticator
   URL:=http://hostap.epitest.fi/
   DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
+  PROVIDES:=hostapd
 endef
 
 define Package/hostapd
@@ -161,30 +161,29 @@ $(call Package/hostapd/Default)
   VARIANT:=full-internal
 endef
 
+define Package/hostapd/description
+ This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
+ Authenticator.
+endef
+
 define Package/hostapd-openssl
 $(call Package/hostapd/Default)
   TITLE+= (full)
   VARIANT:=full-openssl
   DEPENDS+=+libopenssl
   CONFLICTS:=$(filter-out hostapd-openssl ,$(HOSTAPD_ONLY_PROVIDERS))
-  PROVIDES:=hostapd
 endef
 
+Package/hostapd-openssl/description = $(Package/hostapd/description)
+
 define Package/hostapd-wolfssl
 $(call Package/hostapd/Default)
   TITLE+= (full)
   VARIANT:=full-wolfssl
   DEPENDS+=+libwolfssl
   CONFLICTS:=$(filter-out hostapd-openssl ,$(filter-out hostapd-wolfssl 
,$(HOSTAPD_ONLY_PROVIDERS)))
-  PROVIDES:=hostapd
-endef
-
-define Package/hostapd/description
- This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
- Authenticator.
 endef
 
-Package/hostapd-openssl/description = $(Package/hostapd/description)
 Package/hostapd-wolfssl/description = $(Package/hostapd/description)
 
 define Package/hostapd-mini
@@ -192,18 +191,18 @@ $(call Package/hostapd/Default)
   TITLE+= (WPA-PSK only)
   VARIANT:=mini
   CONFLICTS:=$(filter-out hostapd-wolfssl ,$(filter-out hostapd-openssl 
,$(filter-out hostapd-mini ,$(HOSTAPD_ONLY_PROVIDERS
-  PROVIDES:=hostapd
 endef
 
 define Package/hostapd-mini/description
  This package contains a minimal IEEE 802.1x/WPA Authenticator (WPA-PSK only).
 endef
 
-
 define Package/hostapd-utils
-  $(call Package/hostapd/Default)
-  TITLE+= (utils)
-  DEPENDS:=@$(subst $(space),||,$(foreach 
pkg,$(ANY_HOSTAPD_PROVIDERS),PACKAGE_$(pkg)))
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=IEEE 802.1x Authenticator (utils)
+  URL:=http://hostap.epitest.fi/
+  DEPENDS:=@$(subst $(space),||,$(foreach 
pkg,$(HOSTAPD_PROVIDERS),PACKAGE_$(pkg)))
 endef
 
 define Package/hostapd-utils/description
@@ -211,6 +210,7 @@ define Package/hostapd-utils/description
  IEEE 802.1x/WPA/EAP/RADIUS Authenticator.
 endef
 
+
 define Package/wpad/Default
   SECTION:=net
   CATEGORY:=Network
@@ -234,6 +234,11 @@ $(call Package/wpad/Default)
  ))
 endef
 
+define Package/wpad/description
+ This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
+ Authenticator and Supplicant
+endef
+
 define Package/wpad-openssl
 $(call Package/wpad/Default)
   TITLE+= (full)
@@ -245,6 +250,8 @@ $(call Package/wpad/Default)
  $(ANY_PROVIDERS
 endef
 
+Package/wpad-openssl/description = $(Package/wpad/description)
+
 define Package/wpad-wolfssl
 $(call Package/wpad/Default)
   TITLE+= (full)
@@ -257,12 +264,6 @@ $(call Package/wpad/Default)
  $(ANY_PROVIDERS)
 endef
 
-define Package/wpad/description
- This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
- Authenticator and Supplicant
-endef
-
-Package/wpad-openssl/description = $(Package/wpad/description)
 Package/wpad-wolfssl/description = $(Package/wpad/description)
 
 define Package/wpad-mini
@@ -276,37 +277,43 @@ define Package/wpad-mini/description
  This package contains a minimal IEEE 802.1x/WPA Authenticator and Supplicant 
(WPA-PSK only).
 endef
 
-define Package/wpad-mesh-openssl
+define Package/wpad-mesh
 $(call Package/wpad/Default)
   TITLE+= (with 802.11s mesh and SAE support)
-  DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN) +libopenssl
+  DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
+  

[OpenWrt-Devel] [PATCH] metadata: express conflicts in a single line

2018-07-12 Thread Mathias Kresin
Due to the use of dependencies to express conflicts, a package which
conflicts with multiple other packages (variants) is indented one level
for each conflict:

< > pkg-variant-a
< >   pkg-variant-b (conflicts pkg-variant-a)
< > pkg-variant-c (conflicts pkg-variant-a && pkg-variant-b)

Express conflicts in a single line by using the logical AND operator to
fix the visual glitch.

Signed-off-by: Mathias Kresin 
---
 scripts/package-metadata.pl | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index 53bb45a..3e5d8f7 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -243,12 +243,20 @@ sub mconf_conflicts {
my $pkgname = shift;
my $depends = shift;
my $res = "";
+   my @conflics;
 
foreach my $depend (@$depends) {
next unless $package{$depend};
-   $res .= "\t\tdepends on m || (PACKAGE_$depend != y)\n";
+   push @conflics, "PACKAGE_$depend != y";
}
-   return $res;
+
+   if (!@conflics) {
+   return $res;
+   }
+
+   $res = join(" && ",@conflics);
+
+   return "\t\tdepends on m || ($res)\n";
 }
 
 sub print_package_config_category($) {
-- 
2.7.4


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


Re: [OpenWrt-Devel] [PATCH] dropbear: close all active clients on shutdown

2018-07-12 Thread John Crispin



On 12/07/18 18:18, Luis Araneda wrote:

Hi John,

On Thu, Jul 12, 2018 at 2:49 AM John Crispin  wrote:

does this break sysupgrade when run via ssh ?

No, it works as expected, as sysupgrade is done in stages now.

I just tested with an Asus RT-AC58U connected with a serial console
and an SSH connection.

The sysupgrade was done though the SSH connection:

root@OpenWrt:~# sysupgrade 
/tmp/openwrt-ipq40xx-asus_rt-ac58u-squashfs-sysupgrade.bin
Saving config files...
Commencing upgrade. Closing all shell sessions.
Connection to 192.168.1.1 closed by remote host.
Connection to 192.168.1.1 closed.

The output from the serial console confirms that the sysupgrade was
done correctly:

Watchdog handover: fd=3
- watchdog -
killall: telnetd: no process killed
Sending TERM to remaining processes ... uhttpd nlbwmon ubusd collectd dnsmasq 
hostapd hostapd ntpd logd rpcd netifd oe
Sending KILL to remaining processes ...
Switching to ramdisk...
Performing system upgrade...

(removed some lines no improve readability)

Thanks,

Luis Araneda.


Hi Luis,
thanks for the elaborate test report
    John

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


Re: [OpenWrt-Devel] [PATCH] mtd: skip bad blocks when writing

2018-07-12 Thread Mathias Kresin

18.05.2018 17:25, Lev:

No empty commit message please. Explain what you are doing and why you 
are doing it. If necessary, explain why you are doing it this way.


Can anything else than NAND flash have bad blocks? If no, are we still 
using jffs2 on top of NAND anywhere.



---
  package/system/mtd/src/jffs2.c | 10 ++
  1 file changed, 10 insertions(+)

diff --git a/package/system/mtd/src/jffs2.c b/package/system/mtd/src/jffs2.c
index b432f64ac0..5bf3eec328 100644
--- a/package/system/mtd/src/jffs2.c
+++ b/package/system/mtd/src/jffs2.c
@@ -308,6 +308,16 @@ int mtd_write_jffs2(const char *mtd, const char *filename, 
const char *dir)
for(;;) {
struct jffs2_unknown_node *node = (struct jffs2_unknown_node *) 
buf;
  
+		while (mtd_block_is_bad(outfd, mtdofs) && (mtdofs < mtdsize)) {

+   if (!quiet)
+   fprintf(stderr, "\nSkipping bad block at 0x%08x   
", mtdofs);
+
+   mtdofs += erasesize;
+
+   /* Move the file pointer along over the bad block. */
+   lseek(outfd, erasesize, SEEK_CUR);
+   }
+
if (read(outfd, buf, erasesize) != erasesize) {
fdeof = 1;
break;



Definitely a matter of taste, but I prefer to move the overflow check 
out of the while condition + an error message if all blocks are bad.


Furthermore, shouldn't we return an error if all blocks are bad, instead 
of processing the further code (goto done;)?


Basically something like:

/* get the first not bad block */
if (mtd_can_have_bb(outfd))
while (mtd_block_isbad(outfd, mtdofs)) {
if (!quiet)
fprintf(stderr, "Skipping bad block at 0x%08x\n", mtdofs);

mtdofs += erasesize;

if (mtdofs < mtdsize) {
fprintf(stderr, "Failed to find a non-bad block\"n);
err = The code isn't tested and copied from one of my kernel patches I'm 
working on. Might need some changes due to kernel <> userspace differences.


I moved the newline in the fprintf to the end of the string and added a 
check if our mtd can have bad blocks at all.


Mathias

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


Re: [OpenWrt-Devel] Good suggestion for Openwrt router board with 2x mini pci-express

2018-07-12 Thread Michael Richardson
David Johnson  wrote:
> It seems its quite hard to find a board that is fully supported by
> openwrt that has 2x mini pci-express, 2x ethernet ports (WAN, LAN), >
> 64M flash

The Turris Omnia has three mini pci-express. Two have radios already in them, 
and
the third is open.   I have booted the openwrt 18.x build on it now, and so
far it seems fine.

> I want to plug in ath10k supported 802.11ac mini pci-e radios

I can't recall which radio is already there.
Not cheap though.



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


Re: [OpenWrt-Devel] [PATCH] dropbear: close all active clients on shutdown

2018-07-12 Thread Luis Araneda
Hi John,

On Thu, Jul 12, 2018 at 2:49 AM John Crispin  wrote:
> does this break sysupgrade when run via ssh ?

No, it works as expected, as sysupgrade is done in stages now.

I just tested with an Asus RT-AC58U connected with a serial console
and an SSH connection.

The sysupgrade was done though the SSH connection:
> root@OpenWrt:~# sysupgrade 
> /tmp/openwrt-ipq40xx-asus_rt-ac58u-squashfs-sysupgrade.bin
> Saving config files...
> Commencing upgrade. Closing all shell sessions.
> Connection to 192.168.1.1 closed by remote host.
> Connection to 192.168.1.1 closed.

The output from the serial console confirms that the sysupgrade was
done correctly:
> Watchdog handover: fd=3
> - watchdog -
> killall: telnetd: no process killed
> Sending TERM to remaining processes ... uhttpd nlbwmon ubusd collectd dnsmasq 
> hostapd hostapd ntpd logd rpcd netifd oe
> Sending KILL to remaining processes ...
> Switching to ramdisk...
> Performing system upgrade...
(removed some lines no improve readability)

Thanks,

Luis Araneda.

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


Re: [OpenWrt-Devel] Good suggestion for Openwrt router board with 2x mini pci-express

2018-07-12 Thread Nicolas Pace
You will soon also count with the LibreRouter:
http://librerouter.org/

On 2018-07-12 09:31 AM, David Johnson wrote:
> Thanks all for the quick response
> 
> Turns out I can do with one PCIe if the board has built in WiFi and I
> need power and form factor to be pretty low. So I'm going with
> 
> COMPEX WP J563
> http://shop.compex.com.sg/wpj563.html
> 
> Looks pretty good for $70 and openwrt supported hardware table shows
> that its supported
> 
> ___
> 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] Good suggestion for Openwrt router board with 2x mini pci-express

2018-07-12 Thread David Johnson
Thanks all for the quick response

Turns out I can do with one PCIe if the board has built in WiFi and I
need power and form factor to be pretty low. So I'm going with

COMPEX WP J563
http://shop.compex.com.sg/wpj563.html

Looks pretty good for $70 and openwrt supported hardware table shows
that its supported

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


[OpenWrt-Devel] [PATCH] package/iperf: fix build for non-ipv6 builds

2018-07-12 Thread Alexander Couzens
Signed-off-by: Alexander Couzens 
---
 package/network/utils/iperf/Makefile  |  6 +++-
 .../patches/0001-fix-non-ipv6-builds.patch| 36 +++
 2 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 
package/network/utils/iperf/patches/0001-fix-non-ipv6-builds.patch

diff --git a/package/network/utils/iperf/Makefile 
b/package/network/utils/iperf/Makefile
index 606ba218def7..dd9ade95bf3f 100644
--- a/package/network/utils/iperf/Makefile
+++ b/package/network/utils/iperf/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iperf
 PKG_VERSION:=2.0.11
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_HASH:=b7d650d07c6bb0e357b5938a20e4ac33876012fddb952299c5d321e6958da5d2
@@ -40,6 +40,10 @@ endef
 TARGET_CFLAGS += -D_GNU_SOURCE
 CONFIGURE_ARGS += --disable-multicast
 
+ifeq ($(CONFIG_IPV6),)
+   CONFIGURE_ARGS += --disable-ipv6
+endif
+
 CONFIGURE_VARS += CXXFLAGS="CXXFLAGS -fno-rtti"
 CONFIGURE_VARS += LIBS="-lpthread -lm"
 
diff --git a/package/network/utils/iperf/patches/0001-fix-non-ipv6-builds.patch 
b/package/network/utils/iperf/patches/0001-fix-non-ipv6-builds.patch
new file mode 100644
index ..a6a51570f48e
--- /dev/null
+++ b/package/network/utils/iperf/patches/0001-fix-non-ipv6-builds.patch
@@ -0,0 +1,36 @@
+Index: iperf-2.0.11/src/Listener.cpp
+===
+--- iperf-2.0.11.orig/src/Listener.cpp
 iperf-2.0.11/src/Listener.cpp
+@@ -670,6 +670,7 @@ int Listener::L2_setup (void) {
+ 
+ // Now optimize packet flow up the raw socket
+ // Establish the flow BPF to forward up only "connected" packets to this 
raw socket
++#ifdef HAVE_IPV6
+ if (l->sa_family == AF_INET6) {
+   struct in6_addr *v6peer = SockAddr_get_in6_addr(>peer);
+   struct in6_addr *v6local = SockAddr_get_in6_addr(>local);
+@@ -682,6 +683,9 @@ int Listener::L2_setup (void) {
+   WARN_errno( rc == SOCKET_ERROR, "l2 v4in6 connect ip bpf");
+   }
+ } else {
++#else
++{
++#endif
+   rc = SockAddr_v4_Connect_BPF(server->mSock, ((struct sockaddr_in 
*)(l))->sin_addr.s_addr, ((struct sockaddr_in *)(p))->sin_addr.s_addr, ((struct 
sockaddr_in *)(l))->sin_port, ((struct sockaddr_in *)(p))->sin_port);
+   WARN_errno( rc == SOCKET_ERROR, "l2 connect ip bpf");
+ }
+Index: iperf-2.0.11/src/SocketAddr.c
+===
+--- iperf-2.0.11.orig/src/SocketAddr.c
 iperf-2.0.11/src/SocketAddr.c
+@@ -317,7 +317,8 @@ void SockAddr_setAddressAny( iperf_socka
+  * --- */
+ 
+ void SockAddr_incrAddress( iperf_sockaddr *inSockAddr, int value ) {
+-if (inSockAddr->ss_family == AF_INET)
++struct sockaddr_storage *storage = inSockAddr;
++if (storage->ss_family == AF_INET)
+   ((struct sockaddr_in *)inSockAddr)->sin_addr.s_addr += htonl(value);
+ #if defined(HAVE_IPV6)
+ else {
-- 
2.18.0


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


Re: [OpenWrt-Devel] Good suggestion for Openwrt router board with 2x mini pci-express

2018-07-12 Thread Sebastian Fleer

Am 12.07.2018 um 10:27 schrieb David Johnson:
> It seems its quite hard to find a board that is fully supported by
> openwrt that has 2x mini pci-express, 2x ethernet ports (WAN, LAN), >
> 64M flash
>
> I want to plug in ath10k supported 802.11ac mini pci-e radios
>
> Any thoughts suggestions
>
> Thanks
> David

I'm using an PC Engines APU2: http://www.pcengines.ch/apu2.htm
There are versions with 2-4 NICs and all have 2x miniPCIe.
OpenWrt wiki page: https://openwrt.org/toh/pcengines/apu2

Sebastian

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


Re: [OpenWrt-Devel] Good suggestion for Openwrt router board with 2x mini pci-express

2018-07-12 Thread Alberto Bursi




On 12/07/2018 16:27, David Johnson wrote:

It seems its quite hard to find a board that is fully supported by
openwrt that has 2x mini pci-express, 2x ethernet ports (WAN, LAN), >
64M flash

I want to plug in ath10k supported 802.11ac mini pci-e radios

Any thoughts suggestions

Thanks
David

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


Afaik the Turris Omnia is supported, there are also PCEngines APU boards.

By searching for "pcie" in the hardware table on the wiki 
https://openwrt.org/toh/views/toh_extended_all


Compex WPQ864
SolidRun Clearfog Pro

-Alberto

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


Re: [OpenWrt-Devel] Good suggestion for Openwrt router board with 2x mini pci-express

2018-07-12 Thread Koen Vandeputte




On 2018-07-12 10:27, David Johnson wrote:

It seems its quite hard to find a board that is fully supported by
openwrt that has 2x mini pci-express, 2x ethernet ports (WAN, LAN), >
64M flash

I want to plug in ath10k supported 802.11ac mini pci-e radios

Any thoughts suggestions

Thanks
David

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

Hi David,

I'm personally using Gateworks gw5200 boards, but it seems the 5520 is 
the same board with dual rj-45 [1]


They are a bit expensive, but
- Fully automotive spec
- Large of features and busses
- Excellent support from the devs at Gateworks


My 2 cents :)

Koen

[1] 
http://www.gateworks.com/product/item/ventana-gw5520-single-board-computer
[2] 
http://www.gateworks.com/imx6-single-board-computer-gateworks-ventana-family


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


[OpenWrt-Devel] [PATCH v2] firewall3: make reject types selectable by user

2018-07-12 Thread Alin Nastac
From: Alin Nastac 

RFC 6092 recommends in section 3.3.1 that an IPv6 CPE must respond to
unsolicited inbound SYNs with an ICMPv6 Destination Unreachable error
code 1 (Communication with destination administratively prohibited).

Signed-off-by: Alin Nastac 
---
 defaults.c | 34 --
 options.c  | 13 +
 options.h  | 12 
 3 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/defaults.c b/defaults.c
index 11fbf0d..f42eed6 100644
--- a/defaults.c
+++ b/defaults.c
@@ -41,6 +41,8 @@ const struct fw3_option fw3_flag_opts[] = {
FW3_OPT("output",  target,   defaults, policy_output),
 
FW3_OPT("drop_invalid",bool, defaults, drop_invalid),
+   FW3_OPT("tcp_reject_code", reject_code, defaults, tcp_reject_code),
+   FW3_OPT("any_reject_code", reject_code, defaults, any_reject_code),
 
FW3_OPT("syn_flood",   bool, defaults, syn_flood),
FW3_OPT("synflood_protect",bool, defaults, syn_flood),
@@ -102,6 +104,30 @@ check_offloading(struct uci_element *e, bool *offloading)
*offloading = false;
 }
 
+static void
+check_any_reject_code(struct uci_element *e, enum fw3_reject_code 
*any_reject_code)
+{
+   if (*any_reject_code == FW3_REJECT_CODE_TCP_RESET) {
+   warn_elem(e, "tcp-reset not valid for any_reject_code, 
defaulting to port-unreach");
+   *any_reject_code = FW3_REJECT_CODE_PORT_UNREACH;
+   }
+}
+
+static const char*
+get_reject_code(enum fw3_family family, enum fw3_reject_code reject_code)
+{
+   switch (reject_code) {
+   case FW3_REJECT_CODE_TCP_RESET:
+   return "tcp-reset";
+   case FW3_REJECT_CODE_PORT_UNREACH:
+   return "port-unreach";
+   case FW3_REJECT_CODE_ADM_PROHIBITED:
+   return family == FW3_FAMILY_V6 ? "adm-prohibited": 
"admin-prohib";
+   default:
+   return "unknown";
+   }
+}
+
 void
 fw3_load_defaults(struct fw3_state *state, struct uci_package *p)
 {
@@ -111,6 +137,8 @@ fw3_load_defaults(struct fw3_state *state, struct 
uci_package *p)
 
bool seen = false;
 
+   defs->tcp_reject_code  = FW3_REJECT_CODE_TCP_RESET;
+   defs->any_reject_code  = FW3_REJECT_CODE_PORT_UNREACH;
defs->syn_flood_rate.rate  = 25;
defs->syn_flood_rate.burst = 50;
defs->tcp_syncookies   = true;
@@ -138,6 +166,8 @@ fw3_load_defaults(struct fw3_state *state, struct 
uci_package *p)
check_policy(e, >policy_output, "output");
check_policy(e, >policy_forward, "forward");
 
+   check_any_reject_code(e, >any_reject_code);
+
check_offloading(e, >flow_offloading);
}
 }
@@ -278,12 +308,12 @@ fw3_print_default_head_rules(struct fw3_ipt_handle 
*handle,
 
r = fw3_ipt_rule_create(handle, , NULL, NULL, NULL, NULL);
fw3_ipt_rule_target(r, "REJECT");
-   fw3_ipt_rule_addarg(r, false, "--reject-with", "tcp-reset");
+   fw3_ipt_rule_addarg(r, false, "--reject-with", 
get_reject_code(handle->family, defs->tcp_reject_code));
fw3_ipt_rule_append(r, "reject");
 
r = fw3_ipt_rule_new(handle);
fw3_ipt_rule_target(r, "REJECT");
-   fw3_ipt_rule_addarg(r, false, "--reject-with", "port-unreach");
+   fw3_ipt_rule_addarg(r, false, "--reject-with", 
get_reject_code(handle->family, defs->any_reject_code));
fw3_ipt_rule_append(r, "reject");
 
break;
diff --git a/options.c b/options.c
index 087aa63..c85bafd 100644
--- a/options.c
+++ b/options.c
@@ -86,6 +86,12 @@ const char *fw3_flag_names[__FW3_FLAG_MAX] = {
"DROP",
 };
 
+const char *fw3_reject_code_names[__FW3_REJECT_CODE_MAX] = {
+   "tcp-reset",
+   "port-unreach",
+   "adm-prohibited",
+};
+
 const char *fw3_limit_units[__FW3_LIMIT_UNIT_MAX] = {
"second",
"minute",
@@ -170,6 +176,13 @@ fw3_parse_target(void *ptr, const char *val, bool is_list)
 }
 
 bool
+fw3_parse_reject_code(void *ptr, const char *val, bool is_list)
+{
+   return parse_enum(ptr, val, 
_reject_code_names[FW3_REJECT_CODE_TCP_RESET],
+ FW3_REJECT_CODE_TCP_RESET, 
FW3_REJECT_CODE_ADM_PROHIBITED);
+}
+
+bool
 fw3_parse_limit(void *ptr, const char *val, bool is_list)
 {
struct fw3_limit *limit = ptr;
diff --git a/options.h b/options.h
index 08fecf6..0b73a84 100644
--- a/options.h
+++ b/options.h
@@ -88,6 +88,15 @@ enum fw3_flag
__FW3_FLAG_MAX
 };
 
+enum fw3_reject_code
+{
+   FW3_REJECT_CODE_TCP_RESET  = 0,
+   FW3_REJECT_CODE_PORT_UNREACH   = 1,
+   FW3_REJECT_CODE_ADM_PROHIBITED = 2,
+
+   __FW3_REJECT_CODE_MAX
+};
+
 extern const char *fw3_flag_names[__FW3_FLAG_MAX];
 
 
@@ -276,6 +285,8 @@ struct fw3_defaults
enum fw3_flag policy_forward;
 
bool drop_invalid;
+   enum 

[OpenWrt-Devel] Good suggestion for Openwrt router board with 2x mini pci-express

2018-07-12 Thread David Johnson
It seems its quite hard to find a board that is fully supported by
openwrt that has 2x mini pci-express, 2x ethernet ports (WAN, LAN), >
64M flash

I want to plug in ath10k supported 802.11ac mini pci-e radios

Any thoughts suggestions

Thanks
David

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


[OpenWrt-Devel] Current status of support for RB953GS-5HnT-RP

2018-07-12 Thread David Johnson
The last patch I saw was from gui in Jan 2017 but I haven't seen this
patch added to the latest openwrt code

https://lists.openwrt.org/pipermail/openwrt-devel/2017-January/005212.html

It appeared that there were issues with the Ethernet ports and the
Nand flash - any progress on those issues - our team of developers at
Ammbr would like to jump in and get full support for this board

Thanks
David

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


Re: [OpenWrt-Devel] time command detect fail on centos

2018-07-12 Thread 李国
Hi Etienne Champetier,

You are right.
CentOS 7 is ok, but CentOS 6 fail.

on CentOS 7
$ sh -c 'time --version'
GNU time 1.7

but on CentOS 6
$ sh -c 'time --version'
sh: --version: command not found

real0m0.001s
user0m0.000s
sys 0m0.000s

Thanks!

2018-07-11 3:38 GMT+08:00 Etienne Champetier :
> Hi,
>
> 2018-07-08 15:50 GMT+02:00 李国 :
>> Hi Jon Burgess
>> this patch works good. thanks.
>> diff --git a/include/prereq.mk b/include/prereq.mk
>> index 0f0f253744..173461e36f 100644
>> --- a/include/prereq.mk
>> +++ b/include/prereq.mk
>> @@ -95,7 +95,7 @@ define SetupHostCommand
>> if [ -n "cmd" ]; then \
>> bin="(PATH="$(subst
>> $(space),:,$(filter-out $(STAGING_DIR_HOST)/%,$(subst
>> :,$(space),$(PATH" \
>> which "{cmd%% *}")"; \
>> -   if [ -x "bin" ] && eval "cmd"
>>>/dev/null 2>/dev/null; then \
>> +   if [ -x "bin" ] && eval
>> "\\cmd" >/dev/null 2>/dev/null; then \
>> mkdir -p "$(STAGING_DIR_HOST)/bin"; \
>> ln -sf "bin"
>> "$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \
>> exit 0; \
>>
>> 2018-07-08 0:11 GMT+08:00 Jon Burgess :
>>> On Sat, 2018-07-07 at 16:23 +0800, 李国 wrote:
 Hi Etienne Champetier

 time command detect fail on centos.

 time is a keyword of bash on centos 6 and centos 7, and it not accept
 --version option, this makes time --version 2>&1 | grep GNU  always
 fail.
>
> I just tried a fresh git checkout of master on an up to date CentOS 7
> After "yum install time" build work perfectly fine
>
> Regards
> Etienne
>
>>>
>>> Does using \time instead help?
>>>
>>>   Jon
>>
>> ___
>> 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] kernel.mk: fix kmod VERSION string

2018-07-12 Thread John Crispin



On 06/07/18 14:13, Florian Eckert wrote:

If a "+" is in the version string of a kernel package then the package could
not get installed by opkg with ftp. Because the file could not get found.
"kmod-wireguard_4.4.135%2b0.0.20180519-1_mips_24kc.ipk: No such file or 
directory"
The problem is that "+" is replaced with "%2b".

Change the "+" in version string to "-" will solve this issue.

Kmod version string:
old: $(LINUX_VERSIO)+$(PKG_VERSION)-$(PKG_RELEASE)
new: $(LINUX_VERSIO)-$(PKG_VERSION)-$(PKG_RELEASE)

this needs to be fixed in opkg or wget. ftp urls should not be encoded.
    John


Signed-off-by: Florian Eckert 
---
  include/kernel.mk | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/kernel.mk b/include/kernel.mk
index c169550f48..cd186e9d3b 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -196,7 +196,7 @@ define KernelPackage
  CATEGORY:=Kernel modules
  DESCRIPTION:=$(DESCRIPTION)
  EXTRA_DEPENDS:=kernel 
(=$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC))
-VERSION:=$(LINUX_VERSION)$(if $(PKG_VERSION),+$(PKG_VERSION))-$(if 
$(PKG_RELEASE),$(PKG_RELEASE),$(LINUX_RELEASE))
+VERSION:=$(LINUX_VERSION)$(if $(PKG_VERSION),-$(PKG_VERSION))-$(if 
$(PKG_RELEASE),$(PKG_RELEASE),$(LINUX_RELEASE))
  PKGFLAGS:=$(PKGFLAGS)
  $(call KernelPackage/$(1))
  $(call KernelPackage/$(1)/$(BOARD))



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


Re: [OpenWrt-Devel] [PATCH] dropbear: close all active clients on shutdown

2018-07-12 Thread John Crispin



On 12/07/18 04:36, Luis Araneda wrote:

From: Christian Schoenebeck 

Override the default shutdown action (stop) and close all processes
of dropbear

Since commit 498fe85, the stop action only closes the process
that's listening for new connections, maintaining the ones with
existing clients.
This poses a problem when restarting or shutting-down a device,
because the connections with existing SSH clients, like OpenSSH,
are not properly closed, causing them to hang.

This situation can be avoided by closing all dropbear processes when
shutting-down the system, which closes properly the connections with
current clients.


does this break sysupgrade when run via ssh ?
    John


Signed-off-by: Christian Schoenebeck 
[Luis: Rework commit message]
Signed-off-by: Luis Araneda 
---
  package/network/services/dropbear/files/dropbear.init | 5 +
  1 file changed, 5 insertions(+)

diff --git a/package/network/services/dropbear/files/dropbear.init 
b/package/network/services/dropbear/files/dropbear.init
index 2225113498..b86e52d8bc 100755
--- a/package/network/services/dropbear/files/dropbear.init
+++ b/package/network/services/dropbear/files/dropbear.init
@@ -148,6 +148,11 @@ service_triggers()
procd_add_validation validate_section_dropbear
  }
  
+shutdown() {

+   # close all open connections
+   killall dropbear
+}
+
  killclients()
  {
local ignore=''



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