[PATCH v2] options.c: add DSCP code LE Least Effort

2022-01-08 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
RFC-8622 implements a low priority DSCP marking called 'Least Effort' or
'LE'  Instead of prioritising traffic in varying degrees, this defines a
scum class of packet that really is the lowest of the low and you may
consider forwarding if you really have nothing better to do.

This patch adds LE class support to firewall3.

Signed-off-by: Kevin Darbyshire-Bryant 
---
 options.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/options.c b/options.c
index 6131786..2f419a3 100644
--- a/options.c
+++ b/options.c
@@ -146,6 +146,7 @@ static const struct { const char *name; uint8_t dscp; } 
dscp_classes[] = {
{ "CS6",  0x30 },
{ "CS7",  0x38 },
{ "BE",   0x00 },
+   { "LE",   0x01 },
{ "AF11", 0x0a },
{ "AF12", 0x0c },
{ "AF13", 0x0e },
-- 
2.32.0 (Apple Git-132)


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


[PATCH] options.c: add DSCP code LE Least Effort

2022-01-08 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Signed-off-by: Kevin Darbyshire-Bryant 
---
 options.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/options.c b/options.c
index 6131786..2f419a3 100644
--- a/options.c
+++ b/options.c
@@ -146,6 +146,7 @@ static const struct { const char *name; uint8_t dscp; } 
dscp_classes[] = {
{ "CS6",  0x30 },
{ "CS7",  0x38 },
{ "BE",   0x00 },
+   { "LE",   0x01 },
{ "AF11", 0x0a },
{ "AF12", 0x0c },
{ "AF13", 0x0e },
-- 
2.32.0 (Apple Git-132)


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


Merged: dnsmasq: add match_tag for --dhcp-host

2021-11-09 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Merged into my staging tree.
Thank you!


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


Merged: dnsmasq: Update to version 2.86test3

2021-06-26 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


Merged: dnsmasq: add config option for connmark DNS filtering

2021-06-26 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


Merged: kernel: drop the conntrack rtcache patch

2021-04-22 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


[PATCH] nettle: build on latest macos xcode

2020-11-18 Thread Kevin Darbyshire-Bryant
compiler warns that exit() isn't defined so the checks for build system
compiler fail.  include  to define exit()

Signed-off-by: Kevin Darbyshire-Bryant 
---

This could do with checking it doesn't break builds under Linux


 .../libs/nettle/patches/100-portability.patch | 34 +++
 1 file changed, 34 insertions(+)
 create mode 100644 package/libs/nettle/patches/100-portability.patch

diff --git a/package/libs/nettle/patches/100-portability.patch 
b/package/libs/nettle/patches/100-portability.patch
new file mode 100644
index 00..2849e53eab
--- /dev/null
+++ b/package/libs/nettle/patches/100-portability.patch
@@ -0,0 +1,34 @@
+--- a/configure
 b/configure
+@@ -4635,6 +4635,7 @@ $as_echo_n "checking build system compil
+ # remove anything that might look like compiler output to our "||" expression
+ rm -f conftest* a.out b.out a.exe a_out.exe
+ cat >conftest.c <
+ int
+ main ()
+ {
+@@ -4667,6 +4668,7 @@ $as_echo_n "checking build system compil
+ # remove anything that might look like compiler output to our "||" expression
+ rm -f conftest* a.out b.out a.exe a_out.exe
+ cat >conftest.c <
+ int
+ main ()
+ {
+@@ -4703,6 +4705,7 @@ $as_echo_n "checking build system compil
+ # remove anything that might look like compiler output to our "||" expression
+ rm -f conftest* a.out b.out a.exe a_out.exe
+ cat >conftest.c <
+ int
+ main ()
+ {
+@@ -4753,6 +4756,7 @@ else
+   gmp_cv_prog_exeext_for_build="$EXEEXT"
+ else
+   cat >conftest.c <
+ int
+ main ()
+ {
-- 
2.24.3 (Apple Git-128)


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


[PATCH] kernel: bump 5.4 to 5.4.53

2020-07-25 Thread Kevin Darbyshire-Bryant
Refresh patches.

Remove upstreamed patches:

bcm63xx/patches-5.4/022-v5.8-mtd-rawnand-brcmnand-correctly-verify-erased-pages.patch
bcm63xx/patches-5.4/024-v5.8-mtd-rawnand-brcmnand-fix-CS0-layout.patch

Drop the cake hack as upstream have backported the changes themselves,
but in a slightly different way.

generic/hack-5.4/641-sch_cake-fix-IP-protocol-handling-in-the-presence-of.patch

Signed-off-by: Kevin Darbyshire-Bryant 
---
 include/kernel-version.mk |   4 +-
 .../910-unaligned_access_hacks.patch  |   2 +-
 ...ce-quirks-for-Freeway-Airmouse-T3-an.patch |   4 +-
 .../905-BCM53573-minor-hacks.patch|   2 +-
 ...-brcmnand-improve-hamming-oob-layout.patch |   2 +-
 ...cmnand-correctly-verify-erased-pages.patch |  63 --
 ...-mtd-rawnand-brcmnand-fix-CS0-layout.patch |  34 --
 ...antage-of-skb-hash-where-appropriate.patch |   2 +-
 ...ve-fwnode-parsing-into-sfp-bus-layer.patch |   2 +-
 5-net-sfp-rework-upstream-interface.patch |  12 +-
 ...fix-sfp_bus_put-kernel-documentation.patch |   2 +-
 ...et-sfp-add-support-for-module-quirks.patch |  43 ++-
 ...sfp-add-some-quirks-for-GPON-modules.patch |   6 +-
 ...protocol-handling-in-the-presence-of.patch | 114 --
 ...ng-with-source-address-failed-policy.patch |  22 ++--
 ...ncomplete-100BASE-FX-and-100BASE-LX-.patch |   2 +-
 ...nterface-mode-from-ethtool-link-mode.patch |   4 +-
 ...p-add-more-extended-compliance-codes.patch |   8 +-
 ...le-start-stop-upstream-notifications.patch |   2 +-
 ...y-MAC-configuration-for-copper-SFP-m.patch |   8 +-
 ...ma-calculate-the-real-count-for-slav.patch |   4 +-
 ...ma-Add-eDMA-support-for-QorIQ-LS1028.patch |   4 +-
 ...on-build_skb-in-mvneta_rx_swbm-poll-.patch |   2 +-
 ...013-net-mvneta-add-basic-XDP-support.patch |   2 +-
 ...DP-support-if-sw-bm-is-used-as-fallb.patch |   6 +-
 ...-mvebu-armada-38x-enable-libata-leds.patch |   2 +-
 .../0069-awake-rt305x-dwc2-controller.patch   |   2 +-
 27 files changed, 66 insertions(+), 294 deletions(-)
 delete mode 100644 
target/linux/bcm63xx/patches-5.4/022-v5.8-mtd-rawnand-brcmnand-correctly-verify-erased-pages.patch
 delete mode 100644 
target/linux/bcm63xx/patches-5.4/024-v5.8-mtd-rawnand-brcmnand-fix-CS0-layout.patch
 delete mode 100644 
target/linux/generic/hack-5.4/641-sch_cake-fix-IP-protocol-handling-in-the-presence-of.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 8bfce3ecfe..08bde0efc6 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -8,11 +8,11 @@ endif
 
 LINUX_VERSION-4.14 = .187
 LINUX_VERSION-4.19 = .131
-LINUX_VERSION-5.4 = .52
+LINUX_VERSION-5.4 = .53
 
 LINUX_KERNEL_HASH-4.14.187 = 
5b223475eaeea196aa7e127d3f253bca5c35d8afdc72ca75230ce1ecdd1454bd
 LINUX_KERNEL_HASH-4.19.131 = 
19dfb9f6cc4ba30104b65dcce7d78240a4ae188cb366747d5f8eae35e98964ba
-LINUX_KERNEL_HASH-5.4.52 = 
037efa531120b1c20ff55e78cd3e17288b1804b3a57dc31de760837b3bea5d3a
+LINUX_KERNEL_HASH-5.4.53 = 
faa7b6f99220d5726f0eaee74a6394f0a3b89be1a75254f3804630211f3d6d21
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst 
-,_,$(subst /,_,$(1)))
diff --git a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch 
b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
index 053b72023f..da6f331f85 100644
--- a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
@@ -556,7 +556,7 @@
  #include 
 --- a/include/net/inet_ecn.h
 +++ b/include/net/inet_ecn.h
-@@ -139,9 +139,9 @@ static inline int IP6_ECN_set_ce(struct
+@@ -140,9 +140,9 @@ static inline int IP6_ECN_set_ce(struct
if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph)))
return 0;
  
diff --git 
a/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch
 
b/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch
index 26a54c22c9..f265beb34e 100644
--- 
a/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch
+++ 
b/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch
@@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell 
  #define USB_VENDOR_ID_BELKIN  0x050d
  #define USB_DEVICE_ID_FLIP_KVM0x3201
  
-@@ -1234,6 +1237,9 @@
+@@ -1237,6 +1240,9 @@
  #define USB_VENDOR_ID_XAT 0x2505
  #define USB_DEVICE_ID_XAT_CSR 0x0220
  
@@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell 
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, 
USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT },
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, 
USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, 
USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2

[PATCH umdns] service.c: fix build on gcc 10

2020-07-19 Thread Kevin Darbyshire-Bryant
Resolve error:
/Users/kevin/wrt/build_dir/target-x86_64_musl/umdns-2020-06-08-d13290b4/service.c:
 In function 'service_load_blob':
/Users/kevin/wrt/build_dir/target-x86_64_musl/umdns-2020-06-08-d13290b4/service.c:240:10:
 error: 'strcpy' offset 6 from the object at 'b' is out of the bounds of 
referenced subobject 'name' with type 'uint8_t[]' {aka 'unsigned char[]'} at 
offset 6 [-Werror=array-bounds]
  240 |  s->id = strcpy(d_id, blobmsg_name(b));
  |  ^
In file included from 
/Users/kevin/wrt/staging_dir/target-x86_64_musl/usr/include/libubus.h:23,
 from 
/Users/kevin/wrt/build_dir/target-x86_64_musl/umdns-2020-06-08-d13290b4/service.c:23:
/Users/kevin/wrt/staging_dir/target-x86_64_musl/usr/include/libubox/blobmsg.h:42:10:
 note: subobject 'name' declared here
   42 |  uint8_t name[];
  |  ^~~~
cc1: all warnings being treated as errors
make[5]: *** [CMakeFiles/umdns.dir/build.make:132: 
CMakeFiles/umdns.dir/service.c.o] Error 1

Signed-off-by: Kevin Darbyshire-Bryant 
---
 service.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/service.c b/service.c
index 97b6f91..af3083e 100644
--- a/service.c
+++ b/service.c
@@ -218,6 +218,7 @@ service_load_blob(struct blob_attr *b)
uint8_t *d_txt;
int rem2;
int txt_len = 0;
+   unsigned int n;
 
blobmsg_parse(service_policy, ARRAY_SIZE(service_policy),
_tb, blobmsg_data(b), blobmsg_data_len(b));
@@ -228,8 +229,9 @@ service_load_blob(struct blob_attr *b)
blobmsg_for_each_attr(txt, _tb[SERVICE_TXT], rem2)
txt_len += 1 + strlen(blobmsg_get_string(txt));
 
+   n = strlen(blobmsg_name(b)) + 1;
s = calloc_a(sizeof(*s),
-   _id, strlen(blobmsg_name(b)) + 1,
+   _id, n,
_instance, _tb[SERVICE_INSTANCE] ? 
strlen(blobmsg_get_string(_tb[SERVICE_INSTANCE])) + 1 : 0,
_service, strlen(blobmsg_get_string(_tb[SERVICE_SERVICE])) + 
1,
_txt, txt_len);
@@ -237,7 +239,7 @@ service_load_blob(struct blob_attr *b)
return;
 
s->port = blobmsg_get_u32(_tb[SERVICE_PORT]);
-   s->id = strcpy(d_id, blobmsg_name(b));
+   s->id = strncpy(d_id, blobmsg_name(b), n);
if (_tb[SERVICE_INSTANCE])
s->instance = strcpy(d_instance, 
blobmsg_get_string(_tb[SERVICE_INSTANCE]));
else
-- 
2.24.3 (Apple Git-128)


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


[OpenWrt-Devel] [PATCH] kernel: bump 5.4 to 5.4.47

2020-06-18 Thread Kevin Darbyshire-Bryant
Refreshed patches.

Run tested: x86/64 (apu2)

Signed-off-by: Kevin Darbyshire-Bryant 
---
 include/kernel-version.mk   | 4 ++--
 ...653-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch | 4 ++--
 ...QUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch | 2 +-
 .../825-v5.8-spi-rb4xx-null-pointer-bug-fix.patch   | 6 ++
 8-spi-rb4xx-update-driver-to-be-device-tree-aware.patch | 6 ++
 target/linux/generic/hack-5.4/221-module_exports.patch  | 2 +-
 target/linux/generic/hack-5.4/902-debloat_proc.patch| 4 ++--
 .../generic/pending-5.4/203-kallsyms_uncompressed.patch | 2 +-
 ...-allow-rejecting-with-source-address-failed-policy.patch | 2 +-
 ...c-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch | 2 +-
 .../linux/x86/patches-5.4/200-pcengines-apu2-reboot.patch   | 2 +-
 11 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index fa62ccbe2a..f69b8977c5 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -8,11 +8,11 @@ endif
 
 LINUX_VERSION-4.14 = .180
 LINUX_VERSION-4.19 = .123
-LINUX_VERSION-5.4 = .46
+LINUX_VERSION-5.4 = .47
 
 LINUX_KERNEL_HASH-4.14.180 = 
444ef973d9b6a6ea174e4a9086f0aea980d8575d13302e431ad688f22e27ed0e
 LINUX_KERNEL_HASH-4.19.123 = 
a79914d31a8d8c6b0e2bb0f2b143d615fe8a6c4dd2e0f36e97aa20efd69a993f
-LINUX_KERNEL_HASH-5.4.46 = 
30074ff2f1a2498da391fad73fc0efaa2256416a08fff8835069b1c59ab31b8e
+LINUX_KERNEL_HASH-5.4.47 = 
970b9d393d9a8d45eafdec9c6ab0d9880c20c703eeb9b0ac409892c8bc418d6c
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst 
-,_,$(subst /,_,$(1)))
diff --git 
a/target/linux/bcm27xx/patches-5.4/950-0653-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch
 
b/target/linux/bcm27xx/patches-5.4/950-0653-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch
index 43d10486de..9c090a0597 100644
--- 
a/target/linux/bcm27xx/patches-5.4/950-0653-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch
+++ 
b/target/linux/bcm27xx/patches-5.4/950-0653-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch
@@ -23,7 +23,7 @@ Signed-off-by: Phil Elwell 
 
 --- a/drivers/spi/spi.c
 +++ b/drivers/spi/spi.c
-@@ -3032,6 +3032,7 @@ static int __spi_validate_bits_per_word(
+@@ -3033,6 +3033,7 @@ static int __spi_validate_bits_per_word(
   */
  int spi_setup(struct spi_device *spi)
  {
@@ -31,7 +31,7 @@ Signed-off-by: Phil Elwell 
unsignedbad_bits, ugly_bits;
int status;
  
-@@ -3049,6 +3050,14 @@ int spi_setup(struct spi_device *spi)
+@@ -3050,6 +3051,14 @@ int spi_setup(struct spi_device *spi)
(SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL |
 SPI_RX_DUAL | SPI_RX_QUAD | SPI_RX_OCTAL)))
return -EINVAL;
diff --git 
a/target/linux/bcm27xx/patches-5.4/950-0697-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch
 
b/target/linux/bcm27xx/patches-5.4/950-0697-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch
index 2be5524a07..617873ce42 100644
--- 
a/target/linux/bcm27xx/patches-5.4/950-0697-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch
+++ 
b/target/linux/bcm27xx/patches-5.4/950-0697-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch
@@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell 
 
 --- a/drivers/spi/spi.c
 +++ b/drivers/spi/spi.c
-@@ -3044,8 +3044,8 @@ int spi_setup(struct spi_device *spi)
+@@ -3045,8 +3045,8 @@ int spi_setup(struct spi_device *spi)
  
if (ctlr->use_gpio_descriptors && ctlr->cs_gpiods &&
ctlr->cs_gpiods[spi->chip_select] && !(spi->mode & SPI_CS_HIGH)) {
diff --git 
a/target/linux/generic/backport-5.4/825-v5.8-spi-rb4xx-null-pointer-bug-fix.patch
 
b/target/linux/generic/backport-5.4/825-v5.8-spi-rb4xx-null-pointer-bug-fix.patch
index 5d762c571c..71e26d50da 100644
--- 
a/target/linux/generic/backport-5.4/825-v5.8-spi-rb4xx-null-pointer-bug-fix.patch
+++ 
b/target/linux/generic/backport-5.4/825-v5.8-spi-rb4xx-null-pointer-bug-fix.patch
@@ -20,11 +20,9 @@ Signed-off-by: Christopher Hill 
  drivers/spi/spi-rb4xx.c | 10 +-
  1 file changed, 5 insertions(+), 5 deletions(-)
 
-diff --git a/drivers/spi/spi-rb4xx.c b/drivers/spi/spi-rb4xx.c
-index 4c9620e0d18c..17e1a77dc132 100644
 --- a/drivers/spi/spi-rb4xx.c
 +++ b/drivers/spi/spi-rb4xx.c
-@@ -158,6 +158,11 @@ static int rb4xx_spi_probe(struct platform_device *pdev)
+@@ -158,6 +158,11 @@ static int rb4xx_spi_probe(struct platfo
master->transfer_one = rb4xx_transfer_one;
master->set_cs = rb4xx_set_cs;
  
@@ -36,7 +34,7 @@ index 4c9620e0d18c..17e1a77dc132 100644
err = devm_spi_register_master(>dev, master);
if (err) {
dev_err(>dev, "failed to register SPI master\n");
-@@ -168,11 +173,6 @@ static int rb4xx_spi_probe(struct platform_device *pde

[OpenWrt-Devel] Merged: odhcpd: remove bogus IPKG_INSTROOT reference

2020-06-11 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


[OpenWrt-Devel] [PATCH] odhcpd: remove bogus IPKG_INSTROOT reference

2020-06-10 Thread Kevin Darbyshire-Bryant
IPKG_INSTROOT is only set under image builder and we won't be running
this script at build time either, so remove the reference before it gets
cargo-culted into other scripts.

Signed-off-by: Kevin Darbyshire-Bryant 
---
 package/network/services/odhcpd/Makefile| 2 +-
 package/network/services/odhcpd/files/odhcpd-update | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/services/odhcpd/Makefile 
b/package/network/services/odhcpd/Makefile
index 6510ce6c80..07d7d7d673 100644
--- a/package/network/services/odhcpd/Makefile
+++ b/package/network/services/odhcpd/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=odhcpd
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
diff --git a/package/network/services/odhcpd/files/odhcpd-update 
b/package/network/services/odhcpd/files/odhcpd-update
index 9bc7abcc1c..c1814e00b0 100755
--- a/package/network/services/odhcpd/files/odhcpd-update
+++ b/package/network/services/odhcpd/files/odhcpd-update
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Make dnsmasq reread hostfile by sending SIGHUP signal
 
-. $IPKG_INSTROOT/lib/functions/procd.sh
+. /lib/functions/procd.sh
 
 procd_send_signal dnsmasq
-- 
2.24.3 (Apple Git-128)


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


Re: [OpenWrt-Devel] [PATCH] umdns: update to latest version

2020-04-05 Thread Kevin Darbyshire-Bryant
Hi Nick,

I’ve already done it… slightly incorrectly (I got the PKG_RELEASE wrong no harm 
done, can be fixed on next ‘release’ date update)

Thanks for patch.  I should have taken yours!

Cheers,

Kevin

> On 5 Apr 2020, at 09:31, vinc...@systemli.org wrote:
> 
> From: Nick Hainke 
> 
> Includes:
> - dns: explicitly endian-convert all fields in header and question
> - fix unused error
> 
> Signed-off-by: Nick Hainke 
> ---
> package/network/services/umdns/Makefile | 8 
> 1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/package/network/services/umdns/Makefile 
> b/package/network/services/umdns/Makefile
> index 7dbbea322a..9cbadeef89 100644
> --- a/package/network/services/umdns/Makefile
> +++ b/package/network/services/umdns/Makefile
> @@ -8,13 +8,13 @@
> include $(TOPDIR)/rules.mk
> 
> PKG_NAME:=umdns
> -PKG_RELEASE:=2
> +PKG_RELEASE:=1
> 
> PKG_SOURCE_URL=$(PROJECT_GIT)/project/mdnsd.git
> PKG_SOURCE_PROTO:=git
> -PKG_SOURCE_DATE:=2018-01-02
> -PKG_SOURCE_VERSION:=78974417e182a3de8f78b7d73366ec0c98396b6c
> -PKG_MIRROR_HASH:=a60f9eb9428ac3256cd7c3c6d4207c116cedf4d212b82e2f86c1bf7c7898fcbb
> +PKG_SOURCE_DATE:=2020-04-05
> +PKG_SOURCE_VERSION:=ab7a39a5b5a0ff74601dd4e82145ca554c1e2ac6
> +PKG_MIRROR_HASH:=135de61439d823f3631fdcf735bc7a94355ba1d7bb0a2e3a0530a75898e322ef
> 
> PKG_MAINTAINER:=John Crispin 
> PKG_LICENSE:=LGPL-2.1
> --
> 2.26.0
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Cheers,

Kevin D-B

gpg: 012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A



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


[OpenWrt-Devel] Merged: umdns: fix unused error

2020-04-05 Thread Kevin Darbyshire-Bryant
Merged.
Thank you!


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


[OpenWrt-Devel] Merged: ath79: improve mikrotik-caldata.sh

2020-04-04 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


[OpenWrt-Devel] [PATCH v1] umdns: suppress address-of-packed-member warning

2020-04-04 Thread Kevin Darbyshire-Bryant
gcc 8 & 9 appear to be more picky with regards access alignment to
packed structures, leading to this warning in dns.c:

dns.c:261:2: error: converting a packed ‘struct dns_question’ pointer
(alignment 1) to a ‘uint16_t’ {aka ‘short unsigned int’} pointer
(alignment 2) may result in an unaligned pointer value
[-Werror=address-of-packed-member]

261 |  uint16_t *swap = (uint16_t *) q;

Work around what I think is a false positive by turning the warning off.
Not ideal, but not quite as not ideal as build failure.

Signed-off-by: Kevin Darbyshire-Bryant 
---
 package/network/services/umdns/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/services/umdns/Makefile 
b/package/network/services/umdns/Makefile
index ffbc3fed35..7dbbea322a 100644
--- a/package/network/services/umdns/Makefile
+++ b/package/network/services/umdns/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=umdns
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/mdnsd.git
 PKG_SOURCE_PROTO:=git
@@ -30,7 +30,7 @@ define Package/umdns
   DEPENDS:=+libubox +libubus +libblobmsg-json
 endef
 
-TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
+TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include -Wno-address-of-packed-member
 
 define Package/umdns/conffiles
 /etc/config/umdns
-- 
2.24.1 (Apple Git-126)


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


[OpenWrt-Devel] [PATCH v1 1/2] kmod-sched-cake: rename to kmod-sched-cake-oot

2020-04-01 Thread Kevin Darbyshire-Bryant
In preparation for dropping the out of tree cake module and using
in tree cake from upstream, rename the package to kmod-sched-cake-oot
(out of tree)

Initially add a PROVIDES kmod-sched-cake so that package dependencies
can be satisfied.

Ultimately this package will be removed when linux 4.14 is removed.

Signed-off-by: Kevin Darbyshire-Bryant 
---
 .../Makefile| 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)
 rename package/kernel/{kmod-sched-cake => kmod-sched-cake-oot}/Makefile (75%)

diff --git a/package/kernel/kmod-sched-cake/Makefile 
b/package/kernel/kmod-sched-cake-oot/Makefile
similarity index 75%
rename from package/kernel/kmod-sched-cake/Makefile
rename to package/kernel/kmod-sched-cake-oot/Makefile
index 42e45b5789..fbcb9cec4b 100644
--- a/package/kernel/kmod-sched-cake/Makefile
+++ b/package/kernel/kmod-sched-cake-oot/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
-PKG_NAME:=sched-cake
+PKG_NAME:=sched-cake-oot
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
@@ -20,23 +20,24 @@ PKG_MAINTAINER:=Kevin Darbyshire-Bryant 

 
 include $(INCLUDE_DIR)/package.mk
 
-define KernelPackage/sched-cake
+define KernelPackage/sched-cake-oot
   SUBMENU:=Network Support
-  TITLE:=Cake fq_codel/blue derived shaper
+  TITLE:=OOT Cake fq_codel/blue derived shaper
   URL:=https://github.com/dtaht/sch_cake
   FILES:=$(PKG_BUILD_DIR)/sch_cake.ko
   AUTOLOAD:=$(call AutoLoad,75,sch_cake)
-  DEPENDS:=+kmod-ipt-conntrack
+  DEPENDS:=+kmod-sched-core
+  PROVIDES:=kmod-sched-cake
 endef
 
 include $(INCLUDE_DIR)/kernel-defaults.mk
 
 define KernelPackage/sched-cake/description
-  Common Applications Kept Enhanced fq_codel/blue derived shaper
+  O(ut) O(f) T(ree) Common Applications Kept Enhanced fq_codel/blue derived 
shaper
 endef
 
 define Build/Compile
$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" modules
 endef
 
-$(eval $(call KernelPackage,sched-cake))
+$(eval $(call KernelPackage,sched-cake-oot))
-- 
2.24.1 (Apple Git-126)


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


[OpenWrt-Devel] [PATCH v1 2/2] kmod-sched-cake: switch to in-tree cake for 4.19+

2020-04-01 Thread Kevin Darbyshire-Bryant
Use in tree version of cake for kernels 4.19+ and backport features from
later kernel versions to 4.19.

Unfortunately PROVIDES dependency handling produces bogus circular
dependency warnings so whilst this package and kmod-sched-cake-oot
should be able to PROVIDE kmod-sched-cake this doesn't work.

Instead, remove the PROVIDES option and modify package sqm-scripts to
depend on the correct module independently.

Signed-off-by: Kevin Darbyshire-Bryant 
---
 package/kernel/kmod-sched-cake-oot/Makefile   |   3 +-
 package/kernel/linux/modules/netsupport.mk|  17 +-
 ...-sch_cake-Make-the-dual-modes-fairer.patch | 217 ++
 ...-use-of-connmarks-as-tin-classifiers.patch | 118 ++
 ...erpret-fwmark-parameter-as-a-bitmask.patch | 102 
 ...rop-unused-variable-tin_quantum_prio.patch | 158 +
 ...sing-NLA-policy-entry-TCA_CAKE_SPLIT.patch |  30 +++
 7 files changed, 642 insertions(+), 3 deletions(-)
 create mode 100644 
target/linux/generic/backport-4.19/392-v5.1-sch_cake-Make-the-dual-modes-fairer.patch
 create mode 100644 
target/linux/generic/backport-4.19/393-v5.1-sch_cake-Permit-use-of-connmarks-as-tin-classifiers.patch
 create mode 100644 
target/linux/generic/backport-4.19/394-v5.1-sch_cake-Interpret-fwmark-parameter-as-a-bitmask.patch
 create mode 100644 
target/linux/generic/backport-4.19/395-v5.4-sch_cake-drop-unused-variable-tin_quantum_prio.patch
 create mode 100644 
target/linux/generic/backport-4.19/396-v5.4-sch_cake-Add-missing-NLA-policy-entry-TCA_CAKE_SPLIT.patch

diff --git a/package/kernel/kmod-sched-cake-oot/Makefile 
b/package/kernel/kmod-sched-cake-oot/Makefile
index fbcb9cec4b..7b2e0e0eae 100644
--- a/package/kernel/kmod-sched-cake-oot/Makefile
+++ b/package/kernel/kmod-sched-cake-oot/Makefile
@@ -26,8 +26,7 @@ define KernelPackage/sched-cake-oot
   URL:=https://github.com/dtaht/sch_cake
   FILES:=$(PKG_BUILD_DIR)/sch_cake.ko
   AUTOLOAD:=$(call AutoLoad,75,sch_cake)
-  DEPENDS:=+kmod-sched-core
-  PROVIDES:=kmod-sched-cake
+  DEPENDS:=@LINUX_4_14 +kmod-sched-core
 endef
 
 include $(INCLUDE_DIR)/kernel-defaults.mk
diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index b3b32877a3..ca25138571 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -746,7 +746,7 @@ $(eval $(call KernelPackage,mppe))
 
 SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard 
$(LINUX_DIR)/net/sched/*.ko))
 SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf 
cls_basic cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_mirred 
act_skbedit cls_matchall
-SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark act_ctinfo sch_netem 
sch_mqprio em_ipset cls_bpf cls_flower act_bpf act_vlan
+SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark act_ctinfo sch_cake 
sch_netem sch_mqprio em_ipset cls_bpf cls_flower act_bpf act_vlan
 SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES))
 SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter 
$(SCHED_MODULES_CORE),$(SCHED_MODULES)))
 SCHED_FILES_EXTRA = $(patsubst 
%,$(LINUX_DIR)/net/sched/%.ko,$(SCHED_MODULES_EXTRA))
@@ -785,6 +785,21 @@ endef
 $(eval $(call KernelPackage,sched-core))
 
 
+define KernelPackage/sched-cake
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=Cake fq_codel/blue derived shaper
+  DEPENDS:=@!LINUX_4_14 +kmod-sched-core
+  KCONFIG:=CONFIG_NET_SCH_CAKE
+  FILES:=$(LINUX_DIR)/net/sched/sch_cake.ko
+  AUTOLOAD:=$(call AutoProbe,sch_cake)
+endef
+
+define KernelPackage/sched-cake/description
+ Common Applications Kept Enhanced fq_codel/blue derived shaper
+endef
+
+$(eval $(call KernelPackage,sched-cake))
+
 define KernelPackage/sched-flower
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=Flower traffic classifier
diff --git 
a/target/linux/generic/backport-4.19/392-v5.1-sch_cake-Make-the-dual-modes-fairer.patch
 
b/target/linux/generic/backport-4.19/392-v5.1-sch_cake-Make-the-dual-modes-fairer.patch
new file mode 100644
index 00..cd94600152
--- /dev/null
+++ 
b/target/linux/generic/backport-4.19/392-v5.1-sch_cake-Make-the-dual-modes-fairer.patch
@@ -0,0 +1,217 @@
+From 712639929912c5eefb09facccb48d55b3f72c9f8 Mon Sep 17 00:00:00 2001
+From: George Amanakis 
+Date: Fri, 1 Mar 2019 16:04:05 +0100
+Subject: [PATCH] sch_cake: Make the dual modes fairer
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+CAKE host fairness does not work well with TCP flows in dual-srchost and
+dual-dsthost setup. The reason is that ACKs generated by TCP flows are
+classified as sparse flows, and affect flow isolation from other hosts. Fix
+this by calculating host_load based only on the bulk flows a host
+generates. In a hash collision the host_bulk_flow_count values must be
+decremented on the old hosts and incremented on the new ones *if* the queue
+is in the bulk set.
+
+Reported-by: Pete Heist 
+Signed

[OpenWrt-Devel] [PATCH v1 0/2] Moving to drop Out of tree cake

2020-04-01 Thread Kevin Darbyshire-Bryant
Cake has been in upstream linux from 4.19 onward yet openwrt still
builds a module from out of tree source.  This patch set intends to drop
the out of tree module for those versions of linux that contain an
in-tree version + various backports of upstream enhancements.

Unfortunately it's not as simple as just renaming a package and adding
PROVIDES due to some issues with PROVIDES handling.  So the dependency
handling has to be handled in the depending package.

To be read in combination with:
https://github.com/ldir-EDB0/packages/commit/1ec73d60da31c13b05c36d5fca2a062bc9bce071

Kevin Darbyshire-Bryant (2):
  kmod-sched-cake: rename to kmod-sched-cake-oot
  kmod-sched-cake: switch to in-tree cake for 4.19+

 .../Makefile  |  12 +-
 package/kernel/linux/modules/netsupport.mk|  17 +-
 ...-sch_cake-Make-the-dual-modes-fairer.patch | 217 ++
 ...-use-of-connmarks-as-tin-classifiers.patch | 118 ++
 ...erpret-fwmark-parameter-as-a-bitmask.patch | 102 
 ...rop-unused-variable-tin_quantum_prio.patch | 158 +
 ...sing-NLA-policy-entry-TCA_CAKE_SPLIT.patch |  30 +++
 7 files changed, 647 insertions(+), 7 deletions(-)
 rename package/kernel/{kmod-sched-cake => kmod-sched-cake-oot}/Makefile (76%)
 create mode 100644 
target/linux/generic/backport-4.19/392-v5.1-sch_cake-Make-the-dual-modes-fairer.patch
 create mode 100644 
target/linux/generic/backport-4.19/393-v5.1-sch_cake-Permit-use-of-connmarks-as-tin-classifiers.patch
 create mode 100644 
target/linux/generic/backport-4.19/394-v5.1-sch_cake-Interpret-fwmark-parameter-as-a-bitmask.patch
 create mode 100644 
target/linux/generic/backport-4.19/395-v5.4-sch_cake-drop-unused-variable-tin_quantum_prio.patch
 create mode 100644 
target/linux/generic/backport-4.19/396-v5.4-sch_cake-Add-missing-NLA-policy-entry-TCA_CAKE_SPLIT.patch

-- 
2.24.1 (Apple Git-126)


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


[OpenWrt-Devel] [PATCH] libnftnl: bump to 1.1.5

2020-03-16 Thread Kevin Darbyshire-Bryant
Solve missing references to nftnl_set_list_lookup_byname when building
iptables with Nftables support enabled (CONFIG_IPTABLES_NFTABLES)

/Users/kevin/wrt/staging_dir/toolchain-x86_64_gcc-9.2.0_musl/lib/gcc/x86_64-openwrt-linux-musl/9.2.0/../../../../x86_64-openwrt-linux-musl/bin/ld:
 xtables_nft_multi-nft-bridge.o: in function `nft_bridge_parse_lookup':
nft-bridge.c:(.text.nft_bridge_parse_lookup+0xcd): undefined reference to 
`nftnl_set_list_lookup_byname'
/Users/kevin/wrt/staging_dir/toolchain-x86_64_gcc-9.2.0_musl/lib/gcc/x86_64-openwrt-linux-musl/9.2.0/../../../../x86_64-openwrt-linux-musl/bin/ld:
 xtables_nft_multi-nft-cache.o: in function `nftnl_set_list_cb':
nft-cache.c:(.text.nftnl_set_list_cb+0x80): undefined reference to 
`nftnl_set_list_lookup_byname'
/Users/kevin/wrt/staging_dir/toolchain-x86_64_gcc-9.2.0_musl/lib/gcc/x86_64-openwrt-linux-musl/9.2.0/../../../../x86_64-openwrt-linux-musl/bin/ld:
 xtables_nft_multi-nft-cache.o: in function `fetch_set_cache':
nft-cache.c:(.text.fetch_set_cache+0x10a): undefined reference to 
`nftnl_set_list_lookup_byname'
collect2: error: ld returned 1 exit status
make[6]: *** [xtables-nft-multi] Error 1
make[5]: *** [all] Error 2
make[4]: *** [all-recursive] Error 1
make[3]: *** [all] Error 2
make[2]: *** 
[/Users/kevin/wrt/build_dir/target-x86_64_musl/linux-x86_64/iptables-1.8.4/.built]
 Error 2
make[2]: Leaving directory `/Users/kevin/wrt/package/network/utils/iptables'

Signed-off-by: Kevin Darbyshire-Bryant 
---
 package/libs/libnftnl/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libs/libnftnl/Makefile b/package/libs/libnftnl/Makefile
index 6b7d70c006..4c878f85f8 100644
--- a/package/libs/libnftnl/Makefile
+++ b/package/libs/libnftnl/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libnftnl
-PKG_VERSION:=1.1.4
+PKG_VERSION:=1.1.5
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
-PKG_HASH:=c8c7988347adf261efac5bba59f8e5f995ffb65f247a88cc144e69620573ed20
+PKG_HASH:=66de4d05227c0a1a731c369b193010d18a05b1185c2735211e0ecf658eeb14f3
 PKG_MAINTAINER:=Steven Barth 
 PKG_LICENSE:=GPL-2.0+
 
-- 
2.21.1 (Apple Git-122.3)


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


[OpenWrt-Devel] [PATCH v2] instance: add 'requirejail' attribute

2020-02-02 Thread Kevin Darbyshire-Bryant
Since commit b44417c instance: provide error feedback if ujail binary is
missing, worrying log spam of the form "unable to find /sbin/jail ..."
may be encountered.

On systems not configured with jail capabilities the lack of jail binary
is not an error, whilst on systems with jail capabilities the warning
will be issued and the process is started outside of a jail.

This commit adds a new procd jail parameter 'mustjail' which if set
issues an error and does NOT start the process outside of a jailed
environment.

The original 'unable to find jail binary' warning is output in DEBUG
mode, thus processes started in a 'may jail' but non-jail capable
environment do not spam the log.

Signed-off-by: Kevin Darbyshire-Bryant 
---
v2 - change to 'requirejail' attribute

 service/instance.c | 33 +++--
 service/instance.h |  1 +
 2 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/service/instance.c b/service/instance.c
index e872ba0..ff1 100644
--- a/service/instance.c
+++ b/service/instance.c
@@ -101,6 +101,7 @@ enum {
JAIL_ATTR_RONLY,
JAIL_ATTR_MOUNT,
JAIL_ATTR_NETNS,
+   JAIL_ATTR_REQUIREJAIL,
__JAIL_ATTR_MAX,
 };
 
@@ -114,6 +115,7 @@ static const struct blobmsg_policy 
jail_attr[__JAIL_ATTR_MAX] = {
[JAIL_ATTR_RONLY] = { "ronly", BLOBMSG_TYPE_BOOL },
[JAIL_ATTR_MOUNT] = { "mount", BLOBMSG_TYPE_TABLE },
[JAIL_ATTR_NETNS] = { "netns", BLOBMSG_TYPE_BOOL },
+   [JAIL_ATTR_REQUIREJAIL] = { "requirejail", BLOBMSG_TYPE_BOOL },
 };
 
 struct instance_netdev {
@@ -819,20 +821,16 @@ instance_jail_parse(struct service_instance *in, struct 
blob_attr *attr)
 {
struct blob_attr *tb[__JAIL_ATTR_MAX];
struct jail *jail = >jail;
-   struct stat s;
-   int r;
-
-   r = stat(UJAIL_BIN_PATH, );
-   if (r < 0) {
-   ERROR("unable to find %s: %m (%d)\n", UJAIL_BIN_PATH, r);
-   return 0;
-   }
 
blobmsg_parse(jail_attr, __JAIL_ATTR_MAX, tb,
blobmsg_data(attr), blobmsg_data_len(attr));
 
jail->argc = 2;
 
+   if (tb[JAIL_ATTR_REQUIREJAIL]) {
+   in->require_jail = true;
+   jail->argc++;
+   }
if (tb[JAIL_ATTR_NAME]) {
jail->name = strdup(blobmsg_get_string(tb[JAIL_ATTR_NAME]));
jail->argc += 2;
@@ -885,7 +883,7 @@ instance_jail_parse(struct service_instance *in, struct 
blob_attr *attr)
if (in->no_new_privs)
jail->argc++;
 
-   return 1;
+   return true;
 }
 
 static bool
@@ -918,7 +916,8 @@ instance_config_parse(struct service_instance *in)
 {
struct blob_attr *tb[__INSTANCE_ATTR_MAX];
struct blob_attr *cur, *cur2;
-   int rem;
+   struct stat s;
+   int rem, r;
 
blobmsg_parse(instance_attr, __INSTANCE_ATTR_MAX, tb,
blobmsg_data(in->config), blobmsg_data_len(in->config));
@@ -1004,6 +1003,19 @@ instance_config_parse(struct service_instance *in)
if (!in->trace && tb[INSTANCE_ATTR_JAIL])
in->has_jail = instance_jail_parse(in, tb[INSTANCE_ATTR_JAIL]);
 
+   if (in->has_jail) {
+   r = stat(UJAIL_BIN_PATH, );
+   if (r < 0) {
+   if (in->require_jail) {
+   ERROR("Cannot jail service %s::%s. %s: %m 
(%d)\n",
+   in->srv->name, in->name, 
UJAIL_BIN_PATH, r);
+   return false;
+   }
+   DEBUG(2, "unable to find %s: %m (%d)\n", 
UJAIL_BIN_PATH, r);
+   in->has_jail = false;
+   }
+   }
+
if (tb[INSTANCE_ATTR_STDOUT] && 
blobmsg_get_bool(tb[INSTANCE_ATTR_STDOUT]))
in->_stdout.fd.fd = -1;
 
@@ -1146,6 +1158,7 @@ instance_init(struct service_instance *in, struct service 
*s, struct blob_attr *
in->term_timeout = 5;
in->syslog_facility = LOG_DAEMON;
in->exit_code = 0;
+   in->require_jail = false;
 
in->_stdout.fd.fd = -2;
in->_stdout.stream.string_data = true;
diff --git a/service/instance.h b/service/instance.h
index 7d91b51..003a8c9 100644
--- a/service/instance.h
+++ b/service/instance.h
@@ -59,6 +59,7 @@ struct service_instance {
 
bool trace;
bool has_jail;
+   bool require_jail;
bool no_new_privs;
struct jail jail;
char *seccomp;
-- 
2.21.1 (Apple Git-122.3)


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


[OpenWrt-Devel] [PATCH procd] instance: Add 'mustjail' attribute

2020-02-01 Thread Kevin Darbyshire-Bryant
Since commit b44417c instance: provide error feedback if ujail binary is
missing, worrying log spam of the form "unable to find /sbin/jail ..."
may be encountered.

On systems not configured with jail capabilities the lack of jail binary
is not an error, whilst on systems with jail capabilities the warning
will be issued and the process is started outside of a jail.

This commit adds a new procd jail parameter 'mustjail' which if set
issues an error and does NOT start the process outside of a jailed
environment.

The original 'unable to find jail binary' warning is output in DEBUG
mode, thus processes started in a 'may jail' but non-jail capable
environment do not spam the log.

Signed-off-by: Kevin Darbyshire-Bryant 
---
 service/instance.c | 33 +++--
 service/instance.h |  1 +
 2 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/service/instance.c b/service/instance.c
index e872ba0..5dc23e2 100644
--- a/service/instance.c
+++ b/service/instance.c
@@ -101,6 +101,7 @@ enum {
JAIL_ATTR_RONLY,
JAIL_ATTR_MOUNT,
JAIL_ATTR_NETNS,
+   JAIL_ATTR_MUSTJAIL,
__JAIL_ATTR_MAX,
 };
 
@@ -114,6 +115,7 @@ static const struct blobmsg_policy 
jail_attr[__JAIL_ATTR_MAX] = {
[JAIL_ATTR_RONLY] = { "ronly", BLOBMSG_TYPE_BOOL },
[JAIL_ATTR_MOUNT] = { "mount", BLOBMSG_TYPE_TABLE },
[JAIL_ATTR_NETNS] = { "netns", BLOBMSG_TYPE_BOOL },
+   [JAIL_ATTR_MUSTJAIL] = { "mustjail", BLOBMSG_TYPE_BOOL },
 };
 
 struct instance_netdev {
@@ -819,20 +821,16 @@ instance_jail_parse(struct service_instance *in, struct 
blob_attr *attr)
 {
struct blob_attr *tb[__JAIL_ATTR_MAX];
struct jail *jail = >jail;
-   struct stat s;
-   int r;
-
-   r = stat(UJAIL_BIN_PATH, );
-   if (r < 0) {
-   ERROR("unable to find %s: %m (%d)\n", UJAIL_BIN_PATH, r);
-   return 0;
-   }
 
blobmsg_parse(jail_attr, __JAIL_ATTR_MAX, tb,
blobmsg_data(attr), blobmsg_data_len(attr));
 
jail->argc = 2;
 
+   if (tb[JAIL_ATTR_MUSTJAIL]) {
+   in->must_jail = true;
+   jail->argc++;
+   }
if (tb[JAIL_ATTR_NAME]) {
jail->name = strdup(blobmsg_get_string(tb[JAIL_ATTR_NAME]));
jail->argc += 2;
@@ -885,7 +883,7 @@ instance_jail_parse(struct service_instance *in, struct 
blob_attr *attr)
if (in->no_new_privs)
jail->argc++;
 
-   return 1;
+   return true;
 }
 
 static bool
@@ -918,7 +916,8 @@ instance_config_parse(struct service_instance *in)
 {
struct blob_attr *tb[__INSTANCE_ATTR_MAX];
struct blob_attr *cur, *cur2;
-   int rem;
+   struct stat s;
+   int rem, r;
 
blobmsg_parse(instance_attr, __INSTANCE_ATTR_MAX, tb,
blobmsg_data(in->config), blobmsg_data_len(in->config));
@@ -1004,6 +1003,19 @@ instance_config_parse(struct service_instance *in)
if (!in->trace && tb[INSTANCE_ATTR_JAIL])
in->has_jail = instance_jail_parse(in, tb[INSTANCE_ATTR_JAIL]);
 
+   if (in->has_jail) {
+   r = stat(UJAIL_BIN_PATH, );
+   if (r < 0) {
+   if (in->must_jail) {
+   ERROR("Cannot jail service %s::%s. %s: %m 
(%d)\n",
+   in->srv->name, in->name, 
UJAIL_BIN_PATH, r);
+   return false;
+   }
+   DEBUG(2, "unable to find %s: %m (%d)\n", 
UJAIL_BIN_PATH, r);
+   in->has_jail = false;
+   }
+   }
+
if (tb[INSTANCE_ATTR_STDOUT] && 
blobmsg_get_bool(tb[INSTANCE_ATTR_STDOUT]))
in->_stdout.fd.fd = -1;
 
@@ -1146,6 +1158,7 @@ instance_init(struct service_instance *in, struct service 
*s, struct blob_attr *
in->term_timeout = 5;
in->syslog_facility = LOG_DAEMON;
in->exit_code = 0;
+   in->must_jail = false;
 
in->_stdout.fd.fd = -2;
in->_stdout.stream.string_data = true;
diff --git a/service/instance.h b/service/instance.h
index 7d91b51..abd91ad 100644
--- a/service/instance.h
+++ b/service/instance.h
@@ -59,6 +59,7 @@ struct service_instance {
 
bool trace;
bool has_jail;
+   bool must_jail;
bool no_new_privs;
struct jail jail;
char *seccomp;
-- 
2.21.1 (Apple Git-122.3)


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


[OpenWrt-Devel] [PATCH procd v2] instance: Improve missing jail binary message

2020-01-31 Thread Kevin Darbyshire-Bryant
Signed-off-by: Kevin Darbyshire-Bryant 
---
Base error on new 'mustjail' attribute

 service/instance.c | 32 ++--
 service/instance.h |  1 +
 2 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/service/instance.c b/service/instance.c
index e872ba0..d430d6e 100644
--- a/service/instance.c
+++ b/service/instance.c
@@ -101,6 +101,7 @@ enum {
JAIL_ATTR_RONLY,
JAIL_ATTR_MOUNT,
JAIL_ATTR_NETNS,
+   JAIL_ATTR_MUSTJAIL,
__JAIL_ATTR_MAX,
 };
 
@@ -114,6 +115,7 @@ static const struct blobmsg_policy 
jail_attr[__JAIL_ATTR_MAX] = {
[JAIL_ATTR_RONLY] = { "ronly", BLOBMSG_TYPE_BOOL },
[JAIL_ATTR_MOUNT] = { "mount", BLOBMSG_TYPE_TABLE },
[JAIL_ATTR_NETNS] = { "netns", BLOBMSG_TYPE_BOOL },
+   [JAIL_ATTR_MUSTJAIL] = { "mustjail", BLOBMSG_TYPE_BOOL },
 };
 
 struct instance_netdev {
@@ -819,20 +821,16 @@ instance_jail_parse(struct service_instance *in, struct 
blob_attr *attr)
 {
struct blob_attr *tb[__JAIL_ATTR_MAX];
struct jail *jail = >jail;
-   struct stat s;
-   int r;
-
-   r = stat(UJAIL_BIN_PATH, );
-   if (r < 0) {
-   ERROR("unable to find %s: %m (%d)\n", UJAIL_BIN_PATH, r);
-   return 0;
-   }
 
blobmsg_parse(jail_attr, __JAIL_ATTR_MAX, tb,
blobmsg_data(attr), blobmsg_data_len(attr));
 
jail->argc = 2;
 
+   if (tb[JAIL_ATTR_MUSTJAIL]) {
+   in->must_jail = true;
+   jail->argc++;
+   }
if (tb[JAIL_ATTR_NAME]) {
jail->name = strdup(blobmsg_get_string(tb[JAIL_ATTR_NAME]));
jail->argc += 2;
@@ -885,7 +883,7 @@ instance_jail_parse(struct service_instance *in, struct 
blob_attr *attr)
if (in->no_new_privs)
jail->argc++;
 
-   return 1;
+   return true;
 }
 
 static bool
@@ -918,7 +916,8 @@ instance_config_parse(struct service_instance *in)
 {
struct blob_attr *tb[__INSTANCE_ATTR_MAX];
struct blob_attr *cur, *cur2;
-   int rem;
+   struct stat s;
+   int rem, r;
 
blobmsg_parse(instance_attr, __INSTANCE_ATTR_MAX, tb,
blobmsg_data(in->config), blobmsg_data_len(in->config));
@@ -1004,6 +1003,18 @@ instance_config_parse(struct service_instance *in)
if (!in->trace && tb[INSTANCE_ATTR_JAIL])
in->has_jail = instance_jail_parse(in, tb[INSTANCE_ATTR_JAIL]);
 
+   if (in->has_jail) {
+   r = stat(UJAIL_BIN_PATH, );
+   if (r < 0) {
+   if (in->must_jail) {
+   ERROR("Cannot jail service %s::%s. %s: %m 
(%d)\n",
+   in->srv->name, in->name, 
UJAIL_BIN_PATH, r);
+   return false;
+   }
+   in->has_jail = false;
+   }
+   }
+
if (tb[INSTANCE_ATTR_STDOUT] && 
blobmsg_get_bool(tb[INSTANCE_ATTR_STDOUT]))
in->_stdout.fd.fd = -1;
 
@@ -1146,6 +1157,7 @@ instance_init(struct service_instance *in, struct service 
*s, struct blob_attr *
in->term_timeout = 5;
in->syslog_facility = LOG_DAEMON;
in->exit_code = 0;
+   in->must_jail = false;
 
in->_stdout.fd.fd = -2;
in->_stdout.stream.string_data = true;
diff --git a/service/instance.h b/service/instance.h
index 7d91b51..abd91ad 100644
--- a/service/instance.h
+++ b/service/instance.h
@@ -59,6 +59,7 @@ struct service_instance {
 
bool trace;
bool has_jail;
+   bool must_jail;
bool no_new_privs;
struct jail jail;
char *seccomp;
-- 
2.21.1 (Apple Git-122.3)


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


[OpenWrt-Devel] [PATCH procd] instance: Improve missing jail binary message

2020-01-30 Thread Kevin Darbyshire-Bryant
Signed-off-by: Kevin Darbyshire-Bryant 
---
 service/instance.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/service/instance.c b/service/instance.c
index e872ba0..b78a65f 100644
--- a/service/instance.c
+++ b/service/instance.c
@@ -824,7 +824,8 @@ instance_jail_parse(struct service_instance *in, struct 
blob_attr *attr)
 
r = stat(UJAIL_BIN_PATH, );
if (r < 0) {
-   ERROR("unable to find %s: %m (%d)\n", UJAIL_BIN_PATH, r);
+   ULOG_WARN("Cannot jail service %s::%s. %s: %m (%d) Are jails 
enabled?\n",
+   in->srv->name, in->name, UJAIL_BIN_PATH, r);
return 0;
}
 
-- 
2.21.1 (Apple Git-122.3)


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


[OpenWrt-Devel] Merged: kernel: act_ctinfo: update backport

2019-12-03 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


[OpenWrt-Devel] [PATCH] kernel: act_ctinfo: update backport

2019-11-26 Thread Kevin Darbyshire-Bryant
Since the original backports from kernel 5.3 a few things have been
tweaked by kernel bumps & other upstream changes.  Update the backport
to reflect upstream as closely as possible and remove the bitrot.

Functions remain the same, error reporting improved.

Signed-off-by: Kevin Darbyshire-Bryant 
---
 ...et-sched-Introduce-act_ctinfo-action.patch | 142 ++
 ...et-sched-Introduce-act_ctinfo-action.patch | 140 -
 2 files changed, 210 insertions(+), 72 deletions(-)

diff --git 
a/target/linux/generic/backport-4.14/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch
 
b/target/linux/generic/backport-4.14/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch
index d2cb0532c9..1053742e6e 100644
--- 
a/target/linux/generic/backport-4.14/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch
+++ 
b/target/linux/generic/backport-4.14/380-v5.3-net-sched-Introduce-act_ctinfo-action.patch
@@ -1,47 +1,110 @@
-From e3777dd42dc6f1b9cb099836707a3e7971dcf4df Mon Sep 17 00:00:00 2001
+From a06ece503d941eefa92ba48dc981ccaa4093330b Mon Sep 17 00:00:00 2001
 From: Kevin Darbyshire-Bryant 
 Date: Wed, 13 Mar 2019 20:54:49 +
-Subject: [PATCH] net: sched: Introduce act_ctinfo action
+Subject: [PATCH] net: sched: Backport Introduce act_ctinfo action
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
-ctinfo is a new tc filter action module.  It is designed to restore DSCPs
-stored in conntrack marks
+ctinfo is a new tc filter action module.  It is designed to restore
+information contained in firewall conntrack marks to other packet fields
+and is typically used on packet ingress paths.  At present it has two
+independent sub-functions or operating modes, DSCP restoration mode &
+skb mark restoration mode.
 
-The feature is intended for use and has been found useful for restoring
-ingress classifications based on egress classifications across links
-that bleach or otherwise change DSCP, typically home ISP Internet links.
-Restoring DSCP on ingress on the WAN link allows qdiscs such as CAKE to
-shape inbound packets according to policies that are easier to implement
-on egress.
+The DSCP restore mode:
+
+This mode copies DSCP values that have been placed in the firewall
+conntrack mark back into the IPv4/v6 diffserv fields of relevant
+packets.
+
+The DSCP restoration is intended for use and has been found useful for
+restoring ingress classifications based on egress classifications across
+links that bleach or otherwise change DSCP, typically home ISP Internet
+links.  Restoring DSCP on ingress on the WAN link allows qdiscs such as
+but by no means limited to CAKE to shape inbound packets according to
+policies that are easier to set & mark on egress.
 
 Ingress classification is traditionally a challenging task since
 iptables rules haven't yet run and tc filter/eBPF programs are pre-NAT
 lookups, hence are unable to see internal IPv4 addresses as used on the
-typical home masquerading gateway.
-
-ctinfo understands the following parameters:
+typical home masquerading gateway.  Thus marking the connection in some
+manner on egress for later restoration of classification on ingress is
+easier to implement.
 
-dscp mask[/statemask]
+Parameters related to DSCP restore mode:
 
-mask - a 32 bit mask of at least 6 contiguous bits where conndscp will
-place the DSCP in conntrack mark.  The DSCP is left-shifted by the
-number of unset lower bits of the mask before storing into the mark
-field.
+dscpmask - a 32 bit mask of 6 contiguous bits and indicate bits of the
+conntrack mark field contain the DSCP value to be restored.
 
 statemask - a 32 bit mask of (usually) 1 bit length, outside the area
-specified by mask.  This represents a conditional operation flag the
-DSCP is only restored if the flag is set.  This is useful to implement a
-'one shot' iptables based classification where the 'complicated'
-iptables rules are only run once to classify the connection on initial
-(egress) packet and subsequent packets are all marked/restored with the
-same DSCP.  A mask of zero disables the conditional behaviour.
+specified by dscpmask.  This represents a conditional operation flag
+whereby the DSCP is only restored if the flag is set.  This is useful to
+implement a 'one shot' iptables based classification where the
+'complicated' iptables rules are only run once to classify the
+connection on initial (egress) packet and subsequent packets are all
+marked/restored with the same DSCP.  A mask of zero disables the
+conditional behaviour ie. the conntrack mark DSCP bits are always
+restored to the ip diffserv field (assuming the conntrack entry is found
+& the skb is an ipv4/ipv6 type)
+
+e.g. dscpmask 0xfc00 statemask 0x0100
+
+|0xFCconntrack mark00---|
+| Bits 31-26 | bit 25 | bit24 |~~~ Bit 0|
+| DSCP   | unused | flag  |unused   |
+|

[OpenWrt-Devel] [PATCH] dnsmasq: correct sense & usage of dnsseccheckunsigned

2019-11-22 Thread Kevin Darbyshire-Bryant
dnsmasq v2.80 made 'dnssec-check-unsigned' the default, thus the uci
option was rendered ineffectual: we checked unsigned zones no matter the
setting.

Disabling the checking of unsigned zones is now achieve with the
"--dnssec-check-unsigned=no" dnsmasq option.

Update init script to pass required option in the disabled case.

Signed-off-by: Kevin Darbyshire-Bryant 
---
 package/network/services/dnsmasq/Makefile   | 2 +-
 package/network/services/dnsmasq/files/dnsmasq.init | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/network/services/dnsmasq/Makefile 
b/package/network/services/dnsmasq/Makefile
index a1b51896a9..c57a837e9e 100644
--- a/package/network/services/dnsmasq/Makefile
+++ b/package/network/services/dnsmasq/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=dnsmasq
 PKG_UPSTREAM_VERSION:=2.80
 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION)))
-PKG_RELEASE:=14
+PKG_RELEASE:=15
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init 
b/package/network/services/dnsmasq/files/dnsmasq.init
index 1054f7a12a..94a069f1ac 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -966,7 +966,8 @@ dnsmasq_start()
[ -f "$TIMEVALIDFILE" ] || xappend 
"--dnssec-no-timecheck"
}
}
-   append_bool "$cfg" dnsseccheckunsigned "--dnssec-check-unsigned"
+   config_get_bool dnsseccheckunsigned "$cfg" dnsseccheckunsigned 1
+   [ "$dnsseccheckunsigned" -eq 0 ] && xappend 
"--dnssec-check-unsigned=no"
}
 
config_get addmac "$cfg" addmac 0
-- 
2.21.0 (Apple Git-122.2)


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


[OpenWrt-Devel] [PATCH] netifd: dhcp proto convert release to norelease

2019-11-19 Thread Kevin Darbyshire-Bryant
Change dhcp no/release on shutdown to 'norelease' uci option to match
existing proto dhcpv6 usage.

Signed-off-by: Kevin Darbyshire-Bryant 
---
v2 - store the migrate script under netifd structure instead of as part
of base-files

 package/network/config/netifd/Makefile|  2 +-
 .../etc/uci-defaults/14_migrate-dhcp-release  | 23 +++
 .../netifd/files/lib/netifd/proto/dhcp.sh | 10 
 3 files changed, 29 insertions(+), 6 deletions(-)
 create mode 100644 
package/network/config/netifd/files/etc/uci-defaults/14_migrate-dhcp-release

diff --git a/package/network/config/netifd/Makefile 
b/package/network/config/netifd/Makefile
index 875628f66a..e24ebaba30 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=netifd
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
diff --git 
a/package/network/config/netifd/files/etc/uci-defaults/14_migrate-dhcp-release 
b/package/network/config/netifd/files/etc/uci-defaults/14_migrate-dhcp-release
new file mode 100644
index 00..651c437cb2
--- /dev/null
+++ 
b/package/network/config/netifd/files/etc/uci-defaults/14_migrate-dhcp-release
@@ -0,0 +1,23 @@
+. /lib/functions.sh
+
+migrate_release() {
+   local config="$1"
+   local proto
+   local release
+
+   config_get proto "$config" proto
+   config_get release "$config" release
+
+   [ "$proto" = "dhcp" ] && [ -n "$release" ] && {
+   norelease="$((!$release))"
+   uci_set network "$config" norelease "$norelease"
+   uci_remove network "$config" release
+   }
+
+}
+
+config_load network
+config_foreach migrate_release interface
+commit network
+
+exit 0
diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh 
b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
index 0d06eba06e..3034b2ba68 100755
--- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
+++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
@@ -14,7 +14,7 @@ proto_dhcp_init_config() {
proto_config_add_string clientid
proto_config_add_string vendorid
proto_config_add_boolean 'broadcast:bool'
-   proto_config_add_boolean 'release:bool'
+   proto_config_add_boolean 'norelease:bool'
proto_config_add_string 'reqopts:list(string)'
proto_config_add_boolean 'defaultreqopts:bool'
proto_config_add_string iface6rd
@@ -35,8 +35,8 @@ proto_dhcp_setup() {
local config="$1"
local iface="$2"
 
-   local ipaddr hostname clientid vendorid broadcast release reqopts 
defaultreqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes 
classlessroute
-   json_get_vars ipaddr hostname clientid vendorid broadcast release 
reqopts defaultreqopts iface6rd delegate zone6rd zone mtu6rd customroutes 
classlessroute
+   local ipaddr hostname clientid vendorid broadcast norelease reqopts 
defaultreqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes 
classlessroute
+   json_get_vars ipaddr hostname clientid vendorid broadcast norelease 
reqopts defaultreqopts iface6rd delegate zone6rd zone mtu6rd customroutes 
classlessroute
 
local opt dhcpopts
for opt in $reqopts; do
@@ -50,7 +50,7 @@ proto_dhcp_setup() {
 
[ "$defaultreqopts" = 0 ] && defaultreqopts="-o" || defaultreqopts=
[ "$broadcast" = 1 ] && broadcast="-B" || broadcast=
-   [ "$release" = 1 ] && release="-R" || release=
+   [ "$norelease" = 1 ] && norelease="" || norelease="-R"
[ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || 
clientid="-C"
[ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd"
[ "$iface6rd" != 0 -a -f /lib/netifd/proto/6rd.sh ] && append dhcpopts 
"-O 212"
@@ -70,7 +70,7 @@ proto_dhcp_setup() {
${ipaddr:+-r $ipaddr} \
${hostname:+-x "hostname:$hostname"} \
${vendorid:+-V "$vendorid"} \
-   $clientid $defaultreqopts $broadcast $release $dhcpopts
+   $clientid $defaultreqopts $broadcast $norelease $dhcpopts
 }
 
 proto_dhcp_renew() {
-- 
2.21.0 (Apple Git-122.2)


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


[OpenWrt-Devel] [PATCH] netifd: dhcp proto convert release to norelease

2019-11-19 Thread Kevin Darbyshire-Bryant
Change dhcp no/release on shutdown to 'norelease' uci option to match
existing proto dhcpv6 usage.

Signed-off-by: Kevin Darbyshire-Bryant 
---
 .../etc/uci-defaults/14_migrate-dhcp-release  | 23 +++
 package/network/config/netifd/Makefile|  2 +-
 .../netifd/files/lib/netifd/proto/dhcp.sh | 10 
 3 files changed, 29 insertions(+), 6 deletions(-)
 create mode 100644 
package/base-files/files/etc/uci-defaults/14_migrate-dhcp-release

diff --git a/package/base-files/files/etc/uci-defaults/14_migrate-dhcp-release 
b/package/base-files/files/etc/uci-defaults/14_migrate-dhcp-release
new file mode 100644
index 00..651c437cb2
--- /dev/null
+++ b/package/base-files/files/etc/uci-defaults/14_migrate-dhcp-release
@@ -0,0 +1,23 @@
+. /lib/functions.sh
+
+migrate_release() {
+   local config="$1"
+   local proto
+   local release
+
+   config_get proto "$config" proto
+   config_get release "$config" release
+
+   [ "$proto" = "dhcp" ] && [ -n "$release" ] && {
+   norelease="$((!$release))"
+   uci_set network "$config" norelease "$norelease"
+   uci_remove network "$config" release
+   }
+
+}
+
+config_load network
+config_foreach migrate_release interface
+commit network
+
+exit 0
diff --git a/package/network/config/netifd/Makefile 
b/package/network/config/netifd/Makefile
index 875628f66a..e24ebaba30 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=netifd
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh 
b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
index 0d06eba06e..3034b2ba68 100755
--- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
+++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
@@ -14,7 +14,7 @@ proto_dhcp_init_config() {
proto_config_add_string clientid
proto_config_add_string vendorid
proto_config_add_boolean 'broadcast:bool'
-   proto_config_add_boolean 'release:bool'
+   proto_config_add_boolean 'norelease:bool'
proto_config_add_string 'reqopts:list(string)'
proto_config_add_boolean 'defaultreqopts:bool'
proto_config_add_string iface6rd
@@ -35,8 +35,8 @@ proto_dhcp_setup() {
local config="$1"
local iface="$2"
 
-   local ipaddr hostname clientid vendorid broadcast release reqopts 
defaultreqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes 
classlessroute
-   json_get_vars ipaddr hostname clientid vendorid broadcast release 
reqopts defaultreqopts iface6rd delegate zone6rd zone mtu6rd customroutes 
classlessroute
+   local ipaddr hostname clientid vendorid broadcast norelease reqopts 
defaultreqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes 
classlessroute
+   json_get_vars ipaddr hostname clientid vendorid broadcast norelease 
reqopts defaultreqopts iface6rd delegate zone6rd zone mtu6rd customroutes 
classlessroute
 
local opt dhcpopts
for opt in $reqopts; do
@@ -50,7 +50,7 @@ proto_dhcp_setup() {
 
[ "$defaultreqopts" = 0 ] && defaultreqopts="-o" || defaultreqopts=
[ "$broadcast" = 1 ] && broadcast="-B" || broadcast=
-   [ "$release" = 1 ] && release="-R" || release=
+   [ "$norelease" = 1 ] && norelease="" || norelease="-R"
[ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || 
clientid="-C"
[ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd"
[ "$iface6rd" != 0 -a -f /lib/netifd/proto/6rd.sh ] && append dhcpopts 
"-O 212"
@@ -70,7 +70,7 @@ proto_dhcp_setup() {
${ipaddr:+-r $ipaddr} \
${hostname:+-x "hostname:$hostname"} \
${vendorid:+-V "$vendorid"} \
-   $clientid $defaultreqopts $broadcast $release $dhcpopts
+   $clientid $defaultreqopts $broadcast $norelease $dhcpopts
 }
 
 proto_dhcp_renew() {
-- 
2.21.0 (Apple Git-122.2)


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


[OpenWrt-Devel] Merged: rb532: Fix missing DEVICE_TITLE

2019-07-09 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


Re: [OpenWrt-Devel] [RFC]merge routing repository to packages

2019-07-05 Thread Kevin Darbyshire-Bryant


> On 5 Jul 2019, at 13:26, Paul Spooren  wrote:
> 
> Hi all,
> 
> just as a notification as I don't want to spread the discussion to all
> kinds of platforms:
> 
> I proposed (actually jow in 2017) to merge openwrt-routing/packages into
> openwrt/packages subfolder net.
> 
> Please find the current discussion at GitHub[0].
> 
> This is intended to be a transfer, not a fixup. Fixes of legacy/broken
> Makefiles are welcome in the future!

Do it!  NOW :-)

KDB


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


[OpenWrt-Devel] [PATCH 1/1] kmod-sched-cake: drop out of tree package, use kernel version

2019-07-03 Thread Kevin Darbyshire-Bryant
CAKE made it to kernel 4.19 and since OpenWrt now at kernel 4.19 we can
drop the out of tree cake package in base repository.

Add kmod-sched-cake to netsupport so package dependencies are still met.
Similarly CAKE is retained as an optional qdisc module to avoid base
scheduler package size implications.

Backport upstream patches from k5.1 to address some small bugs and
support fwmark usage.

Signed-off-by: Kevin Darbyshire-Bryant 
---
 package/kernel/kmod-sched-cake/Makefile   |  42 
 package/kernel/linux/modules/netsupport.mk|  16 ++
 ...ly-update-parent-qlen-when-splitting.patch |  50 
 ...-sch_cake-Make-the-dual-modes-fairer.patch | 217 ++
 ...-use-of-connmarks-as-tin-classifiers.patch | 118 ++
 ...erpret-fwmark-parameter-as-a-bitmask.patch | 102 
 6 files changed, 503 insertions(+), 42 deletions(-)
 delete mode 100644 package/kernel/kmod-sched-cake/Makefile
 create mode 100644 
target/linux/generic/backport-4.19/391-v5.1-sch_cake-Correctly-update-parent-qlen-when-splitting.patch
 create mode 100644 
target/linux/generic/backport-4.19/392-v5.1-sch_cake-Make-the-dual-modes-fairer.patch
 create mode 100644 
target/linux/generic/backport-4.19/393-v5.1-sch_cake-Permit-use-of-connmarks-as-tin-classifiers.patch
 create mode 100644 
target/linux/generic/backport-4.19/394-v5.1-sch_cake-Interpret-fwmark-parameter-as-a-bitmask.patch

diff --git a/package/kernel/kmod-sched-cake/Makefile 
b/package/kernel/kmod-sched-cake/Makefile
deleted file mode 100644
index 35446641ab..00
--- a/package/kernel/kmod-sched-cake/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (C) 2016 LEDE
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/kernel.mk
-
-PKG_NAME:=sched-cake
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/dtaht/sch_cake.git
-PKG_SOURCE_DATE:=2019-03-12
-PKG_SOURCE_VERSION:=057c738801e9dc64e8dd72a3fc4f50734214433c
-PKG_MIRROR_HASH:=5bf06a804824db36ae393fc174aeec7b12633176e05a765c0931b39df5bd34df
-PKG_MAINTAINER:=Kevin Darbyshire-Bryant 
-
-include $(INCLUDE_DIR)/package.mk
-
-define KernelPackage/sched-cake
-  SUBMENU:=Network Support
-  TITLE:=Cake fq_codel/blue derived shaper
-  URL:=https://github.com/dtaht/sch_cake
-  FILES:=$(PKG_BUILD_DIR)/sch_cake.ko
-  AUTOLOAD:=$(call AutoLoad,75,sch_cake)
-  DEPENDS:=+kmod-ipt-conntrack
-endef
-
-include $(INCLUDE_DIR)/kernel-defaults.mk
-
-define KernelPackage/sched-cake/description
-  Common Applications Kept Enhanced fq_codel/blue derived shaper
-endef
-
-define Build/Compile
-   $(KERNEL_MAKE) SUBDIRS="$(PKG_BUILD_DIR)" modules
-endef
-
-$(eval $(call KernelPackage,sched-cake))
diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index 6bd1f33979..9af6cbb674 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -789,6 +789,22 @@ endef
 $(eval $(call KernelPackage,sched-core))
 
 
+define KernelPackage/sched-cake
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=Cake fq_codel/blue derived shaper
+  DEPENDS:=+kmod-sched-core
+  KCONFIG:=CONFIG_NET_SCH_CAKE
+  FILES:=$(LINUX_DIR)/net/sched/sch_cake.ko
+  AUTOLOAD:=$(call AutoProbe,sch_cake)
+  DEPENDS:=+kmod-ipt-conntrack
+endef
+
+define KernelPackage/sched-cake/description
+ Common Applications Kept Enhanced fq_codel/blue derived shaper
+endef
+
+$(eval $(call KernelPackage,sched-cake))
+
 define KernelPackage/sched-flower
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=Flower traffic classifier
diff --git 
a/target/linux/generic/backport-4.19/391-v5.1-sch_cake-Correctly-update-parent-qlen-when-splitting.patch
 
b/target/linux/generic/backport-4.19/391-v5.1-sch_cake-Correctly-update-parent-qlen-when-splitting.patch
new file mode 100644
index 00..f6de44568a
--- /dev/null
+++ 
b/target/linux/generic/backport-4.19/391-v5.1-sch_cake-Correctly-update-parent-qlen-when-splitting.patch
@@ -0,0 +1,50 @@
+From 8c6c37fdc20ec9ffaa342f827a8e20afe736fb0c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= 
+Date: Wed, 9 Jan 2019 17:09:44 +0100
+Subject: [PATCH] sch_cake: Correctly update parent qlen when splitting GSO
+ packets
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+To ensure parent qdiscs have the same notion of the number of enqueued
+packets even after splitting a GSO packet, update the qdisc tree with the
+number of packets that was added due to the split.
+
+Reported-by: Pete Heist 
+Tested-by: Pete Heist 
+Signed-off-by: Toke Høiland-Jørgensen 
+Signed-off-by: David S. Miller 
+Signed-off-by: Kevin Darbyshire-Bryant 
+---
+ net/sched/sch_cake.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/net/sched/sch_cake.c
 b/net/sched/sch_cake.c
+@@ -1666,7 +1666,7 @@ static s32 cake_enqueue(stru

Re: [OpenWrt-Devel] Problems w/ "make defconfig oldconfig" after rebasing

2019-06-30 Thread Kevin Darbyshire-Bryant


> On 30 Jun 2019, at 19:27, Philip Prindeville 
>  wrote:
> 
> I’ve been busy with other things, and just had a chance to try to get caught 
> up with OpenWRT and my tickets, etc.  I rebased openwrt and packages, then 
> did “make defconfig oldconfig” but I’m seeing:
> 
> WARNING: Makefile 'package/feeds/packages/zabbix/Makefile' has a dependency 
> on 'libmariadbclient', which does not exist
> WARNING: Makefile 'package/feeds/packages/zabbix/Makefile' has a dependency 
> on 'libmariadbclient', which does not exist
> tmp/.config-package.in:55: syntax error
> tmp/.config-package.in:54: invalid option
> tmp/.config-package.in:13106: syntax error
> tmp/.config-package.in:13105: invalid option
> 
> Looking at this file, I get:
> 
>53  select PACKAGE_attendedsysupgrade-common
>54  select PACKAGE_ucert if PACKAGE_ucert-full55  select PACKAGE_libblobmsg-json
>56  help
>57   CLI client for attended-sysupgrade
> 
> …
> 
> 11304
> 11305  config PACKAGE_kmod-ipt-conntrack
> 11306  tristate "kmod-ipt-conntrack. 
> Basic connection tracking modules"
> 11307  default y if DEFAULT_kmod-ipt-conntrack
> 11308  default m if ALL||ALL_NONSHARED||ALL_KMODS
> 
> etc.
> 
> I’m building with:
> 
> commit 4c8d5cd20e467c76db185742f9f92fd64eaa36c8
> Author: 李国 
> Date:   Thu Apr 4 03:42:16 2019 +
> 
>x86: add EFI images and make iso images EFI bootable
> 
> cherry-picked into my tree, but this should be the cause.
> 
> Anyone have an idea of what’s going on?

There were some tweaks to how config interpreted package definitions.  
Unfortunately ‘make’ doesn’t pick up the changes to config’s source, so it 
needs to be manually cleaned.

make -C scripts/config clean

Should do the trick.  I got bitten by this too :-)


Cheers,

Kevin D-B

gpg: 012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A



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


Re: [OpenWrt-Devel] ath10k-ct 4.19 and IBSS

2019-06-27 Thread Kevin Darbyshire-Bryant


> On 27 Jun 2019, at 15:49, Koen Vandeputte  
> wrote:
> 
> 
>> On 6/27/19 7:17 AM, Koen Vandeputte wrote:
> 
> I'm really wondering if the additional openwrt patches on top come in play 
> here ..
> I'm not able to even send a simple ping across the link.

Agreed.  The ath10k-ct patches in package/kernel/ath10k-ct/patches make for 
disturbing reading although they apply cleanly.

Cheers,

Kevin D-B

gpg: 012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A



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


Re: [OpenWrt-Devel] New ath10k-ct firmware and driver available

2019-06-13 Thread Kevin Darbyshire-Bryant


> On 13 Jun 2019, at 16:54, Ben Greear  wrote:
> 
> 
> Here are recent release notes:
> 
> wave-1:
> 
>  *  May 9, 2019:  Tweak rate-ctrl:  Ramp PER up faster, down slower.  This 
> helps throughput
>   in rate-vs-range test, especially with nss1.
> 
>  *  May 20, 2019:  Disable adaptive-CCA.  I am not sure it helps, and it may 
> make it slower
>to detect noise that should tell the system to stop 
> transmitting.  If someone
>has means to test this properly, I'd be happy to work with 
> them.
> 
> wave-2:
> 
>  *  May 15, 2019  Fix problem where rate-ctrl sometimes used rix of 0x0.
> 
>  *  May 15, 2019  Allow raw-tx of encrypted frame.  Requires a patch to the 
> driver to use
>   raw mode when skb has WEP flag enabled AND skb is flagged 
> to not be
>   encrypted.  Lightly tested.
> 
>  *  May 16, 2019  Fix tx-hang that happened when rate-ctrl chose an OFDM rate 
> for 20Mhz
>   and sent that as AMPDU.  To fix, limit to (V)HT rates if 
> peer is (V)HT.
>   It seems that MCS0 (V)HT20 should have as good of a chance 
> of being
>   detected as CCK or OFDM.
> 
>  *  June 6, 2019  Disable TX-BFEE, TX-BFER for IBSS connections.  I suspect 
> this is part of the tx-hang
>   issue seen with IBSS between two 9984 radios.
> 
>  *  June 12, 2019  Fix rx-rate reporting in 'fw_stats' logic.  This was at 
> least partly due to regressions
>I had added earlier when working on some multi-vdev 
> enhancements.
> 
>  *  June 12, 2019  Fix case where extd peer-stats were not always populated.  
> The stats gathering
>code did not handle error conditions well.
> 
> 
> Driver changes include:
> * Fixing mfp/pmf for management frames (in htt-mgt mode)
> * Sven's txpower related fixes
> * raw tx of encrypted frames works (on wave 2, at least)

Done.

Cheers,

Kevin D-B

gpg: 012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A



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


[OpenWrt-Devel] [firewall3] utils: coverity resource leak warning

2019-06-12 Thread Kevin Darbyshire-Bryant
solve coverity reported resource leak (socket handle)

Signed-off-by: Kevin Darbyshire-Bryant 
---
 utils.c | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/utils.c b/utils.c
index 7f09787..fc6bbd7 100644
--- a/utils.c
+++ b/utils.c
@@ -944,18 +944,24 @@ bool
 fw3_check_loopback_dev(const char *name)
 {
struct ifreq ifr;
-   int s = socket(AF_LOCAL, SOCK_DGRAM, 0);
+   int s;
bool rv = false;
 
+   s = socket(AF_LOCAL, SOCK_DGRAM, 0);
+
+   if (s < 0)
+   return false;
+
memset(, 0, sizeof(ifr));
strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name) - 1);
 
-   if (s < 0 || ioctl(s, SIOCGIFFLAGS, ) < 0)
-   goto out;
+   if (ioctl(s, SIOCGIFFLAGS, ) >= 0) {
+   if (ifr.ifr_flags & IFF_LOOPBACK)
+   rv = true;
+   }
+
+   close(s);
 
-   if (ifr.ifr_flags & IFF_LOOPBACK)
-   rv = true;
-out:
return rv;
 }
 
-- 
2.20.1 (Apple Git-117)


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


[OpenWrt-Devel] Merged: kernel: b53: register switch on probe

2018-11-23 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


[OpenWrt-Devel] Merged: tools: tplink-safeloader: add C7v5 EU SupportList

2018-11-23 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


[OpenWrt-Devel] [PATCH] hostapd: add utf8_ssid flag & enable as default

2018-11-14 Thread Kevin Darbyshire-Bryant
SSIDs may contain UTF8 characters but ideally hostapd should be told
this is the case so it can advertise the fact. Default enable this
option.

add uci option utf8_ssid '0'/'1' for disable/enable e.g.

config wifi-iface
option utf8_ssid '0'

Signed-off-by: Kevin Darbyshire-Bryant 
---
 package/network/services/hostapd/Makefile | 2 +-
 package/network/services/hostapd/files/hostapd.sh | 6 --
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index bf9a64419d..45c394640d 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:=5
+PKG_RELEASE:=6
 
 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 540d1182cc..7f3157cd27 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -168,7 +168,7 @@ EOF
 
 hostapd_common_add_bss_config() {
config_add_string 'bssid:macaddr' 'ssid:string'
-   config_add_boolean wds wmm uapsd hidden
+   config_add_boolean wds wmm uapsd hidden utf8_ssid
 
config_add_int maxassoc max_inactivity
config_add_boolean disassoc_low_ack isolate short_preamble
@@ -258,7 +258,7 @@ hostapd_set_bss_options() {
maxassoc max_inactivity disassoc_low_ack isolate auth_cache \
wps_pushbutton wps_label ext_registrar wps_pbc_in_m1 
wps_ap_setup_locked \
wps_independent wps_device_type wps_device_name 
wps_manufacturer wps_pin \
-   macfilter ssid wmm uapsd hidden short_preamble rsn_preauth \
+   macfilter ssid utf8_ssid wmm uapsd hidden short_preamble 
rsn_preauth \
iapp_interface eapol_version dynamic_vlan ieee80211w nasid \
acct_server acct_secret acct_port acct_interval \
bss_load_update_period chan_util_avg_period sae_require_mfp
@@ -277,6 +277,7 @@ hostapd_set_bss_options() {
set_default acct_port 1813
set_default bss_load_update_period 60
set_default chan_util_avg_period 600
+   set_default utf8_ssid 1

append bss_conf "ctrl_interface=/var/run/hostapd"
if [ "$isolate" -gt 0 ]; then
@@ -296,6 +297,7 @@ hostapd_set_bss_options() {
append bss_conf "wmm_enabled=$wmm" "$N"
append bss_conf "ignore_broadcast_ssid=$hidden" "$N"
append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N"
+   append bss_conf "utf8_ssid=$utf8_ssid" "$N"
 
[ "$tdls_prohibit" -gt 0 ] && append bss_conf 
"tdls_prohibit=$tdls_prohibit" "$N"
 
-- 
2.17.2 (Apple Git-113)


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


[OpenWrt-Devel] Merged: ipq40xx: fix NBG6617 LED mapping

2018-11-04 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


Re: [OpenWrt-Devel] [PATCH v2] kernel: revert evil EVIL module stripping patches

2018-10-28 Thread Kevin Darbyshire-Bryant


> On 27 Oct 2018, at 23:29, Daniel Santos  wrote:
> 
> Don't ever EVER do this!  It has taken me several hours to discover the
> underlying cause of my modules being mysteriously stripped, despite
> having made certain CONFIG_MODULE_STRIP was not enabled.  This is a
> truely horrendous and dispicable way to strip modules.  First of all, it
> is insideious and activates any time you aren't profiling.  Second, it
> also brakes kmemleak.
> 
> Never go behind the back of the programmer / admin / hacker and do
> things like this without their permission.  In Free and Open Source
> Software, we do not force things to happen that the user has not elected
> to have done.  If you really want excessive stripping for that extra 4k,
> then add a distinct option to remove all symbols.
> 
> Signed-off-by: Daniel Santos 

I suggest that a less emotionally charged commit title & message would be more 
appropriate.

PS: ‘breaks’ not ‘brakes'


Cheers,

Kevin D-B

012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A

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


[OpenWrt-Devel] Merged: tools/xz: Add PKG_CPE_ID for proper CVE tracking

2018-10-16 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


[OpenWrt-Devel] Merged: tools/libressl: Add PKG_CPE_ID for proper CVE tracking

2018-10-16 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


Re: [OpenWrt-Devel] [PATCH] patch: Add missing CVE

2018-10-16 Thread Kevin Darbyshire-Bryant



> On 15 Oct 2018, at 18:17, Rosen Penev  wrote:
> 
> uscan reports a new CVE now that PKG_CPE_ID was added.
> 
> Reordered patches by date.
> 
> Signed-off-by: Rosen Penev 
> ---
> tools/patch/Makefile  |  2 +-
> tools/patch/patches/010-CVE-2018-6951.patch   | 29 +++
> ...00156.patch => 020-CVE-2018-1000156.patch} | 20 +++--
> ...018-6952.patch => 030-CVE-2018-6952.patch} |  9 --
> 4 files changed, 48 insertions(+), 12 deletions(-)
> create mode 100644 tools/patch/patches/010-CVE-2018-6951.patch
> rename tools/patch/patches/{010-CVE-2018-1000156.patch => 
> 020-CVE-2018-1000156.patch} (89%)
> rename tools/patch/patches/{020-CVE-2018-6952.patch => 
> 030-CVE-2018-6952.patch} (78%)
> 
> diff --git a/tools/patch/Makefile b/tools/patch/Makefile
> index 0f4d7f0326..7323b5b2ab 100644
> --- a/tools/patch/Makefile
> +++ b/tools/patch/Makefile
> @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
> 
> PKG_NAME:=patch
> PKG_VERSION:=2.7.6
> -PKG_RELEASE:=2
> +PKG_RELEASE:=3
> PKG_CPE_ID:=cpe:/a:gnu:patch
> 
> PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
> diff --git a/tools/patch/patches/010-CVE-2018-6951.patch 
> b/tools/patch/patches/010-CVE-2018-6951.patch
> new file mode 100644
> index 00..5dbcb35e29
> --- /dev/null
> +++ b/tools/patch/patches/010-CVE-2018-6951.patch
> @@ -0,0 +1,29 @@
> +From 1f7853c05f9949d81da9be7a02b90cc64284d1f8 Mon Sep 17 00:00:00 2001
> +From: Andreas Gruenbacher 
> +Date: Mon, 12 Feb 2018 16:48:24 +0100
> +Subject: [PATCH] Fix segfault with mangled rename patch
> +
> +http://savannah.gnu.org/bugs/?53132
> +* src/pch.c (intuit_diff_type): Ensure that two filenames are specified
> +for renames and copies (fix the existing check).
> +---
> + src/pch.c | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/src/pch.c b/src/pch.c
> +index ff9ed2c..bc6278c 100644
> +--- a/src/pch.c
>  b/src/pch.c
> +@@ -974,7 +974,8 @@ intuit_diff_type (bool need_header, mode_t *p_file_type)
> + if ((pch_rename () || pch_copy ())
> + && ! inname
> + && ! ((i == OLD || i == NEW) &&
> +-  p_name[! reverse] &&
> ++  p_name[reverse] && p_name[! reverse] &&
> ++  name_is_valid (p_name[reverse]) &&
> +   name_is_valid (p_name[! reverse])))
> +   {
> + say ("Cannot %s file without two valid file names\n", pch_rename () ? 
> "rename" : "copy");
> +-- 
> +2.19.1
> +
> diff --git a/tools/patch/patches/010-CVE-2018-1000156.patch 
> b/tools/patch/patches/020-CVE-2018-1000156.patch
> similarity index 89%
> rename from tools/patch/patches/010-CVE-2018-1000156.patch
> rename to tools/patch/patches/020-CVE-2018-1000156.patch
> index 7114f82e8f..83b6d84637 100644
> --- a/tools/patch/patches/010-CVE-2018-1000156.patch
> +++ b/tools/patch/patches/020-CVE-2018-1000156.patch
> @@ -1,4 +1,4 @@
> -From ee2904728eb4364a36d62d66f723d0b68749e5df Mon Sep 17 00:00:00 2001
> +From b3a0ca3deed00334f9feece43f76776b6a168e47 Mon Sep 17 00:00:00 2001
> From: Andreas Gruenbacher 
> Date: Fri, 6 Apr 2018 12:14:49 +0200
> Subject: [PATCH] Fix arbitrary command execution in ed-style patches
> @@ -10,12 +10,11 @@ instead of rejecting them and carrying on.
> * tests/ed-style: New test case.
> * tests/Makefile.am (TESTS): Add test case.
> ---
> - src/pch.c | 89 +++
> - tests/Makefile.am |  1 +
> - tests/ed-style| 41 ++
> - 3 files changed, 108 insertions(+), 23 deletions(-)
> - create mode 100644 tests/ed-style
> + src/pch.c | 89 +--
> + 1 file changed, 66 insertions(+), 23 deletions(-)
> 
> +diff --git a/src/pch.c b/src/pch.c
> +index bc6278c..4fd5a05 100644
> --- a/src/pch.c
> +++ b/src/pch.c
> @@ -33,6 +33,7 @@
> @@ -26,7 +25,7 @@ instead of rejecting them and carrying on.
> 
>  #define INITHUNKMAX 125  /* initial dynamic allocation 
> size */
> 
> -@@ -2388,22 +2389,28 @@ do_ed_script (char const *inname, char c
> +@@ -2389,22 +2390,28 @@ do_ed_script (char const *inname, char const 
> *outname,
>  static char const editor_program[] = EDITOR_PROGRAM;
> 
>  file_offset beginning_of_this_line;
> @@ -69,7 +68,7 @@ instead of rejecting them and carrying on.
>  for (;;) {
>   char ed_command_letter;
>   beginning_of_this_line = file_tell (pfp);
> -@@ -2414,14 +2421,14 @@ do_ed_script (char const *inname, char c
> +@@ -2415,14 +2422,14 @@ do_ed_script (char const *inname, char const 
> *outname,
>   }
>   ed_command_letter = get_ed_command_letter (buf);
>   if (ed_command_letter) {
> @@ -88,7 +87,7 @@ instead of rejecting them and carrying on.
>   write_fatal ();
>   if (chars_read == 2  &&  strEQ (buf, ".\n"))
>   break;
> -@@ -2434,13 +2441,49 @@ do_ed_script (char const *inname, char c
> +@@ -2435,13 +2442,49 @@ do_ed_script (char const *inname, char const 
> *outname,
>   

[OpenWrt-Devel] Merged: patch: apply upstream cve fixes

2018-10-14 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


Re: [OpenWrt-Devel] [RFC PATCH 0/2] wpad basic variant

2018-10-12 Thread Kevin Darbyshire-Bryant


> On 12 Oct 2018, at 16:26, Kevin Darbyshire-Bryant 
>  wrote:
> 
> Peoples!

And I should mention, credit, thank that nice Mr Kresin for doing the ‘switch 
to basic’ patch for relevant targets.

Cheers,

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


[OpenWrt-Devel] [PATCH 2/2] treewide: use wpad-basic for not small flash targets

2018-10-12 Thread Kevin Darbyshire-Bryant
From: Mathias Kresin 

Add out of the box support for 802.11r and 802.11w to all targets not
suffering from small flash.

Signed-off-by: Mathias Kresin 
Signed-off-by: Kevin Darbyshire-Bryant 
---
 .../linux/adm8668/profiles/100-WRTU54G-TM.mk  |  2 +-
 target/linux/apm821xx/image/Makefile  |  2 +-
 target/linux/apm821xx/nand/target.mk  |  2 +-
 .../apm821xx/sata/profiles/00-default.mk  |  2 +-
 target/linux/ar7/generic/target.mk|  2 +-
 target/linux/ar71xx/Makefile  |  2 +-
 target/linux/ar71xx/generic/target.mk |  2 +
 target/linux/ar71xx/image/generic.mk  |  4 +-
 target/linux/ar71xx/mikrotik/target.mk|  2 +-
 target/linux/ar71xx/nand/target.mk|  2 +
 target/linux/ar71xx/tiny/target.mk|  2 +
 .../arc770/generic/profiles/00-default.mk |  2 +-
 .../archs38/generic/profiles/00-default.mk|  2 +-
 target/linux/ath79/Makefile   |  2 +-
 target/linux/ath79/generic/target.mk  |  2 +
 target/linux/ath79/nand/target.mk |  2 +
 target/linux/ath79/tiny/target.mk |  2 +
 target/linux/au1000/au1500/target.mk  |  2 -
 target/linux/au1000/au1550/target.mk  |  2 -
 target/linux/bcm53xx/image/Makefile   |  2 +-
 target/linux/brcm2708/image/Makefile  |  6 +-
 target/linux/brcm47xx/Makefile|  2 +-
 .../generic/profiles/101-Broadcom-wl.mk   |  2 +-
 .../generic/profiles/105-Broadcom-none.mk |  2 +-
 .../generic/profiles/201-Broadcom-b44-wl.mk   |  2 +-
 .../generic/profiles/205-Broadcom-b44-none.mk |  2 +-
 .../generic/profiles/211-Broadcom-tg3-wl.mk   |  2 +-
 .../generic/profiles/215-Broadcom-tg3-none.mk |  2 +-
 .../generic/profiles/221-Broadcom-bgmac-wl.mk |  2 +-
 .../profiles/225-Broadcom-bgmac-none.mk   |  2 +-
 .../brcm47xx/generic/profiles/PS-1208MFG.mk   |  2 +-
 target/linux/brcm47xx/generic/target.mk   |  2 +
 target/linux/brcm47xx/legacy/target.mk|  2 +
 .../mips74k/profiles/102-Broadcom-wl.mk   |  2 +-
 .../mips74k/profiles/103-Broadcom-none.mk |  2 +-
 target/linux/brcm47xx/mips74k/target.mk   |  2 +
 target/linux/brcm63xx/image/Makefile  | 10 +--
 target/linux/brcm63xx/profiles/default.mk |  2 +-
 target/linux/cns3xxx/Makefile |  2 +-
 target/linux/ipq40xx/Makefile |  2 +-
 target/linux/ipq806x/Makefile |  2 +-
 .../ixp4xx/generic/profiles/200-NSLU2.mk  |  2 +-
 .../ixp4xx/generic/profiles/500-USR8200.mk|  2 +-
 target/linux/ixp4xx/generic/target.mk |  2 +-
 target/linux/kirkwood/image/Makefile  |  4 +-
 target/linux/kirkwood/profiles/00-default.mk  |  2 +-
 target/linux/lantiq/image/Makefile| 66 +--
 target/linux/lantiq/image/tp-link.mk  |  4 +-
 target/linux/malta/Makefile   |  2 +-
 target/linux/mediatek/Makefile|  2 +-
 target/linux/mpc85xx/Makefile |  2 +-
 target/linux/mpc85xx/image/Makefile   |  4 +-
 target/linux/mvebu/image/cortex-a9.mk |  4 +-
 target/linux/mvebu/profiles/000-Default.mk|  2 +-
 target/linux/omap/profiles/00-default.mk  |  2 +-
 target/linux/orion/Makefile   |  2 +-
 target/linux/ramips/image/mt7621.mk   | 58 
 target/linux/ramips/image/rt305x.mk   |  2 +-
 target/linux/ramips/mt7620/target.mk  |  2 +-
 target/linux/ramips/mt76x8/target.mk  |  2 +-
 target/linux/rb532/Makefile   |  2 +-
 target/linux/sunxi/image/cortex-a7.mk |  4 +-
 target/linux/sunxi/profiles/00-default.mk |  2 +-
 target/linux/uml/Makefile |  2 +-
 target/linux/x86/geode/target.mk  |  2 +-
 65 files changed, 144 insertions(+), 130 deletions(-)

diff --git a/target/linux/adm8668/profiles/100-WRTU54G-TM.mk 
b/target/linux/adm8668/profiles/100-WRTU54G-TM.mk
index 3ff0307061..fa7c11495b 100644
--- a/target/linux/adm8668/profiles/100-WRTU54G-TM.mk
+++ b/target/linux/adm8668/profiles/100-WRTU54G-TM.mk
@@ -7,7 +7,7 @@
 
 define Profile/WRTU54G-TM
   NAME:=Linksys WRTU54G T-Mobile (Default)
-  PACKAGES:=kmod-rt61-pci kmod-usb2 wpad-mini
+  PACKAGES:=kmod-rt61-pci kmod-usb2 wpad-basic
 endef
 
 define Profile/WRTU54G-TM/Description
diff --git a/target/linux/apm821xx/image/Makefile 
b/target/linux/apm821xx/image/Makefile
index 00ab19602d..4a6ca9b633 100644
--- a/target/linux/apm821xx/image/Makefile
+++ b/target/linux/apm821xx/image/Makefile
@@ -216,7 +216,7 @@ endef
 
 define Device/wd_mybooklive
   DEVICE_TITLE := Western Digital My Book Live Series (Single + Duo)
-  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-usb-storage 
kmod-fs-vfat wpad-mini
+  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-usb-storage 
kmod-fs-vfat wpad-basic
   DEVICE_DTS := wd-mybooklive
   SUPPORTED_DEVICES += mbl wd_mybooklive-duo
   BLOCKSIZE := 1k
diff --git a/target

[OpenWrt-Devel] [PATCH 1/2] hostapd: add basic variant

2018-10-12 Thread Kevin Darbyshire-Bryant
Add a basic variant which provides WPA-PSK only, 802.11r and 802.11w.

Signed-off-by: Kevin Darbyshire-Bryant 
---
 include/target.mk |   2 +-
 package/network/services/hostapd/Config.in|   6 +
 package/network/services/hostapd/Makefile |  37 ++
 .../hostapd/files/hostapd-basic.config| 380 +++
 .../hostapd/files/wpa_supplicant-basic.config | 593 ++
 5 files changed, 1017 insertions(+), 1 deletion(-)
 create mode 100644 package/network/services/hostapd/files/hostapd-basic.config
 create mode 100644 
package/network/services/hostapd/files/wpa_supplicant-basic.config

diff --git a/include/target.mk b/include/target.mk
index 88beae5001..1d6888fde3 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -59,7 +59,7 @@ endif
 DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE))
 
 filter_packages = $(filter-out -% $(patsubst -%,%,$(filter -%,$(1))),$(1))
-extra_packages = $(if $(filter wpad-mini wpad nas,$(1)),iwinfo)
+extra_packages = $(if $(filter wpad-mini wpad-basic wpad nas,$(1)),iwinfo)
 
 define ProfileDefault
   NAME:=
diff --git a/package/network/services/hostapd/Config.in 
b/package/network/services/hostapd/Config.in
index 222cfb7f13..578fba839c 100644
--- a/package/network/services/hostapd/Config.in
+++ b/package/network/services/hostapd/Config.in
@@ -6,11 +6,13 @@ config WPA_SUPPLICANT_NO_TIMESTAMP_CHECK
   PACKAGE_wpa-supplicant-wolfssl || \
   PACKAGE_wpa-supplicant-mesh-openssl || \
   PACKAGE_wpa-supplicant-mesh-wolfssl || \
+  PACKAGE_wpa-supplicant-basic || \
   PACKAGE_wpa-supplicant-mini || \
   PACKAGE_wpa-supplicant-p2p || \
   PACKAGE_wpad || \
   PACKAGE_wpad-openssl || \
   PACKAGE_wpad-wolfssl || \
+  PACKAGE_wpad-basic || \
   PACKAGE_wpad-mini || \
   PACKAGE_wpad-mesh-openssl || \
   PACKAGE_wpad-mesh-wolfssl
@@ -26,11 +28,13 @@ config WPA_RFKILL_SUPPORT
   PACKAGE_wpa-supplicant-wolfssl || \
   PACKAGE_wpa-supplicant-mesh-openssl || \
   PACKAGE_wpa-supplicant-mesh-wolfssl || \
+  PACKAGE_wpa-supplicant-basic || \
   PACKAGE_wpa-supplicant-mini || \
   PACKAGE_wpa-supplicant-p2p || \
   PACKAGE_wpad || \
   PACKAGE_wpad-openssl || \
   PACKAGE_wpad-wolfssl || \
+  PACKAGE_wpad-basic || \
   PACKAGE_wpad-mini || \
   PACKAGE_wpad-mesh-openssl || \
   PACKAGE_wpad-mesh-wolfssl
@@ -43,11 +47,13 @@ config WPA_MSG_MIN_PRIORITY
   PACKAGE_wpa-supplicant-wolfssl || \
   PACKAGE_wpa-supplicant-mesh-openssl || \
   PACKAGE_wpa-supplicant-mesh-wolfssl || \
+  PACKAGE_wpa-supplicant-basic || \
   PACKAGE_wpa-supplicant-mini || \
   PACKAGE_wpa-supplicant-p2p || \
   PACKAGE_wpad || \
   PACKAGE_wpad-openssl || \
   PACKAGE_wpad-wolfssl || \
+  PACKAGE_wpad-basic || \
   PACKAGE_wpad-mini || \
   PACKAGE_wpad-mesh-openssl || \
   PACKAGE_wpad-mesh-wolfssl
diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index a5c5379738..1b67216676 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -26,6 +26,7 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_kmod-ath9k \
CONFIG_PACKAGE_kmod-cfg80211 \
CONFIG_PACKAGE_hostapd \
+   CONFIG_PACKAGE_hostapd-basic \
CONFIG_PACKAGE_hostapd-mini \
CONFIG_WPA_RFKILL_SUPPORT \
CONFIG_DRIVER_WEXT_SUPPORT \
@@ -95,6 +96,10 @@ ifeq ($(LOCAL_VARIANT),full)
   DRIVER_MAKEOPTS += CONFIG_IEEE80211W=$(CONFIG_DRIVER_11W_SUPPORT)
 endif
 
+ifeq ($(LOCAL_VARIANT),basic)
+  DRIVER_MAKEOPTS += CONFIG_IEEE80211W=$(CONFIG_DRIVER_11W_SUPPORT)
+endif
+
 ifeq ($(LOCAL_VARIANT),full)
   ifeq ($(SSL_VARIANT),openssl)
 DRIVER_MAKEOPTS += CONFIG_TLS=openssl
@@ -176,6 +181,16 @@ endef
 
 Package/hostapd-wolfssl/description = $(Package/hostapd/description)
 
+define Package/hostapd-basic
+$(call Package/hostapd/Default,$(1))
+  TITLE+= (WPA-PSK, 11r and 11w)
+  VARIANT:=basic
+endef
+
+define Package/hostapd-basic/description
+ This package contains a basic IEEE 802.1x/WPA Authenticator with WPA-PSK, 
802.11r and 802.11w support.
+endef
+
 define Package/hostapd-mini
 $(call Package/hostapd/Default,$(1))
   TITLE+= (WPA-PSK only)
@@ -228,6 +243,16 @@ endef
 
 Package/wpad-wolfssl/description = $(Package/wpad/description)
 
+define Package/wpad-basic
+$(call Package/wpad/Default,$(1))
+  TITLE+= (WPA-PSK, 11r and 11w)
+  VARIANT:=wpad-basic
+endef
+
+define

[OpenWrt-Devel] [RFC PATCH 0/2] wpad basic variant

2018-10-12 Thread Kevin Darbyshire-Bryant
Peoples!

I've had these two commits lurking in my tree for ages, never having
quite got the courage up to commit the darn things as I feel well out of
my depth & comfort zone.

They're as a result of https://patchwork.ozlabs.org/patch/916121/ which
I've had assigned to me for an equally long time.

There were concerns about the size increase by support 11r & 11w which
prompted the idea of generating a 'wpad-basic' variant for the tiny
targets with limited flash space and adding a whizbang special effects
to the normal variant.

I'd like to keep that very nice Mr Woodhouse happy, and was/am going to
discuss this at the conference to get some help/advice etc, but it's
probably best to send this in now so people can formulate a response in
advance.

Help, guidance appreciated shouting less so but if need be :-)

Kevin

Kevin Darbyshire-Bryant (1):
  hostapd: add basic variant

Mathias Kresin (1):
  treewide: use wpad-basic for not small flash targets

 include/target.mk |   2 +-
 package/network/services/hostapd/Config.in|   6 +
 package/network/services/hostapd/Makefile |  37 ++
 .../hostapd/files/hostapd-basic.config| 380 +++
 .../hostapd/files/wpa_supplicant-basic.config | 593 ++
 .../linux/adm8668/profiles/100-WRTU54G-TM.mk  |   2 +-
 target/linux/apm821xx/image/Makefile  |   2 +-
 target/linux/apm821xx/nand/target.mk  |   2 +-
 .../apm821xx/sata/profiles/00-default.mk  |   2 +-
 target/linux/ar7/generic/target.mk|   2 +-
 target/linux/ar71xx/Makefile  |   2 +-
 target/linux/ar71xx/generic/target.mk |   2 +
 target/linux/ar71xx/image/generic.mk  |   4 +-
 target/linux/ar71xx/mikrotik/target.mk|   2 +-
 target/linux/ar71xx/nand/target.mk|   2 +
 target/linux/ar71xx/tiny/target.mk|   2 +
 .../arc770/generic/profiles/00-default.mk |   2 +-
 .../archs38/generic/profiles/00-default.mk|   2 +-
 target/linux/ath79/Makefile   |   2 +-
 target/linux/ath79/generic/target.mk  |   2 +
 target/linux/ath79/nand/target.mk |   2 +
 target/linux/ath79/tiny/target.mk |   2 +
 target/linux/au1000/au1500/target.mk  |   2 -
 target/linux/au1000/au1550/target.mk  |   2 -
 target/linux/bcm53xx/image/Makefile   |   2 +-
 target/linux/brcm2708/image/Makefile  |   6 +-
 target/linux/brcm47xx/Makefile|   2 +-
 .../generic/profiles/101-Broadcom-wl.mk   |   2 +-
 .../generic/profiles/105-Broadcom-none.mk |   2 +-
 .../generic/profiles/201-Broadcom-b44-wl.mk   |   2 +-
 .../generic/profiles/205-Broadcom-b44-none.mk |   2 +-
 .../generic/profiles/211-Broadcom-tg3-wl.mk   |   2 +-
 .../generic/profiles/215-Broadcom-tg3-none.mk |   2 +-
 .../generic/profiles/221-Broadcom-bgmac-wl.mk |   2 +-
 .../profiles/225-Broadcom-bgmac-none.mk   |   2 +-
 .../brcm47xx/generic/profiles/PS-1208MFG.mk   |   2 +-
 target/linux/brcm47xx/generic/target.mk   |   2 +
 target/linux/brcm47xx/legacy/target.mk|   2 +
 .../mips74k/profiles/102-Broadcom-wl.mk   |   2 +-
 .../mips74k/profiles/103-Broadcom-none.mk |   2 +-
 target/linux/brcm47xx/mips74k/target.mk   |   2 +
 target/linux/brcm63xx/image/Makefile  |  10 +-
 target/linux/brcm63xx/profiles/default.mk |   2 +-
 target/linux/cns3xxx/Makefile |   2 +-
 target/linux/ipq40xx/Makefile |   2 +-
 target/linux/ipq806x/Makefile |   2 +-
 .../ixp4xx/generic/profiles/200-NSLU2.mk  |   2 +-
 .../ixp4xx/generic/profiles/500-USR8200.mk|   2 +-
 target/linux/ixp4xx/generic/target.mk |   2 +-
 target/linux/kirkwood/image/Makefile  |   4 +-
 target/linux/kirkwood/profiles/00-default.mk  |   2 +-
 target/linux/lantiq/image/Makefile|  66 +-
 target/linux/lantiq/image/tp-link.mk  |   4 +-
 target/linux/malta/Makefile   |   2 +-
 target/linux/mediatek/Makefile|   2 +-
 target/linux/mpc85xx/Makefile |   2 +-
 target/linux/mpc85xx/image/Makefile   |   4 +-
 target/linux/mvebu/image/cortex-a9.mk |   4 +-
 target/linux/mvebu/profiles/000-Default.mk|   2 +-
 target/linux/omap/profiles/00-default.mk  |   2 +-
 target/linux/orion/Makefile   |   2 +-
 target/linux/ramips/image/mt7621.mk   |  58 +-
 target/linux/ramips/image/rt305x.mk   |   2 +-
 target/linux/ramips/mt7620/target.mk  |   2 +-
 target/linux/ramips/mt76x8/target.mk  |   2 +-
 target/linux/rb532/Makefile   |   2 +-
 target/linux/sunxi/image/cortex-a7.mk |   4 +-
 target/linux/sunxi/profiles/00-default.mk |   2 +-
 target/linux/uml/Makefile |   2 +-
 target/linux/x86/geode/target.mk  |   2 +-
 70 files changed, 1161 insertions(+), 131 deletions(-)
 create mode 100644 package

Re: [OpenWrt-Devel] [PATCH] wireguard: bump to 0.0.20181006

2018-10-09 Thread Kevin Darbyshire-Bryant



> On 8 Oct 2018, at 19:12, Lucian Cristian  wrote:
> 
> On 08.10.2018 11:56, Andre Heider wrote:
>> Hi Jason,
>> 
>> On 06/10/2018 05:09, Jason A. Donenfeld wrote:
>>> diff --git a/package/network/services/wireguard/Makefile 
>>> b/package/network/services/wireguard/Makefile
>>> index 29c7447..3544e34 100644
>>> --- a/package/network/services/wireguard/Makefile
>>> +++ b/package/network/services/wireguard/Makefile
>>> @@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk
>>> PKG_NAME:=wireguard
>>>   -PKG_VERSION:=0.0.20180925
>>> +PKG_VERSION:=0.0.20181006
>> 
>> 
>> with this version I get a build error on arm:
>> 
>>   CC [M] 
>> /home/andre/src/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-sunxi_cortexa7/WireGuard-0.0.20181006/src/main.o
>> In file included from 
>> /home/andre/src/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-sunxi_cortexa7/WireGuard-0.0.20181006/src/crypto/include/zinc/chacha20poly1305.h:9:0,
>>  from 
>> /home/andre/src/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-sunxi_cortexa7/WireGuard-0.0.20181006/src/messages.h:10,
>>  from 
>> /home/andre/src/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-sunxi_cortexa7/WireGuard-0.0.20181006/src/noise.h:8,
>>  from 
>> /home/andre/src/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-sunxi_cortexa7/WireGuard-0.0.20181006/src/device.h:9,
>>  from 
>> /home/andre/src/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-sunxi_cortexa7/WireGuard-0.0.20181006/src/main.c:7:
>> /home/andre/src/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-sunxi_cortexa7/WireGuard-0.0.20181006/src/compat/simd/include/linux/simd.h:
>>  In function 'simd_get':
>> /home/andre/src/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-sunxi_cortexa7/WireGuard-0.0.20181006/src/compat/simd/include/linux/simd.h:29:48:
>>  error: implicit declaration of function 'may_use_simd'; did you mean 
>> 'cap_settime'? [-Werror=implicit-function-declaration]
>>   *ctx = !IS_ENABLED(CONFIG_PREEMPT_RT_BASE) && may_use_simd() ? 
>> HAVE_FULL_SIMD : HAVE_NO_SIMD;
>> ^~~~
>> cap_settime
>> 
>> Thanks,
>> Andre
>> 
>> ___
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 
> there's a new one 07, it's about this problem
> 
> 
> Regards
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

I have just bumped the package to 0.0.20181007 so it should be fixed.

https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=3925298f3ca9bcd854571367d98bb6ca07f4e66e


Cheers,

Kevin D-B

012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A


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


[OpenWrt-Devel] [PATCH] kernel: bump 4.14 to 4.14.73

2018-10-02 Thread Kevin Darbyshire-Bryant
Refresh patches.

Remove upstreamed patch:

generic/pending-4.14/192-Revert-ubifs-xattr-Don-t-operate-on-deleted-inodes.patch

Compile-tested on: ath79
Runtime-tested on: ath79

Signed-off-by: Kevin Darbyshire-Bryant 
---

This could do with a bit of testing/compilation on a few other platforms

 include/kernel-version.mk |  4 +-
 .../910-unaligned_access_hacks.patch  |  4 +-
 .../910-unaligned_access_hacks.patch  |  4 +-
 ...etfilter-flow-table-support-for-IPv6.patch |  4 +-
 ...ipv6-make-ip6_dst_mtu_forward-inline.patch |  2 +-
 ...attr-Don-t-operate-on-deleted-inodes.patch | 96 ---
 ...-support-hardware-flow-table-offload.patch |  2 +-
 ...-device-to-the-same-MAX-payload-size.patch |  2 +-
 8 files changed, 11 insertions(+), 107 deletions(-)
 delete mode 100644 
target/linux/generic/pending-4.14/192-Revert-ubifs-xattr-Don-t-operate-on-deleted-inodes.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 4a734e5688..be4cc67fe1 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -4,11 +4,11 @@ LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .123
 LINUX_VERSION-4.9 = .129
-LINUX_VERSION-4.14 = .72
+LINUX_VERSION-4.14 = .73
 
 LINUX_KERNEL_HASH-3.18.123 = 
c10de32c9b31fb619b016a00d77afc394db5a4542e258e927f06a5ead86f8c64
 LINUX_KERNEL_HASH-4.9.129 = 
6f5510d3fcfec1bf1e2d9c8e2fdcd7628c1886c6bdb29092adc5ccdf75e39318
-LINUX_KERNEL_HASH-4.14.72 = 
df925906250bbc40fcf0137d7ad0fb8edc528d926832634f1233b7540564557f
+LINUX_KERNEL_HASH-4.14.73 = 
999e38141ccc447df7bf7ce10b8803c12b32274b76d3d5400bf3fd88eee0e31e
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst 
-,_,$(subst /,_,$(1)))
diff --git a/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch 
b/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch
index 015c283e1d..ec1d89d6e6 100644
--- a/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch
+++ b/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch
@@ -303,7 +303,7 @@
  #endif /* _LINUX_TYPES_H */
 --- a/net/ipv4/af_inet.c
 +++ b/net/ipv4/af_inet.c
-@@ -1351,8 +1351,8 @@ struct sk_buff **inet_gro_receive(struct
+@@ -1352,8 +1352,8 @@ struct sk_buff **inet_gro_receive(struct
if (unlikely(ip_fast_csum((u8 *)iph, 5)))
goto out_unlock;
  
@@ -567,7 +567,7 @@
goto next_ht;
 --- a/net/ipv6/ip6_offload.c
 +++ b/net/ipv6/ip6_offload.c
-@@ -220,7 +220,7 @@ static struct sk_buff **ipv6_gro_receive
+@@ -221,7 +221,7 @@ static struct sk_buff **ipv6_gro_receive
continue;
  
iph2 = (struct ipv6hdr *)(p->data + off);
diff --git a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch 
b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
index d86036fca3..5dec120b03 100644
--- a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
@@ -303,7 +303,7 @@
  #endif /* _LINUX_TYPES_H */
 --- a/net/ipv4/af_inet.c
 +++ b/net/ipv4/af_inet.c
-@@ -1351,8 +1351,8 @@ struct sk_buff **inet_gro_receive(struct
+@@ -1352,8 +1352,8 @@ struct sk_buff **inet_gro_receive(struct
if (unlikely(ip_fast_csum((u8 *)iph, 5)))
goto out_unlock;
  
@@ -556,7 +556,7 @@
goto next_ht;
 --- a/net/ipv6/ip6_offload.c
 +++ b/net/ipv6/ip6_offload.c
-@@ -220,7 +220,7 @@ static struct sk_buff **ipv6_gro_receive
+@@ -221,7 +221,7 @@ static struct sk_buff **ipv6_gro_receive
continue;
  
iph2 = (struct ipv6hdr *)(p->data + off);
diff --git 
a/target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch
 
b/target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch
index cfb13231c6..3e7db09068 100644
--- 
a/target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch
+++ 
b/target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch
@@ -26,7 +26,7 @@ Signed-off-by: Pablo Neira Ayuso 
  struct dst_entry *ip6_dst_lookup_flow(const struct sock *sk, struct flowi6 
*fl6,
 --- a/net/ipv6/ip6_output.c
 +++ b/net/ipv6/ip6_output.c
-@@ -383,7 +383,7 @@ static inline int ip6_forward_finish(str
+@@ -381,7 +381,7 @@ static inline int ip6_forward_finish(str
return dst_output(net, sk, skb);
  }
  
@@ -35,7 +35,7 @@ Signed-off-by: Pablo Neira Ayuso 
  {
unsigned int mtu;
struct inet6_dev *idev;
-@@ -403,6 +403,7 @@ static unsigned int ip6_dst_mtu_forward(
+@@ -401,6 +401,7 @@ static unsigned int ip6_dst_mtu_forward(
  
return mtu;
  }
diff --git 
a/target/linux/generic/backport-4.14/350-v4.18-ipv6-make-ip6_dst_mtu_forward-inline.patch
 
b/target/linux/generic/backport-4.14/350-v4.18-ipv6-make-ip6_dst_mtu_f

[OpenWrt-Devel] Merged: kernel: re-enable MIPS VDSO

2018-09-22 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


[OpenWrt-Devel] [PATCH] kernel: re-enable MIPS VDSO

2018-09-21 Thread Kevin Darbyshire-Bryant
kernel upstream commit 9efcaa7c4afba5628f2650a76f69c798f47eeb18 to 4.14
itself a backport of 0f02cfbc3d9e413d450d8d0fd660077c23f67eff has
resolved the cache line issues that led to us disabling VDSO by default
on MIPS.

Remove our force disable patch:

pending-4.14/206-mips-disable-vdso.patch

Signed-off-by: Kevin Darbyshire-Bryant 
---
 .../pending-4.14/206-mips-disable-vdso.patch  | 23 ---
 1 file changed, 23 deletions(-)
 delete mode 100644 
target/linux/generic/pending-4.14/206-mips-disable-vdso.patch

diff --git a/target/linux/generic/pending-4.14/206-mips-disable-vdso.patch 
b/target/linux/generic/pending-4.14/206-mips-disable-vdso.patch
deleted file mode 100644
index f3c58dcd3a..00
--- a/target/linux/generic/pending-4.14/206-mips-disable-vdso.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Felix Fietkau 
-Subject: kernel: disable MIPS VDSO by default until the cache issues have been 
resolved
-
-lede-commit: 1185e645a773c86aa88cf04d0e2911dc62eb43f5
-Signed-off-by: Felix Fietkau 

- arch/mips/vdso/Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
 a/arch/mips/vdso/Makefile
-+++ b/arch/mips/vdso/Makefile
-@@ -30,9 +30,9 @@ aflags-vdso := $(ccflags-vdso) \
- ifndef CONFIG_CPU_MIPSR6
-   ifeq ($(call ld-ifversion, -lt, 22500, y),y)
- $(warning MIPS VDSO requires binutils >= 2.25)
--obj-vdso-y := $(filter-out gettimeofday.o, $(obj-vdso-y))
--ccflags-vdso += -DDISABLE_MIPS_VDSO
-   endif
-+  obj-vdso-y := $(filter-out gettimeofday.o, $(obj-vdso-y))
-+  ccflags-vdso += -DDISABLE_MIPS_VDSO
- endif
- 
- # VDSO linker flags.
-- 
2.17.1 (Apple Git-112)


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


[OpenWrt-Devel] Merged: fstools: Install mount.hotplug and 10-fstab.defaults as 600

2018-09-19 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


[OpenWrt-Devel] Merged: usbmode: Update modeswitch data to 20170806

2018-09-19 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


[OpenWrt-Devel] Merged:

2018-09-19 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


[OpenWrt-Devel] Merged:

2018-09-19 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


[OpenWrt-Devel] Merged: lldpd: Install /etc/config file as 600

2018-09-19 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


[OpenWrt-Devel] Merged:

2018-09-19 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


[OpenWrt-Devel] Merged:

2018-09-19 Thread Kevin Darbyshire-Bryant
Merged into my staging tree.
Thank you!


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


Re: [OpenWrt-Devel] [PATCH] base-files: make wifi report unknown command

2018-08-07 Thread Kevin Darbyshire-Bryant


> On 6 Aug 2018, at 15:49, Karl Palsson  wrote:
> 
> Signed PGP part
> 
> John Crispin  wrote:
>> 
>> 
>> On 03/08/18 18:18, Thibaut VARÈNE wrote:
>>> Avoid having /sbin/wifi silently ignore unknown keywords and execute
>>> "enable"; instead display the help message and exit with an error.
>>> 
>>> Signed-off-by: Thibaut VARÈNE 
>>> ---
>>>  package/base-files/files/sbin/wifi | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>> 
>>> diff --git a/package/base-files/files/sbin/wifi 
>>> b/package/base-files/files/sbin/wifi
>>> index 83befc0d6f..09e483ec55 100755
>>> --- a/package/base-files/files/sbin/wifi
>>> +++ b/package/base-files/files/sbin/wifi
>>> @@ -241,5 +241,5 @@ case "$1" in
>>> reload) wifi_reload "$2";;
>>> reload_legacy) wifi_reload_legacy "$2";;
>>> --help|help) usage;;
>>> -   *) ubus call network reload; wifi_updown "enable" "$2";;
>>> +   *) usage; exit 1;;
>>>  esac
>> 
>> NAK, this changes expected behaviour. i regularly call "wifi"
>> to resync my config with runstate.
>> John
> 
> respectfully, the behaviour of the "wifi" command is one of the most obtuse 
> parts of openwrt's tooling.  It does "something" with no command output, and 
> responds ~instantly.This is expected behaviour for very few people.  even 
> "wifi asdfasdfa" returns ~instantly, with no warning that it is an unknown 
> command.  Does the command perhaps not take arguments?  What would they be?
> 
> Do we _reallly_ have to keep it's behaviour this way?
> 
> What this patch _is_ missing, is a new command to replace the old
> "anything but the other commands".
> 
> ie, the one that does "ubus call network reload; wifi_updown
> "enable" "$2""
> 
> Sincerely,
> Karl Palsson
> 

+1
Nicely written and argued.  ‘wifi’ is incredibly obtuse and unfriendly.  I hate 
running it.  Does ‘magic’ no idea what, it doesn’t say.



Cheers,

Kevin D-B

012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A



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


[OpenWrt-Devel] [PATCH] kernel: bump 4.14 to 4.14.59

2018-07-28 Thread Kevin Darbyshire-Bryant
Drop patch that was superseded upstream:
ramips/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch

Drop patch that no longer needs to be backported:
backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch

Drop patches that have been superceded upstream & can be reverse-applied:
patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
ath79/patches-4.14/0011-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch
generic/pending-4.14/170-usb-dwc2-Fix-DMA-alignment-to-start-at-allocated-boun.patch

Fixes the following CVEs:
- CVE-2018-10876
- CVE-2018-10877
- CVE-2018-10879
- CVE-2018-10880
- CVE-2018-10881
- CVE-2018-10882
- CVE-2018-10883

Refresh patches.

Run-tested: ath79 Archer C7 v2

This is an amalgam of Stijn Tintel's bump to 4.14.56 & my three
subsequent bumps to 4.14.59

Bump to 4.14.56
Signed-off-by: Stijn Tintel 
Subsequent bump to 4.14.59
Signed-off-by: Kevin Darbyshire-Bryant 
---
NOTE - Stijn's bump to 4.14.56 included a big warning
WARNING: EXT4 IMAGES ARE BROKEN WITH THIS KERNEL!!!
Personally not seen any evidence but this needs MORE TESTING!


 include/kernel-version.mk  |   4 +-
 ...0001-crypto-crypto4xx-remove-bad-list_del.patch |  32 
 ...to4xx-remove-unused-definitions-and-write.patch |   2 +-
 ...to4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch |   2 +-
 ...to4xx-remove-double-assignment-of-pd_uinf.patch |   2 +-
 ...to4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch |   2 +-
 ...pto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch |   2 +-
 ...to4xx-replace-crypto4xx_dev-s-scatter_buf.patch |   8 +-
 ...to4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch |  84 --
 .../802-usb-xhci-force-msi-renesas-xhci.patch  |   2 +-
 ...fix-register-address-in-ath79_ddr_wb_flus.patch |  27 
 .../patches-4.14/910-unaligned_access_hacks.patch  |  10 +-
 ...-add-support-for-performing-fake-doorbell.patch |   2 +-
 .../patches-4.14/830-huawei_e970_support.patch |   4 +-
 ...-4.15-08-bcm63xx_enet-correct-clock-usage.patch | 101 
 ...t-do-not-write-to-random-DMA-channel-on-B.patch |  29 
 ...macro-for-controlling-warnings-to-linux-c.patch |   2 +-
 .../025-tcp-allow-drivers-to-tweak-TSQ-logic.patch |   4 +-
 ...d-support-for-host-mode-external-vbus-sup.patch |  10 +-
 ...wc2-dwc2_vbus_supply_init-fix-error-check.patch |   2 +-
 ...-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch | 172 -
 ...15-netfilter-exit_net-cleanup-check-added.patch |   2 +-
 .../generic/hack-4.14/207-disable-modorder.patch   |   4 +-
 .../hack-4.14/211-host_tools_portability.patch |   2 +-
 .../linux/generic/hack-4.14/220-gc_sections.patch  |   2 +-
 .../linux/generic/hack-4.14/902-debloat_proc.patch |   2 +-
 ...rocess-negative-stack-offsets-on-stack-tr.patch |   2 +-
 ...-bridge_allow_receiption_on_disabled_port.patch |   4 +-
 ...-DMA-alignment-to-start-at-allocated-boun.patch | 126 ---
 .../pending-4.14/201-extra_optimization.patch  |   2 +-
 ...610-netfilter_match_bypass_default_checks.patch |   6 +-
 .../pending-4.14/630-packet_socket_type.patch  |   6 +-
 .../generic/pending-4.14/834-ledtrig-libata.patch  |  10 +-
 .../900-gen_stats-fix-netlink-stats-padding.patch  |  49 --
 .../070-qcom-spm-fix-probe-order.patch |   7 +-
 ...4019-use-v2-of-the-kpss-bringup-mechanism.patch |  15 +-
 ...9-add-cpu-operating-points-for-cpufreq-su.patch |   6 +-
 ...om-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch |   7 +-
 .../074-ARM-qcom-Add-IPQ4019-SoC-support.patch |  12 +-
 ...-phy-qcom-ipq4019-usb-add-binding-documen.patch |   6 -
 ...m-ipq4019-usb-add-driver-for-QCOM-IPQ4019.patch |  16 +-
 ...077-qcom-ipq4019-add-USB-devicetree-nodes.patch |  11 +-
 ...RM-dts-ipq4019-Add-a-few-peripheral-nodes.patch |  35 ++---
 .../079-ARM-dts-ipq4019-fix-PCI-range.patch|   4 +-
 ...ctrl-msm-fix-gpio-hog-related-boot-issues.patch |   2 +-
 .../081-clk-fix-apss-cpu-overclocking.patch|  13 +-
 ...-ipq4019-Add-TZ-and-SMEM-reserved-regions.patch |   4 +-
 ...ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch |   6 +-
 .../701-dts-ipq4019-add-mdio-node.patch|   6 +-
 .../702-dts-ipq4019-add-PHY-switch-nodes.patch |   6 +-
 ...711-dts-ipq4019-add-ethernet-essedma-node.patch |   6 +-
 .../patches-4.14/900-dts-ipq4019-ap-dk01.1.patch   |  12 +-
 .../patches-4.14/0052-net-phy-add-FC.patch |   2 +-
 ...ci-allow-imod-interval-to-be-configurable.patch |   2 +-
 .../0227-arm-dts-Add-Unielec-U7623-DTS.patch   |  11 --
 .../oxnas/patches-4.14/999-libata-hacks.patch  |   8 +-
 ...td-fix-cfi-cmdset-0002-erase-status-check.patch |  29 
 ...0037-mtd-cfi-cmdset-0002-force-word-wri

[OpenWrt-Devel] [PATCH v1] 6in4: add maxtry option to make more persistent updating HE endpoint

2018-07-27 Thread Kevin Darbyshire-Bryant
Add option 'maxtry' to 6in4 interface definition.  Defaults to 3.

Defines maximum number of attempts to update Hurricane Electric
tunnel endpoint address.  Originally unconfigurable and hard coded to 3.

Each update attempt has a 5 second timeout.

Signed-off-by: Kevin Darbyshire-Bryant 
---
 package/network/ipv6/6in4/files/6in4.sh | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/package/network/ipv6/6in4/files/6in4.sh 
b/package/network/ipv6/6in4/files/6in4.sh
index 941dc43d68..dce37eb3b3 100755
--- a/package/network/ipv6/6in4/files/6in4.sh
+++ b/package/network/ipv6/6in4/files/6in4.sh
@@ -31,8 +31,8 @@ proto_6in4_setup() {
local iface="$2"
local link="6in4-$cfg"
 
-   local mtu ttl tos ipaddr peeraddr ip6addr ip6prefix ip6prefixes tunlink 
tunnelid username password updatekey
-   json_get_vars mtu ttl tos ipaddr peeraddr ip6addr tunlink tunnelid 
username password updatekey
+   local mtu ttl tos ipaddr peeraddr ip6addr ip6prefix ip6prefixes tunlink 
tunnelid username password updatekey maxtry
+   json_get_vars mtu ttl tos ipaddr peeraddr ip6addr tunlink tunnelid 
username password updatekey maxtry
json_for_each_item proto_6in4_add_prefix ip6prefix ip6prefixes
 
[ -z "$peeraddr" ] && {
@@ -98,7 +98,7 @@ proto_6in4_setup() {
 
local 
url="$http://ipv4.tunnelbroker.net/nic/update?hostname=$tunnelid;
local try=0
-   local max=3
+   local max="${maxtry:-3}"
 
(
set -o pipefail
@@ -134,6 +134,7 @@ proto_6in4_init_config() {
proto_config_add_string "username"
proto_config_add_string "password"
proto_config_add_string "updatekey"
+   proto_config_add_int "maxtry"
proto_config_add_int "mtu"
proto_config_add_int "ttl"
proto_config_add_string "tos"
-- 
2.15.2 (Apple Git-101.1)


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


[OpenWrt-Devel] [PATCH] kernel: bump 4.14 to 4.14.58

2018-07-27 Thread Kevin Darbyshire-Bryant
Drop patch that was superseded upstream:
ramips/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch

Drop patch that no longer needs to be backported:
backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
pending-4.14/900-gen_stats-fix-netlink-stats-padding.patch

Drop patches that have been superceded upstream & can be reverse-applied:
patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch

Fixes the following CVEs:
- CVE-2018-10876
- CVE-2018-10877
- CVE-2018-10879
- CVE-2018-10880
- CVE-2018-10881
- CVE-2018-10882
- CVE-2018-10883

Refresh patches.

Run-tested: ath79 Archer C7 v2

This is an amalgam of Stijn Tintel's bump to 4.14.56 & my two
subsequent bumps to 4.14.58

Bump to 4.14.56
Signed-off-by: Stijn Tintel 
Subsequent bump to 4.14.58
Signed-off-by: Kevin Darbyshire-Bryant 
---

NOTE - Stijn's bump to 4.14.56 included a big warning
WARNING: EXT4 IMAGES ARE BROKEN WITH THIS KERNEL!!!
Personally not seen any evidence but this needs MORE TESTING!


 include/kernel-version.mk  |   4 +-
 ...0001-crypto-crypto4xx-remove-bad-list_del.patch |  32 
 ...to4xx-remove-unused-definitions-and-write.patch |   2 +-
 ...to4xx-set-CRYPTO_ALG_KERN_DRIVER_ONLY-fla.patch |   2 +-
 ...to4xx-remove-double-assignment-of-pd_uinf.patch |   2 +-
 ...to4xx-enable-AES-RFC3686-ECB-CFB-and-OFB-.patch |   2 +-
 ...pto4xx-refactor-crypto4xx_copy_pkt_to_dst.patch |   2 +-
 ...to4xx-replace-crypto4xx_dev-s-scatter_buf.patch |   8 +-
 ...to4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch |  84 --
 .../802-usb-xhci-force-msi-renesas-xhci.patch  |   2 +-
 .../patches-4.14/910-unaligned_access_hacks.patch  |   2 +-
 ...-add-support-for-performing-fake-doorbell.patch |   2 +-
 ...-4.15-08-bcm63xx_enet-correct-clock-usage.patch | 101 
 ...t-do-not-write-to-random-DMA-channel-on-B.patch |  29 
 ...macro-for-controlling-warnings-to-linux-c.patch |   2 +-
 ...-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch | 172 -
 ...15-netfilter-exit_net-cleanup-check-added.patch |   2 +-
 .../hack-4.14/211-host_tools_portability.patch |   2 +-
 .../linux/generic/hack-4.14/902-debloat_proc.patch |   2 +-
 ...rocess-negative-stack-offsets-on-stack-tr.patch |   2 +-
 ...-bridge_allow_receiption_on_disabled_port.patch |   4 +-
 ...610-netfilter_match_bypass_default_checks.patch |   6 +-
 .../pending-4.14/630-packet_socket_type.patch  |   6 +-
 .../generic/pending-4.14/834-ledtrig-libata.patch  |  10 +-
 .../900-gen_stats-fix-netlink-stats-padding.patch  |  49 --
 .../070-qcom-spm-fix-probe-order.patch |   7 +-
 ...4019-use-v2-of-the-kpss-bringup-mechanism.patch |  15 +-
 ...9-add-cpu-operating-points-for-cpufreq-su.patch |   6 +-
 ...om-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch |   7 +-
 .../074-ARM-qcom-Add-IPQ4019-SoC-support.patch |  12 +-
 ...-phy-qcom-ipq4019-usb-add-binding-documen.patch |   6 -
 ...m-ipq4019-usb-add-driver-for-QCOM-IPQ4019.patch |  16 +-
 ...077-qcom-ipq4019-add-USB-devicetree-nodes.patch |  11 +-
 ...RM-dts-ipq4019-Add-a-few-peripheral-nodes.patch |  35 ++---
 .../079-ARM-dts-ipq4019-fix-PCI-range.patch|   4 +-
 ...ctrl-msm-fix-gpio-hog-related-boot-issues.patch |   2 +-
 .../081-clk-fix-apss-cpu-overclocking.patch|  13 +-
 ...-ipq4019-Add-TZ-and-SMEM-reserved-regions.patch |   4 +-
 ...ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch |   6 +-
 .../701-dts-ipq4019-add-mdio-node.patch|   6 +-
 .../702-dts-ipq4019-add-PHY-switch-nodes.patch |   6 +-
 ...711-dts-ipq4019-add-ethernet-essedma-node.patch |   6 +-
 .../patches-4.14/900-dts-ipq4019-ap-dk01.1.patch   |  12 +-
 .../patches-4.14/0052-net-phy-add-FC.patch |   2 +-
 ...ci-allow-imod-interval-to-be-configurable.patch |   2 +-
 .../0227-arm-dts-Add-Unielec-U7623-DTS.patch   |  11 --
 .../oxnas/patches-4.14/999-libata-hacks.patch  |   8 +-
 ...td-fix-cfi-cmdset-0002-erase-status-check.patch |  29 
 ...0037-mtd-cfi-cmdset-0002-force-word-write.patch |   2 +-
 49 files changed, 97 insertions(+), 662 deletions(-)
 delete mode 100644 
target/linux/apm821xx/patches-4.14/020-0001-crypto-crypto4xx-remove-bad-list_del.patch
 delete mode 100644 
target/linux/apm821xx/patches-4.14/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch
 delete mode 100644 
target/linux/brcm63xx/patches-4.14/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
 delete mode 100644 
target/linux/brcm63xx/patches-4.14/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
 delete mode 100644 
target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
 delete mode 100644 
target/linux/generic/pending-4.14/900-gen_stats-fix-netli

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

2018-07-11 Thread Kevin Darbyshire-Bryant


> On 11 Jul 2018, at 10:44, Hannu Nyman  wrote:
> 
> 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”.
> 
> You are right.
> The corresponding addition needs to be done for the lines replacing the 
> removed lines:
> 932 + if (filter && filter->table[0] &&
> should likely be
> 932 + if (filter && filter->table &&
> matching the change done upstream.
> 
> In my comment I overlooked the part where we add back similar lines :-(

lol - I’m really happy….it turns out I’m not *completely* stupid :-)

> 
> (the refresh patch only notices the need to refresh the upstream lines, but 
> does not know about out own additions.)

Reading patches to patches is….challenging.   I wonder if there’s a tool that 
would make it easier?

Sunshine!

Kevin




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


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

2018-07-11 Thread Kevin Darbyshire-Bryant


> On 11 Jul 2018, at 05:45, Hannu Nyman  wrote:
> 
> Stijn Segers kirjoitti 10.7.2018 klo 23:08:
>> Refreshed patches. The bump from .53 to .54 introduced a minor change in 
>> net/netfilter/nf_tables_api.c [1] but I am unable to
>> judge if this is a fluke or not, so I'd like a second pair of eyes on that. 
>> It's a single 'table[0]' being replaced by 'table':
>> 
>> - if (filter && filter->table[0] &&
>> + if (filter && filter->table &&
>> 
>> I have updated the 
>> 335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch 
>> accordingly.
>> 
> 
> Seems like a legitimate change due to upstream changes that are clearly 
> visible in your upstream diff link.
> 
> Clicking your link and then looking at the file's commit log, I luckily 
> stumbled directly to the responsible commit (fix NULL pointer):
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/net/netfilter/nf_tables_api.c?id=360cc79d9d299ce297b205508276285ceffc5fa8
> 
> Note also that our patch 335 removes the whole code block where that one line 
> changed in upstream. So, the change inside the removed code block would be 
> rather safe in any case.
> 
> 
>> 
>> [1]  
>> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/diff/net/netfilter/nf_tables_api.c?id=v4.14.54=v4.14.53
>> 
> 
>> @@ -895,7 +895,7 @@ Signed-off-by: Pablo Neira Ayuso 
>>  const struct nft_table *table;
>>  unsigned int idx = 0, s_idx = cb->args[0];
>>  struct nft_obj_filter *filter = cb->data;
>> -@@ -4576,38 +4562,37 @@ static int nf_tables_dump_obj(struct sk_
>> +@@ -4619,38 +4605,37 @@ static int nf_tables_dump_obj(struct sk_
>>  rcu_read_lock();
>>  cb->seq = net->nft.base_seq;
>>   @@ -914,7 +914,7 @@ Signed-off-by: Pablo Neira Ayuso 
>>  -   if (idx > s_idx)
>>  -   memset(>args[1], 0,
>>  -  sizeof(cb->args) - 
>> sizeof(cb->args[0]));
>> --   if (filter && filter->table[0] &&
>> +-   if (filter && filter->table &&
>>  -   strcmp(filter->table, table->name))
>>  -   goto cont;
>>  -   if (filter &&
>> @@ -960,7 +960,7 @@ Signed-off-by: Pablo Neira Ayuso 
>>  }
>>  }
> 

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,
-  

Re: [OpenWrt-Devel] Archer C7 v2 with Target System "Atheros ATH79 (DTS)" or "Atheros AR7xxx/AR9xxx"

2018-06-28 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---


> On 28 Jun 2018, at 08:26, m...@adrianschmutzler.de wrote:
> 
>>> 
>>> 
>> 
>> It may be that board name has changed, what's your cat
>> /tmp/sysinfo/board_name ?
>> 
>> Now on ath79 should be tplink,tl-archer-c7-v2 so if doesn't match this is
> the
>> problem
>> 
>> You can safely try with -F, but you'll be needed to recreate the
>> /etc/config/wifreless file
>> 
>> Regards
>> 
>> 
>> ___
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 
> The old boardname was indeed just "archer-c7" (for the v2).
> 
> Maybe the SUPPORTED DEVICES for the tl-archer-c7-v2 in ath79 should be
> updated to enable upgrades?

It sounds an attractive idea, unfortunately the reality is that both the 
wireless config and led config  change, so this ‘side-grade’ isn’t directly 
compatible.  Personally I think the fact you have to force the install 
(sysupgrade -F) acts as a reminder that certain things need a gentle tweak 
afterwards.  If a sysupgrade just went through, no warning, then I can see a 
lot of queries ‘I upgraded and now I can’t get wireless to work’.

Often we advise people to beware upgrades from prior releases to consider 
starting configs afresh, this is changing build architecture as well.  The fact 
that a forced upgrade works as well as it does is an unexpected bonus.

Kevin


signature.asc
Description: Message signed with OpenPGP
--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] kernel: bump 4.14 to 4.14.51

2018-06-21 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Refresh patches.

Remove patch that can be reverse applied:
mvebu/patches-4.14/530-ATA-ahci_mvebu-enable-stop_engine-override.patch
mvebu/patches-4.14/531-ATA-ahci_mvebu-pmp-stop-errata-226.patch

Update patch that no longer applied:
ipq806x/patches-4.14/0035-clk-mux-Split-out-register-accessors-for-reuse.patch

Compiled-tested-for: lantiq, ramips
Run-tested-on: lantiq BT hh5a, ramips MIR3g

Signed-off-by: Kevin Darbyshire-Bryant 
---
v2 - actually it turns out 531-ATA-achi... isn't required & causes build
failure - oops!  Thanks to Gerard Looije for pointing out the error in
my ways :-)

 include/kernel-version.mk  |   4 +-
 ...stmmac-Disable-frame-filtering-completely.patch |   2 +-
 16-netfilter-flow-table-support-for-IPv6.patch |   2 +-
 ...r-improve-flow-table-Kconfig-dependencies.patch |   2 +-
 ...lowtable-infrastructure-depends-on-NETFIL.patch |   2 +-
 .../650-netfilter-add-xt_OFFLOAD-target.patch  |   4 +-
 .../902-essedma-alloc-skb-ip-align.patch   |   7 +-
 .../patches-4.14/997-device_tree_cmdline.patch |   4 +-
 ...ux-Split-out-register-accessors-for-reuse.patch |   6 +-
 .../patches-4.14/0069-arm-boot-add-dts-files.patch |  12 +-
 .../0012-clk-dont-disable-unused-clocks.patch  |   2 +-
 ...TA-ahci_mvebu-enable-stop_engine-override.patch | 224 -
 .../531-ATA-ahci_mvebu-pmp-stop-errata-226.patch   | 110 --
 13 files changed, 21 insertions(+), 360 deletions(-)
 delete mode 100644 
target/linux/mvebu/patches-4.14/530-ATA-ahci_mvebu-enable-stop_engine-override.patch
 delete mode 100644 
target/linux/mvebu/patches-4.14/531-ATA-ahci_mvebu-pmp-stop-errata-226.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 825a227915..52a8433ec6 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -5,12 +5,12 @@ LINUX_RELEASE?=1
 LINUX_VERSION-3.18 = .71
 LINUX_VERSION-4.4 = .121
 LINUX_VERSION-4.9 = .109
-LINUX_VERSION-4.14 = .50
+LINUX_VERSION-4.14 = .51
 
 LINUX_KERNEL_HASH-3.18.71 = 
5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
 LINUX_KERNEL_HASH-4.4.121 = 
44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
 LINUX_KERNEL_HASH-4.9.109 = 
3dcd5654a553432119492b69e649c4ed117781bfd571edcb02346c945be359b0
-LINUX_KERNEL_HASH-4.14.50 = 
703a8d013b25dc428d936f72858fa0c702c22cb3114a040fb9bb47562e4ea2ac
+LINUX_KERNEL_HASH-4.14.51 = 
dab2402baa2444348f9b3c354e8f65382a466d1766942a57441209f9a2df972b
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst 
-,_,$(subst /,_,$(1)))
diff --git 
a/target/linux/arc770/patches-4.14/700-stmmac-Disable-frame-filtering-completely.patch
 
b/target/linux/arc770/patches-4.14/700-stmmac-Disable-frame-filtering-completely.patch
index 58094ae96d..e63c2e934b 100644
--- 
a/target/linux/arc770/patches-4.14/700-stmmac-Disable-frame-filtering-completely.patch
+++ 
b/target/linux/arc770/patches-4.14/700-stmmac-Disable-frame-filtering-completely.patch
@@ -20,7 +20,7 @@ Signed-off-by: Alexey Brodkin 
 
 --- a/drivers/net/ethernet/stmicro/stmmac/common.h
 +++ b/drivers/net/ethernet/stmicro/stmmac/common.h
-@@ -49,7 +49,7 @@
+@@ -46,7 +46,7 @@
  #define STMMAC_GET_ENTRY(x, size) ((x + 1) & (size - 1))
  
  #undef FRAME_FILTER_DEBUG
diff --git 
a/target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch
 
b/target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch
index a561f2669d..874195558c 100644
--- 
a/target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch
+++ 
b/target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch
@@ -45,7 +45,7 @@ Signed-off-by: Pablo Neira Ayuso 
  {
 --- a/net/ipv6/netfilter/Kconfig
 +++ b/net/ipv6/netfilter/Kconfig
-@@ -71,6 +71,14 @@ config NFT_FIB_IPV6
+@@ -99,6 +99,14 @@ config NFT_FIB_IPV6
  endif # NF_TABLES_IPV6
  endif # NF_TABLES
  
diff --git 
a/target/linux/generic/backport-4.14/329-v4.16-netfilter-improve-flow-table-Kconfig-dependencies.patch
 
b/target/linux/generic/backport-4.14/329-v4.16-netfilter-improve-flow-table-Kconfig-dependencies.patch
index c897c36724..7174723fc9 100644
--- 
a/target/linux/generic/backport-4.14/329-v4.16-netfilter-improve-flow-table-Kconfig-dependencies.patch
+++ 
b/target/linux/generic/backport-4.14/329-v4.16-netfilter-improve-flow-table-Kconfig-dependencies.patch
@@ -72,7 +72,7 @@ Signed-off-by: Pablo Neira Ayuso 
  
 --- a/net/ipv6/netfilter/Kconfig
 +++ b/net/ipv6/netfilter/Kconfig
-@@ -72,8 +72,9 @@ endif # NF_TABLES_IPV6
+@@ -100,8 +100,9 @@ endif # NF_T

Re: [OpenWrt-Devel] 18.06: Cherry pick mtu fix

2018-06-21 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---


> On 21 Jun 2018, at 08:13, Jaap Buurman  wrote:
> 
> Dear all,
> 
> The move to kernel 4.14 broke mtu settings larger than 1500 by
> default, unless the correct mtu was explicitly specified. The
> following commit fixes this for the mt7621 target:
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=5da2c68d001ee44b15a58639ed03a0ebb6f68020
> 
> 1) Would it be possible for someone to cherry-pick this to the 18.06
> branch, so that it can receive widespread testing in the upcoming
> 18.06 RC1 release?

Personally I’d also pick the preceding mtk driver commit "ec502cd3fe ramips: 
rename ethernet driver folder to the same one that upstream uses” for clarity & 
easier cherry-picks going forward for 18.06.  And I’d be very strongly tempted 
to have 9a4253b81f ramips: improve ethernet driver performance with GRO/TSO  as 
well…. which gets 18.06 into the same state as master for mtk eth drivers.

> 2) From the commit's message I get the impression this isn't an issue
> with just mt7621, but with all targets that are able to handle a mtu >
> 1500. Is my impression correct in this regard, and is this something
> that should be fixed before a 18.06 release? Changing mtu settings >
> 1500 does sound like basic functionality for routers nowadays.

It is dependent upon the driver setting a suitable max_mtu in the netdev 
structure *IF* it supports values greater than 1500.

+   if (IS_ENABLED(CONFIG_SOC_MT7621))
+   netdev->max_mtu = 2048;

The version of driver included with kernel 4.14 at present is too dumb to 
understand >1500 mtu, which is why openwrt replaces it with a version that 
(now) does.

That’s my opinion anyway :-)

Kevin



signature.asc
Description: Message signed with OpenPGP
--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] kernel: bump 4.14 to 4.14.51

2018-06-21 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Refresh patches.

Remove patch that can be reverse applied:
mvebu/patches-4.14/530-ATA-ahci_mvebu-enable-stop_engine-override.patch

Update patch that no longer applied:
ipq806x/patches-4.14/0035-clk-mux-Split-out-register-accessors-for-reuse.patch

Compiled-tested-for: lantiq, ramips
Run-tested-on: lantiq BT hh5a, ramips MIR3g

Signed-off-by: Kevin Darbyshire-Bryant 
---
 include/kernel-version.mk  |   4 +-
 ...stmmac-Disable-frame-filtering-completely.patch |   2 +-
 16-netfilter-flow-table-support-for-IPv6.patch |   2 +-
 ...r-improve-flow-table-Kconfig-dependencies.patch |   2 +-
 ...lowtable-infrastructure-depends-on-NETFIL.patch |   2 +-
 .../650-netfilter-add-xt_OFFLOAD-target.patch  |   4 +-
 .../902-essedma-alloc-skb-ip-align.patch   |   7 +-
 .../patches-4.14/997-device_tree_cmdline.patch |   4 +-
 ...ux-Split-out-register-accessors-for-reuse.patch |   6 +-
 .../patches-4.14/0069-arm-boot-add-dts-files.patch |  12 +-
 .../0012-clk-dont-disable-unused-clocks.patch  |   2 +-
 ...TA-ahci_mvebu-enable-stop_engine-override.patch | 224 -
 .../531-ATA-ahci_mvebu-pmp-stop-errata-226.patch   |  13 +-
 13 files changed, 26 insertions(+), 258 deletions(-)
 delete mode 100644 
target/linux/mvebu/patches-4.14/530-ATA-ahci_mvebu-enable-stop_engine-override.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 825a227915..52a8433ec6 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -5,12 +5,12 @@ LINUX_RELEASE?=1
 LINUX_VERSION-3.18 = .71
 LINUX_VERSION-4.4 = .121
 LINUX_VERSION-4.9 = .109
-LINUX_VERSION-4.14 = .50
+LINUX_VERSION-4.14 = .51
 
 LINUX_KERNEL_HASH-3.18.71 = 
5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
 LINUX_KERNEL_HASH-4.4.121 = 
44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
 LINUX_KERNEL_HASH-4.9.109 = 
3dcd5654a553432119492b69e649c4ed117781bfd571edcb02346c945be359b0
-LINUX_KERNEL_HASH-4.14.50 = 
703a8d013b25dc428d936f72858fa0c702c22cb3114a040fb9bb47562e4ea2ac
+LINUX_KERNEL_HASH-4.14.51 = 
dab2402baa2444348f9b3c354e8f65382a466d1766942a57441209f9a2df972b
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst 
-,_,$(subst /,_,$(1)))
diff --git 
a/target/linux/arc770/patches-4.14/700-stmmac-Disable-frame-filtering-completely.patch
 
b/target/linux/arc770/patches-4.14/700-stmmac-Disable-frame-filtering-completely.patch
index 58094ae96d..e63c2e934b 100644
--- 
a/target/linux/arc770/patches-4.14/700-stmmac-Disable-frame-filtering-completely.patch
+++ 
b/target/linux/arc770/patches-4.14/700-stmmac-Disable-frame-filtering-completely.patch
@@ -20,7 +20,7 @@ Signed-off-by: Alexey Brodkin 
 
 --- a/drivers/net/ethernet/stmicro/stmmac/common.h
 +++ b/drivers/net/ethernet/stmicro/stmmac/common.h
-@@ -49,7 +49,7 @@
+@@ -46,7 +46,7 @@
  #define STMMAC_GET_ENTRY(x, size) ((x + 1) & (size - 1))
  
  #undef FRAME_FILTER_DEBUG
diff --git 
a/target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch
 
b/target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch
index a561f2669d..874195558c 100644
--- 
a/target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch
+++ 
b/target/linux/generic/backport-4.14/324-v4.16-netfilter-flow-table-support-for-IPv6.patch
@@ -45,7 +45,7 @@ Signed-off-by: Pablo Neira Ayuso 
  {
 --- a/net/ipv6/netfilter/Kconfig
 +++ b/net/ipv6/netfilter/Kconfig
-@@ -71,6 +71,14 @@ config NFT_FIB_IPV6
+@@ -99,6 +99,14 @@ config NFT_FIB_IPV6
  endif # NF_TABLES_IPV6
  endif # NF_TABLES
  
diff --git 
a/target/linux/generic/backport-4.14/329-v4.16-netfilter-improve-flow-table-Kconfig-dependencies.patch
 
b/target/linux/generic/backport-4.14/329-v4.16-netfilter-improve-flow-table-Kconfig-dependencies.patch
index c897c36724..7174723fc9 100644
--- 
a/target/linux/generic/backport-4.14/329-v4.16-netfilter-improve-flow-table-Kconfig-dependencies.patch
+++ 
b/target/linux/generic/backport-4.14/329-v4.16-netfilter-improve-flow-table-Kconfig-dependencies.patch
@@ -72,7 +72,7 @@ Signed-off-by: Pablo Neira Ayuso 
  
 --- a/net/ipv6/netfilter/Kconfig
 +++ b/net/ipv6/netfilter/Kconfig
-@@ -72,8 +72,9 @@ endif # NF_TABLES_IPV6
+@@ -100,8 +100,9 @@ endif # NF_TABLES_IPV6
  endif # NF_TABLES
  
  config NF_FLOW_TABLE_IPV6
diff --git 
a/target/linux/generic/backport-4.14/346-v4.16-netfilter-flowtable-infrastructure-depends-on-NETFIL.patch
 
b/target/linux/generic/backport-4.14/346-v4.16-netfilter-flowtable-infrastructure-depends-on-NETFIL.patch
index 5267fd2f67..162086e340 100644
--- 
a/target

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

2018-06-20 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
0bc4230 version: bump snapshot
ed04799 poly1305: add missing string.h header
cbd4e34 compat: use stabler lkml links
caa718c ratelimiter: do not allow concurrent init and uninit
894ddae ratelimiter: mitigate reference underflow
0a8a62c receive: drop handshake packets if rng is not initialized
cad9e52 noise: wait for crng before taking locks
83c0690 netlink: maintain static_identity lock over entire private key update
0913f1c noise: take locks for ss precomputation
073f31a qemu: bump default kernel
bec4c48 wg-quick: android: don't forget to free compiled regexes
7ce2ef3 wg-quick: android: disable roaming to v6 networks when v4 is specified
9132be4 dns-hatchet: apply resolv.conf's selinux context to new resolv.conf
41a5747 simd: no need to restore fpu state when no preemption
6d7f0b0 simd: encapsulate fpu amortization into nice functions
f8b57d5 queueing: re-enable preemption periodically to lower latency
b7b193f queueing: remove useless spinlocks on sc
5bb62fe tools: getentropy requires 10.12
4e9f120 chacha20poly1305: use slow crypto on -rt kernels on arm too

Compiled-for: ar71xx, lantiq
Run-tested-on: ar71xx Archer C7 v2 & lantiq HH5a

Signed-off-by: Kevin Darbyshire-Bryant 
---
 package/network/services/wireguard/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/services/wireguard/Makefile 
b/package/network/services/wireguard/Makefile
index 3a5fd9cf3b..8edd556ea9 100644
--- a/package/network/services/wireguard/Makefile
+++ b/package/network/services/wireguard/Makefile
@@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=wireguard
 
-PKG_VERSION:=0.0.20180531
+PKG_VERSION:=0.0.20180620
 PKG_RELEASE:=1
 
 PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/
-PKG_HASH:=ff653095cc0e4c491ab6cd095ddf5d1db207f48f947fb92873a73220363f423c
+PKG_HASH:=b4db98ea751c8e667454f98ea1c15d704a784fe1bc093b03bd64575418a7c242
 
 PKG_LICENSE:=GPL-2.0 Apache-2.0
 PKG_LICENSE_FILES:=COPYING
-- 
2.15.2 (Apple Git-101.1)


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


[OpenWrt-Devel] [RFC PATCH] ltq_atm: burn ifx_atm_alloc_tx with fire

2018-06-18 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Since commit  0276e1f7608a2b5252aee0c92c9834a150582ffe we no longer
call or use ifx_atm_alloc_tx and the pointed to function atm_alloc_tx.

Let's remove this unused code.

Tested on: BT HomeHub 5a

Signed-off-by: Kevin Darbyshire-Bryant 
---
 package/kernel/lantiq/ltq-atm/src/ltq_atm.c | 45 +
 1 file changed, 1 insertion(+), 44 deletions(-)

diff --git a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c 
b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
index a8f787fdca..b7ac81ca80 100644
--- a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
+++ b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
@@ -187,7 +187,6 @@ static inline void u64_add_u32(ppe_u64_t, unsigned int, 
ppe_u64_t *);
  */
 static inline struct sk_buff* alloc_skb_rx(void);
 static inline struct sk_buff* alloc_skb_tx(unsigned int);
-struct sk_buff* atm_alloc_tx(struct atm_vcc *, unsigned int);
 static inline void atm_free_tx_skb_vcc(struct sk_buff *, struct atm_vcc *);
 static inline struct sk_buff *get_skb_rx_pointer(unsigned int);
 static inline int get_tx_desc(unsigned int);
@@ -261,8 +260,6 @@ EXPORT_SYMBOL(ifx_mei_atm_showtime_exit);
 
 #endif
 
-static struct sk_buff* (*ifx_atm_alloc_tx)(struct atm_vcc *, unsigned int) = 
NULL;
-
 static struct atm_priv_data g_atm_priv_data;
 
 static struct atmdev_ops g_ifx_atm_ops = {
@@ -430,8 +427,6 @@ static int ppe_open(struct atm_vcc *vcc)
 
/*  enable irq  */
if ( f_enable_irq ) {
-   ifx_atm_alloc_tx = atm_alloc_tx;
-
*MBOX_IGU1_ISRC = (1 << RX_DMA_CH_AAL) | (1 << RX_DMA_CH_OAM);
*MBOX_IGU1_IER  = (1 << RX_DMA_CH_AAL) | (1 << RX_DMA_CH_OAM);
 
@@ -480,10 +475,8 @@ static void ppe_close(struct atm_vcc *vcc)
clear_bit(conn, _atm_priv_data.conn_table);
 
/*  disable irq */
-   if ( g_atm_priv_data.conn_table == 0 ) {
+   if ( g_atm_priv_data.conn_table == 0 )
disable_irq(PPE_MAILBOX_IGU1_INT);
-   ifx_atm_alloc_tx = NULL;
-   }
 
/*  release bandwidth   */
switch ( vcc->qos.txtp.traffic_class )
@@ -785,42 +778,6 @@ static inline struct sk_buff* alloc_skb_tx(unsigned int 
size)
return skb;
 }
 
-struct sk_buff* atm_alloc_tx(struct atm_vcc *vcc, unsigned int size)
-{
-   int conn;
-   struct sk_buff *skb;
-
-   /*  oversize packet */
-   if ( size > aal5s_max_packet_size ) {
-   pr_err("atm_alloc_tx: oversize packet\n");
-   return NULL;
-   }
-   /*  send buffer overflow*/
-   if ( sk_wmem_alloc_get(sk_atm(vcc)) && !atm_may_send(vcc, size) ) {
-   pr_err("atm_alloc_tx: send buffer overflow\n");
-   return NULL;
-   }
-   conn = find_vcc(vcc);
-   if ( conn < 0 ) {
-   pr_err("atm_alloc_tx: unknown VCC\n");
-   return NULL;
-   }
-
-   skb = dev_alloc_skb(size);
-   if ( skb == NULL ) {
-   pr_err("atm_alloc_tx: sk buffer is used up\n");
-   return NULL;
-   }
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
-   refcount_add(skb->truesize, _atm(vcc)->sk_wmem_alloc);
-#else
-   atomic_add(skb->truesize, _atm(vcc)->sk_wmem_alloc);
-#endif
-
-   return skb;
-}
-
 static inline void atm_free_tx_skb_vcc(struct sk_buff *skb, struct atm_vcc 
*vcc)
 {
if ( vcc->pop != NULL )
-- 
2.15.2 (Apple Git-101.1)


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


[OpenWrt-Devel] [PATCH] lantiq: atm: fix ifx_atm driver integration

2018-06-18 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
When upstream kernel introduced commit c55fa3cccbc2c672e7f118be8f7484e53a8e9e77
we incorrectly updated our hack integration patch that updates atm/common.c

+++ b/net/atm/common.c
@@ -62,10 +62,16 @@ static void vcc_remove_socket(struct soc
write_unlock_irq(_sklist_lock);
 }

+struct sk_buff* (*ifx_atm_alloc_tx)(struct atm_vcc *, unsigned int) = NULL;
+EXPORT_SYMBOL(ifx_atm_alloc_tx);
+
 static bool vcc_tx_ready(struct atm_vcc *vcc, unsigned int size)
 {
struct sock *sk = sk_atm(vcc);

+   if (ifx_atm_alloc_tx != NULL)
+   return ifx_atm_alloc_tx(vcc, size)

The correct solution is to drop our ifx_atm_alloc_tx replacement hack
entirely and let the kernel do its thing.

In reality neither pppoatm or BR2684 interfaces actually hit this code,
so the incorrect integration would only be noticed with direct socket
calls which we are unaware of a use-case.

This is not the solution to pppoatm vc-mux failing to work which started
the whole investigation, but let's fix it up anyway.

With sincerest thanks to David Woodhouse  &
Mathias Kresin .

Tested-on: lantiq, BT HomeHub 5a

Signed-off-by: Kevin Darbyshire-Bryant 
---
 .../patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch  | 19 ---
 1 file changed, 19 deletions(-)

diff --git 
a/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch 
b/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch
index 2c73cec55c..66ca2fd5ac 100644
--- a/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch
+++ b/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch
@@ -467,25 +467,6 @@ Signed-off-by: John Crispin 
  struct atm_trafprm {
unsigned char   traffic_class;  /* traffic class (ATM_UBR, ...) */
int max_pcr;/* maximum PCR in cells per second */
 a/net/atm/common.c
-+++ b/net/atm/common.c
-@@ -62,10 +62,16 @@ static void vcc_remove_socket(struct soc
-   write_unlock_irq(_sklist_lock);
- }
- 
-+struct sk_buff* (*ifx_atm_alloc_tx)(struct atm_vcc *, unsigned int) = NULL;
-+EXPORT_SYMBOL(ifx_atm_alloc_tx);
-+
- static bool vcc_tx_ready(struct atm_vcc *vcc, unsigned int size)
- {
-   struct sock *sk = sk_atm(vcc);
- 
-+  if (ifx_atm_alloc_tx != NULL)
-+  return ifx_atm_alloc_tx(vcc, size);
-+
-   if (sk_wmem_alloc_get(sk) && !atm_may_send(vcc, size)) {
-   pr_debug("Sorry: wmem_alloc = %d, size = %d, sndbuf = %d\n",
-sk_wmem_alloc_get(sk), size, sk->sk_sndbuf);
 --- a/net/atm/proc.c
 +++ b/net/atm/proc.c
 @@ -155,7 +155,7 @@ static void *vcc_seq_next(struct seq_fil
-- 
2.15.2 (Apple Git-101.1)


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


[OpenWrt-Devel] [PATCH] kernel: atm: pppoatm fix vc-mux connection failures

2018-06-18 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Backport a hot off the press upstream kernel ATM fix:

Preserve value of skb->truesize when accounting to vcc

"There's a hack in pskb_expand_head() to avoid adjusting skb->truesize
for certain skbs. Ideally it would cover ATM too. It doesn't. Just
stashing the accounted value and using it in atm_raw_pop() is probably
the easiest way to cope."

The issue was exposed by upstream with:

commit 14afee4b6092fde451ee17604e5f5c89da33e71e
Author: Reshetova, Elena 
Date:   Fri Jun 30 13:08:00 2017 +0300

net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

But an earlier commit left the ticking timebomb:

158f323b9868 ("net: adjust skb->truesize in pskb_expand_head()

Sincerest thanks to Mathias Kresin  for debugging
assistance and to David Woodhouse  for further
guidance, cajoling & patience in interpreting the debug I was giving him
and producing a fix!

Fixes FS#1567

Signed-off-by: Kevin Darbyshire-Bryant 
---
 ...-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch | 172 +
 1 file changed, 172 insertions(+)
 create mode 100644 
target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch

diff --git 
a/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
 
b/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
new file mode 100644
index 00..06d00886f1
--- /dev/null
+++ 
b/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
@@ -0,0 +1,172 @@
+From 9bbe60a67be5a1c6f79b3c9be5003481a50529ff Mon Sep 17 00:00:00 2001
+From: David Woodhouse 
+Date: Sat, 16 Jun 2018 11:55:44 +0100
+Subject: atm: Preserve value of skb->truesize when accounting to vcc
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+ATM accounts for in-flight TX packets in sk_wmem_alloc of the VCC on
+which they are to be sent. But it doesn't take ownership of those
+packets from the sock (if any) which originally owned them. They should
+remain owned by their actual sender until they've left the box.
+
+There's a hack in pskb_expand_head() to avoid adjusting skb->truesize
+for certain skbs, precisely to avoid messing up sk_wmem_alloc
+accounting. Ideally that hack would cover the ATM use case too, but it
+doesn't — skbs which aren't owned by any sock, for example PPP control
+frames, still get their truesize adjusted when the low-level ATM driver
+adds headroom.
+
+This has always been an issue, it seems. The truesize of a packet
+increases, and sk_wmem_alloc on the VCC goes negative. But this wasn't
+for normal traffic, only for control frames. So I think we just got away
+with it, and we probably needed to send 2GiB of LCP echo frames before
+the misaccounting would ever have caused a problem and caused
+atm_may_send() to start refusing packets.
+
+Commit 14afee4b609 ("net: convert sock.sk_wmem_alloc from atomic_t to
+refcount_t") did exactly what it was intended to do, and turned this
+mostly-theoretical problem into a real one, causing PPPoATM to fail
+immediately as sk_wmem_alloc underflows and atm_may_send() *immediately*
+starts refusing to allow new packets.
+
+The least intrusive solution to this problem is to stash the value of
+skb->truesize that was accounted to the VCC, in a new member of the
+ATM_SKB(skb) structure. Then in atm_pop_raw() subtract precisely that
+value instead of the then-current value of skb->truesize.
+
+Fixes: 158f323b9868 ("net: adjust skb->truesize in pskb_expand_head()")
+Signed-off-by: David Woodhouse 
+Tested-by: Kevin Darbyshire-Bryant 
+Signed-off-by: David S. Miller 
+---
+ include/linux/atmdev.h | 15 +++
+ net/atm/br2684.c   |  3 +--
+ net/atm/clip.c |  3 +--
+ net/atm/common.c   |  3 +--
+ net/atm/lec.c  |  3 +--
+ net/atm/mpc.c  |  3 +--
+ net/atm/pppoatm.c  |  3 +--
+ net/atm/raw.c  |  4 ++--
+ 8 files changed, 23 insertions(+), 14 deletions(-)
+
+--- a/include/linux/atmdev.h
 b/include/linux/atmdev.h
+@@ -214,6 +214,7 @@ struct atmphy_ops {
+ struct atm_skb_data {
+   struct atm_vcc  *vcc;   /* ATM VCC */
+   unsigned long   atm_options;/* ATM layer options */
++  unsigned intacct_truesize;  /* truesize accounted to vcc */
+ };
+ 
+ #define VCC_HTABLE_SIZE 32
+@@ -241,6 +242,20 @@ void vcc_insert_socket(struct sock *sk);
+ 
+ void atm_dev_release_vccs(struct atm_dev *dev);
+ 
++static inline void atm_account_tx(struct atm_vcc *vcc, struct sk_buff *skb)
++{
++  /*
++   * Because ATM skbs may not belong to a sock (an

Re: [OpenWrt-Devel] [PATCH v2 2/2] kernel: atm: pppoatm fix vc-mux connection failures

2018-06-18 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---


> On 18 Jun 2018, at 08:06, David Woodhouse  wrote:
> 
> On Sat, 2018-06-16 at 08:36 +0000, Kevin Darbyshire-Bryant via openwrt-devel 
> wrote:
>> Backport a hot off the press upstream kernel ATM fix:
>> 
>> Preserve value of skb->truesize when accounting to vcc
>> 
>> "There's a hack in pskb_expand_head() to avoid adjusting skb->truesize
>> for certain skbs. Ideally it would cover ATM too. It doesn't. Just
>> stashing the accounted value and using it in atm_raw_pop() is probably
>> the easiest way to cope."
> 
> Please use the version that got committed upstream (although the
> differences are only in the commit message):
> https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=9bbe60a67be5a1c6f79b3c9be5003481a50529ff

I certainly can do so and considered submitting a v3 yesterday…. I held off on 
the basis that I’d expect the fix to arrive back at us via the stable backports 
and the usual stream of kernel bumps that I keep an eye on also.   At that 
point our local patch would disappear anyway.  I can be persuaded to not be so 
bloody lazy :-)

Cheers,

Kevin D-B

012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A

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


Re: [OpenWrt-Devel] [PATCH 1/2] lantiq: atm: fix ifx_atm driver integration

2018-06-16 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---


> On 16 Jun 2018, at 10:43, David Woodhouse  wrote:
> 
> 
>> The correct solution is to drop our ifx_atm_alloc_tx replacement hack
>> entirely and let the kernel do its thing.
> 
> You need to kill it in the ltq-atm driver too, surely? If you only kill
> the hook, the module won't load.

To paraphrase Edmund Blackadder III and the ‘Ravelling Nancy’ - I am one of 
these people who are quite happy
to use modules, but have no idea how they work :-)

# lsmod | grep atm
atm38610  6 ltq_atm_vr9,pppoatm,br2684
drv_mei_cpe   147967  2 ltq_atm_vr9,drv_dsl_cpe_api
ltq_atm_vr928749  1 
ppp_generic24546  8 pppoe,pppox,ppp_async,pppoatm
pppoatm 4080  1 

Looks okay to me but happy to take advice/instruction.

Cheers,

Kevin

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


[OpenWrt-Devel] [PATCH v2 1/2] lantiq: atm: fix ifx_atm driver integration

2018-06-16 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
When upstream kernel introduced commit c55fa3cccbc2c672e7f118be8f7484e53a8e9e77
we incorrectly updated our hack integration patch that updates atm/common.c

+++ b/net/atm/common.c
@@ -62,10 +62,16 @@ static void vcc_remove_socket(struct soc
write_unlock_irq(_sklist_lock);
 }

+struct sk_buff* (*ifx_atm_alloc_tx)(struct atm_vcc *, unsigned int) = NULL;
+EXPORT_SYMBOL(ifx_atm_alloc_tx);
+
 static bool vcc_tx_ready(struct atm_vcc *vcc, unsigned int size)
 {
struct sock *sk = sk_atm(vcc);

+   if (ifx_atm_alloc_tx != NULL)
+   return ifx_atm_alloc_tx(vcc, size)

The correct solution is to drop our ifx_atm_alloc_tx replacement hack
entirely and let the kernel do its thing.

In reality neither pppoatm or BR2684 interfaces actually hit this code,
so the incorrect integration would only be noticed with direct socket
calls which we are unaware of a use-case.

This is not the solution to pppoatm vc-mux failing to work which started
the whole investigation, but let's fix it up anyway.

With sincerest thanks to David Woodhouse  &
Mathias Kresin .

Tested-on: lantiq, BT HomeHub 5a

Signed-off-by: Kevin Darbyshire-Bryant 
---
v2 - tweak to contributor credits, signed off by typo and a bit of
original fix residue that was missed.

 .../patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch  | 19 ---
 1 file changed, 19 deletions(-)

diff --git 
a/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch 
b/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch
index 2c73cec55c..66ca2fd5ac 100644
--- a/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch
+++ b/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch
@@ -467,25 +467,6 @@ Signed-off-by: John Crispin 
  struct atm_trafprm {
unsigned char   traffic_class;  /* traffic class (ATM_UBR, ...) */
int max_pcr;/* maximum PCR in cells per second */
 a/net/atm/common.c
-+++ b/net/atm/common.c
-@@ -62,10 +62,16 @@ static void vcc_remove_socket(struct soc
-   write_unlock_irq(_sklist_lock);
- }
- 
-+struct sk_buff* (*ifx_atm_alloc_tx)(struct atm_vcc *, unsigned int) = NULL;
-+EXPORT_SYMBOL(ifx_atm_alloc_tx);
-+
- static bool vcc_tx_ready(struct atm_vcc *vcc, unsigned int size)
- {
-   struct sock *sk = sk_atm(vcc);
- 
-+  if (ifx_atm_alloc_tx != NULL)
-+  return ifx_atm_alloc_tx(vcc, size);
-+
-   if (sk_wmem_alloc_get(sk) && !atm_may_send(vcc, size)) {
-   pr_debug("Sorry: wmem_alloc = %d, size = %d, sndbuf = %d\n",
-sk_wmem_alloc_get(sk), size, sk->sk_sndbuf);
 --- a/net/atm/proc.c
 +++ b/net/atm/proc.c
 @@ -155,7 +155,7 @@ static void *vcc_seq_next(struct seq_fil
-- 
2.15.1 (Apple Git-101)


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


[OpenWrt-Devel] [PATCH v2 2/2] kernel: atm: pppoatm fix vc-mux connection failures

2018-06-16 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Backport a hot off the press upstream kernel ATM fix:

Preserve value of skb->truesize when accounting to vcc

"There's a hack in pskb_expand_head() to avoid adjusting skb->truesize
for certain skbs. Ideally it would cover ATM too. It doesn't. Just
stashing the accounted value and using it in atm_raw_pop() is probably
the easiest way to cope."

The issue was introduced in upstream by:

commit 14afee4b6092fde451ee17604e5f5c89da33e71e
Author: Reshetova, Elena 
Date:   Fri Jun 30 13:08:00 2017 +0300

net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

Sincerest thanks to Mathias Kresin  for debugging
assistance and to David Woodhouse  for further
guidance, cajoling & patience in interpreting the debug I was giving him
and producing a fix!

Fixes FS#1567

Signed-off-by: Kevin Darbyshire-Bryant 
---
 ...-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch | 186 +
 1 file changed, 186 insertions(+)
 create mode 100644 
target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch

diff --git 
a/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
 
b/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
new file mode 100644
index 00..8108d99348
--- /dev/null
+++ 
b/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
@@ -0,0 +1,186 @@
+From 99967eb67d14b2ed17b194a8dac357d641a06e43 Mon Sep 17 00:00:00 2001
+From: David Woodhouse 
+Date: Fri, 15 Jun 2018 21:00:27 +0100
+Subject: [PATCH] net: convert sock.sk_wmem_alloc from atomic_t to refcount_t
+
+On Fri, 2018-06-15 at 14:44 +0100, David Woodhouse wrote:
+>
+> > Or simply use a new field in ATM_SKB(skb) to remember a stable
+> > truesize used in both sides (add/sub)
+>
+> Right, that was my second suggestion ("copy the accounted value...").
+>
+> It's a bit of a hack, and I think that actually *using* sock_wfree()
+> instead of what's currently in atm_pop_raw() would be the better
+> solution. Does anyone remember why we didn't do that in the first
+> place?
+
+That does end up being quite hairy. I don't think it's worth doing.
+
+This should probably suffice to fix it...
+
+Kevin this is going to conflict with the ifx_atm_alloc_skb() hack in
+the tree you're working on, but that needs to be killed with fire
+anyway. It's utterly pointless as discussed.
+
+From 3368eaeb0a2f09138894dde0f26f879e5228005a Mon Sep 17 00:00:00 2001
+From: David Woodhouse 
+Date: Fri, 15 Jun 2018 20:49:20 +0100
+Subject: [PATCH] atm: Preserve value of skb->truesize when accounting to vcc
+
+There's a hack in pskb_expand_head() to avoid adjusting skb->truesize
+for certain skbs. Ideally it would cover ATM too. It doesn't. Just
+stashing the accounted value and using it in atm_raw_pop() is probably
+the easiest way to cope.
+
+Signed-off-by: David Woodhouse 
+Signed-off-by: Kevin Darbyshire-Bryant 
+---
+ include/linux/atmdev.h | 15 +++
+ net/atm/br2684.c   |  3 +--
+ net/atm/clip.c |  3 +--
+ net/atm/common.c   |  3 +--
+ net/atm/lec.c  |  3 +--
+ net/atm/mpc.c  |  3 +--
+ net/atm/pppoatm.c  |  3 +--
+ net/atm/raw.c  |  4 ++--
+ 8 files changed, 23 insertions(+), 14 deletions(-)
+
+diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h
+index 0c27515d..8124815e 100644
+--- a/include/linux/atmdev.h
 b/include/linux/atmdev.h
+@@ -214,6 +214,7 @@ struct atmphy_ops {
+ struct atm_skb_data {
+   struct atm_vcc  *vcc;   /* ATM VCC */
+   unsigned long   atm_options;/* ATM layer options */
++  unsigned intacct_truesize;  /* truesize accounted to vcc */
+ };
+ 
+ #define VCC_HTABLE_SIZE 32
+@@ -241,6 +242,20 @@ void vcc_insert_socket(struct sock *sk);
+ 
+ void atm_dev_release_vccs(struct atm_dev *dev);
+ 
++static inline void atm_account_tx(struct atm_vcc *vcc, struct sk_buff *skb)
++{
++  /*
++   * Because ATM skbs may not belong to a sock (and we don't
++   * necessarily want to), skb->truesize may be adjusted,
++   * escaping the hack in pskb_expand_head() which avoids
++   * doing so for some cases. So stash the value of truesize
++   * at the time we accounted it, and atm_pop_raw() can use
++   * that value later, in case it changes.
++   */
++  refcount_add(skb->truesize, _atm(vcc)->sk_wmem_alloc);
++  ATM_SKB(skb)->acct_truesize = skb->truesize;
++  ATM_SKB(skb)->atm_options = vcc->atm_options;
++}
+ 
+ static inline void atm_force_charge(struct atm_vcc *vcc,int truesize)
+ {
+diff --gi

[OpenWrt-Devel] [PATCH 1/2] lantiq: atm: fix ifx_atm driver integration

2018-06-16 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
When upstream kernel introduced commit c55fa3cccbc2c672e7f118be8f7484e53a8e9e77
we incorrectly updated our hack integration patch that updates atm/common.c

+++ b/net/atm/common.c
@@ -62,10 +62,16 @@ static void vcc_remove_socket(struct soc
write_unlock_irq(_sklist_lock);
 }

+struct sk_buff* (*ifx_atm_alloc_tx)(struct atm_vcc *, unsigned int) = NULL;
+EXPORT_SYMBOL(ifx_atm_alloc_tx);
+
 static bool vcc_tx_ready(struct atm_vcc *vcc, unsigned int size)
 {
struct sock *sk = sk_atm(vcc);

+   if (ifx_atm_alloc_tx != NULL)
+   return ifx_atm_alloc_tx(vcc, size)

The correct solution is to drop our ifx_atm_alloc_tx replacement hack
entirely and let the kernel do its thing.

In reality neither pppoatm or BR2684 interfaces actually hit this code,
so the incorrect integration would only be noticed with direct socket
calls which we are unaware of a use-case.

This is not the solution to pppoatm vc-mux failing to work which started
the whole investigation, but let's fix it up anyway.

With sincerest thanks to dwmw2 & mkresin.

Tested-on: lantiq, BT HomeHub 5a

Signed-of-by: Kevin Darbyshire-Bryant 
Signed-off-by: Kevin Darbyshire-Bryant 
---
 .../lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch  | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git 
a/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch 
b/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch
index 2c73cec55c..a3441f8533 100644
--- a/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch
+++ b/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch
@@ -469,7 +469,7 @@ Signed-off-by: John Crispin 
int max_pcr;/* maximum PCR in cells per second */
 --- a/net/atm/common.c
 +++ b/net/atm/common.c
-@@ -62,10 +62,16 @@ static void vcc_remove_socket(struct soc
+@@ -62,6 +62,9 @@ static void vcc_remove_socket(struct soc
write_unlock_irq(_sklist_lock);
  }
  
@@ -479,13 +479,6 @@ Signed-off-by: John Crispin 
  static bool vcc_tx_ready(struct atm_vcc *vcc, unsigned int size)
  {
struct sock *sk = sk_atm(vcc);
- 
-+  if (ifx_atm_alloc_tx != NULL)
-+  return ifx_atm_alloc_tx(vcc, size);
-+
-   if (sk_wmem_alloc_get(sk) && !atm_may_send(vcc, size)) {
-   pr_debug("Sorry: wmem_alloc = %d, size = %d, sndbuf = %d\n",
-sk_wmem_alloc_get(sk), size, sk->sk_sndbuf);
 --- a/net/atm/proc.c
 +++ b/net/atm/proc.c
 @@ -155,7 +155,7 @@ static void *vcc_seq_next(struct seq_fil
-- 
2.15.1 (Apple Git-101)


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


[OpenWrt-Devel] [PATCH 2/2] kernel: atm: pppoatm fix vc-mux connection failures

2018-06-16 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Backport a hot off the press upstream kernel ATM fix:

Preserve value of skb->truesize when accounting to vcc

"There's a hack in pskb_expand_head() to avoid adjusting skb->truesize
for certain skbs. Ideally it would cover ATM too. It doesn't. Just
stashing the accounted value and using it in atm_raw_pop() is probably
the easiest way to cope."

The issue was introduced in upstream by:

commit 14afee4b6092fde451ee17604e5f5c89da33e71e
Author: Reshetova, Elena 
Date:   Fri Jun 30 13:08:00 2017 +0300

net: convert sock.sk_wmem_alloc from atomic_t to refcount_t

Sincerest thanks to Mathias Kresin  for debugging
assistance and to David Woodhouse  for further
guidance, cajoling & patience in interpreting the debug I was giving him
and producing a fix!

Fixes FS#1567

Signed-off-by: Kevin Darbyshire-Bryant 
---
 ...-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch | 186 +
 1 file changed, 186 insertions(+)
 create mode 100644 
target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch

diff --git 
a/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
 
b/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
new file mode 100644
index 00..8108d99348
--- /dev/null
+++ 
b/target/linux/generic/backport-4.14/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch
@@ -0,0 +1,186 @@
+From 99967eb67d14b2ed17b194a8dac357d641a06e43 Mon Sep 17 00:00:00 2001
+From: David Woodhouse 
+Date: Fri, 15 Jun 2018 21:00:27 +0100
+Subject: [PATCH] net: convert sock.sk_wmem_alloc from atomic_t to refcount_t
+
+On Fri, 2018-06-15 at 14:44 +0100, David Woodhouse wrote:
+>
+> > Or simply use a new field in ATM_SKB(skb) to remember a stable
+> > truesize used in both sides (add/sub)
+>
+> Right, that was my second suggestion ("copy the accounted value...").
+>
+> It's a bit of a hack, and I think that actually *using* sock_wfree()
+> instead of what's currently in atm_pop_raw() would be the better
+> solution. Does anyone remember why we didn't do that in the first
+> place?
+
+That does end up being quite hairy. I don't think it's worth doing.
+
+This should probably suffice to fix it...
+
+Kevin this is going to conflict with the ifx_atm_alloc_skb() hack in
+the tree you're working on, but that needs to be killed with fire
+anyway. It's utterly pointless as discussed.
+
+From 3368eaeb0a2f09138894dde0f26f879e5228005a Mon Sep 17 00:00:00 2001
+From: David Woodhouse 
+Date: Fri, 15 Jun 2018 20:49:20 +0100
+Subject: [PATCH] atm: Preserve value of skb->truesize when accounting to vcc
+
+There's a hack in pskb_expand_head() to avoid adjusting skb->truesize
+for certain skbs. Ideally it would cover ATM too. It doesn't. Just
+stashing the accounted value and using it in atm_raw_pop() is probably
+the easiest way to cope.
+
+Signed-off-by: David Woodhouse 
+Signed-off-by: Kevin Darbyshire-Bryant 
+---
+ include/linux/atmdev.h | 15 +++
+ net/atm/br2684.c   |  3 +--
+ net/atm/clip.c |  3 +--
+ net/atm/common.c   |  3 +--
+ net/atm/lec.c  |  3 +--
+ net/atm/mpc.c  |  3 +--
+ net/atm/pppoatm.c  |  3 +--
+ net/atm/raw.c  |  4 ++--
+ 8 files changed, 23 insertions(+), 14 deletions(-)
+
+diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h
+index 0c27515d..8124815e 100644
+--- a/include/linux/atmdev.h
 b/include/linux/atmdev.h
+@@ -214,6 +214,7 @@ struct atmphy_ops {
+ struct atm_skb_data {
+   struct atm_vcc  *vcc;   /* ATM VCC */
+   unsigned long   atm_options;/* ATM layer options */
++  unsigned intacct_truesize;  /* truesize accounted to vcc */
+ };
+ 
+ #define VCC_HTABLE_SIZE 32
+@@ -241,6 +242,20 @@ void vcc_insert_socket(struct sock *sk);
+ 
+ void atm_dev_release_vccs(struct atm_dev *dev);
+ 
++static inline void atm_account_tx(struct atm_vcc *vcc, struct sk_buff *skb)
++{
++  /*
++   * Because ATM skbs may not belong to a sock (and we don't
++   * necessarily want to), skb->truesize may be adjusted,
++   * escaping the hack in pskb_expand_head() which avoids
++   * doing so for some cases. So stash the value of truesize
++   * at the time we accounted it, and atm_pop_raw() can use
++   * that value later, in case it changes.
++   */
++  refcount_add(skb->truesize, _atm(vcc)->sk_wmem_alloc);
++  ATM_SKB(skb)->acct_truesize = skb->truesize;
++  ATM_SKB(skb)->atm_options = vcc->atm_options;
++}
+ 
+ static inline void atm_force_charge(struct atm_vcc *vcc,int truesize)
+ {
+diff --gi

Re: [OpenWrt-Devel] [PATCH] ramips: mir3g: reduce usb power flapping at boot

2018-06-11 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---


> On 11 Jun 2018, at 15:56, Mathias Kresin  wrote:
> 
> 08.06.2018 20:45, Kevin Darbyshire-Bryant:
>> Define USB port power as set on by bootloader (which it is)  The power
>> gets cycled at kernel boot, but by defining as 'regulator-boot-on'
>> reduces the power off to power on at driver initial load & setup from
>> around 5 seconds to around 2 seconds.
>> Signed-off-by: Kevin Darbyshire-Bryant 
>> ---
>>  target/linux/ramips/dts/MIR3G.dts | 1 +
>>  1 file changed, 1 insertion(+)
>> diff --git a/target/linux/ramips/dts/MIR3G.dts 
>> b/target/linux/ramips/dts/MIR3G.dts
>> index 44dfc1796c..1ca085e6c4 100644
>> --- a/target/linux/ramips/dts/MIR3G.dts
>> +++ b/target/linux/ramips/dts/MIR3G.dts
>> @@ -72,6 +72,7 @@
>>  regulator-min-microvolt = <500>;
>>  regulator-max-microvolt = <500>;
>>  gpio = < 12 GPIO_ACTIVE_HIGH>;
>> +regulator-boot-on;
>>  enable-active-high;
>>  };
> 
> NAK on this one.
> 
> Following our conversation on IRC, I had a look at the fixed regulator code 
> to see what it really does. By default the regulator is disabled during 
> driver load[0]. The "regulator-boot-on" inverts the logic and enables the 
> regulator while loading the fixed regulator driver.
> 
> In my opinion, enabling the fixed regulator unconditionally on boot 
> contradicts your initial "switch to fixed regulator" patch. Without the 
> "regulator-boot-on", the GPIO is pulled LOW (usb pwr disabled) on boot and 
> it's the usb driver which enables the usb pwr (pulls HIGH) == controls the 
> power supply. This way the usb pwr stays/is off, if someone decides to not 
> include or load the usb driver.
> 
> Mathias
> 
> [0] 
> https://github.com/torvalds/linux/blob/master/drivers/regulator/fixed.c#L159

I ack your nack.  Absolutely fine reasoning.


Cheers,

Kevin D-B

012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A


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


[OpenWrt-Devel] [PATCH] kernel: bump 4.9 to 4.9.107

2018-06-09 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Refresh patches.

Compile-tested for: ar71xx
Run-tested on: ar71xx Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant 
---
 include/kernel-version.mk  |   4 +-
 .../patches-4.9/910-unaligned_access_hacks.patch   |   2 +-
 ..._pl011-Don-t-use-DT-aliases-for-numbering.patch |   2 +-
 .../950-0195-amba_pl011-Round-input-clock-up.patch |   4 +-
 .../pending-4.9/890-uart_optional_sysrq.patch  |   2 +-
 .../sunxi/patches-4.9/0052-stmmac-form-4-12.patch  | 344 ++---
 6 files changed, 168 insertions(+), 190 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 6c220f3f2a..f43344ab84 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -4,12 +4,12 @@ LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .71
 LINUX_VERSION-4.4 = .121
-LINUX_VERSION-4.9 = .106
+LINUX_VERSION-4.9 = .107
 LINUX_VERSION-4.14 = .48
 
 LINUX_KERNEL_HASH-3.18.71 = 
5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
 LINUX_KERNEL_HASH-4.4.121 = 
44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
-LINUX_KERNEL_HASH-4.9.106 = 
2d409bb29588ea9a61bae006255ee97a675ded364c87a9ff43f687c5271bbe3c
+LINUX_KERNEL_HASH-4.9.107 = 
3ce7f40ecee096cda1d51eb2cada105a39abe8da7b968ef85f52be961f22cad3
 LINUX_KERNEL_HASH-4.14.48 = 
80a0608f611fe7a5c54556402cdc2880a21301e1c4e1b19d4c1db82ad2bf22b9
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1
diff --git a/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch 
b/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch
index 4c59876b82..1815ccb1d3 100644
--- a/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch
+++ b/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch
@@ -795,7 +795,7 @@
  
 --- a/net/ipv4/tcp_input.c
 +++ b/net/ipv4/tcp_input.c
-@@ -3894,14 +3894,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -3896,14 +3896,16 @@ static bool tcp_parse_aligned_timestamp(
  {
const __be32 *ptr = (const __be32 *)(th + 1);
  
diff --git 
a/target/linux/brcm2708/patches-4.9/950-0087-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch
 
b/target/linux/brcm2708/patches-4.9/950-0087-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch
index 07944df1e0..2710ed63d7 100644
--- 
a/target/linux/brcm2708/patches-4.9/950-0087-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch
+++ 
b/target/linux/brcm2708/patches-4.9/950-0087-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch
@@ -14,7 +14,7 @@ use the same logic.
 
 --- a/drivers/tty/serial/amba-pl011.c
 +++ b/drivers/tty/serial/amba-pl011.c
-@@ -2446,7 +2446,12 @@ static int pl011_setup_port(struct devic
+@@ -2501,7 +2501,12 @@ static int pl011_setup_port(struct devic
if (IS_ERR(base))
return PTR_ERR(base);
  
diff --git 
a/target/linux/brcm2708/patches-4.9/950-0195-amba_pl011-Round-input-clock-up.patch
 
b/target/linux/brcm2708/patches-4.9/950-0195-amba_pl011-Round-input-clock-up.patch
index 11293c360e..b981be02ac 100644
--- 
a/target/linux/brcm2708/patches-4.9/950-0195-amba_pl011-Round-input-clock-up.patch
+++ 
b/target/linux/brcm2708/patches-4.9/950-0195-amba_pl011-Round-input-clock-up.patch
@@ -68,7 +68,7 @@ Signed-off-by: Phil Elwell 
  
if (uap->vendor->fixed_options) {
baud = uap->fixed_baud;
-@@ -2377,6 +2394,7 @@ static struct uart_driver amba_reg = {
+@@ -2432,6 +2449,7 @@ static struct uart_driver amba_reg = {
.cons   = AMBA_CONSOLE,
  };
  
@@ -76,7 +76,7 @@ Signed-off-by: Phil Elwell 
  static int pl011_probe_dt_alias(int index, struct device *dev)
  {
struct device_node *np;
-@@ -2408,6 +2426,7 @@ static int pl011_probe_dt_alias(int inde
+@@ -2463,6 +2481,7 @@ static int pl011_probe_dt_alias(int inde
  
return ret;
  }
diff --git a/target/linux/generic/pending-4.9/890-uart_optional_sysrq.patch 
b/target/linux/generic/pending-4.9/890-uart_optional_sysrq.patch
index 6cb745ee33..b317070e52 100644
--- a/target/linux/generic/pending-4.9/890-uart_optional_sysrq.patch
+++ b/target/linux/generic/pending-4.9/890-uart_optional_sysrq.patch
@@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau 
  {
 --- a/lib/Kconfig.debug
 +++ b/lib/Kconfig.debug
-@@ -396,6 +396,11 @@ config MAGIC_SYSRQ_DEFAULT_ENABLE
+@@ -410,6 +410,11 @@ config MAGIC_SYSRQ_DEFAULT_ENABLE
  This may be set to 1 or 0 to enable or disable them all, or
  to a bitmask as described in Documentation/sysrq.txt.
  
diff --git a/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch 
b/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch
index 1ed1294694..a1b018186f 100644
--- a/target/linux/sunxi/patches-4.9/0052-stmmac-fo

[OpenWrt-Devel] [PATCH] ramips: mir3g: reduce usb power flapping at boot

2018-06-08 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Define USB port power as set on by bootloader (which it is)  The power
gets cycled at kernel boot, but by defining as 'regulator-boot-on'
reduces the power off to power on at driver initial load & setup from
around 5 seconds to around 2 seconds.

Signed-off-by: Kevin Darbyshire-Bryant 
---
 target/linux/ramips/dts/MIR3G.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ramips/dts/MIR3G.dts 
b/target/linux/ramips/dts/MIR3G.dts
index 44dfc1796c..1ca085e6c4 100644
--- a/target/linux/ramips/dts/MIR3G.dts
+++ b/target/linux/ramips/dts/MIR3G.dts
@@ -72,6 +72,7 @@
regulator-min-microvolt = <500>;
regulator-max-microvolt = <500>;
gpio = < 12 GPIO_ACTIVE_HIGH>;
+   regulator-boot-on;
enable-active-high;
};
 
-- 
2.15.1 (Apple Git-101)


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


[OpenWrt-Devel] [PATCH] ramips: mir3g dts define usb port Vcc volt regulator GPIO

2018-06-07 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Define USB port power on/off GPO as voltage regulator type instead of
exposing as a normal GPIO.

The GPO is now controlled by the USB driver via the voltage regulator
definition.  The regulator is of fixed output type (5V for USB) hence the
GPO switches power on/off to USB pin 1 (Vcc)

USB port power is enabled on driver load and disabled on driver unload.

Enable kernel support for fixed voltage regulator types on mt7621.

Signed-off-by: Kevin Darbyshire-Bryant 
---
 target/linux/ramips/dts/MIR3G.dts  | 21 -
 target/linux/ramips/mt7621/config-4.14 |  2 ++
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/target/linux/ramips/dts/MIR3G.dts 
b/target/linux/ramips/dts/MIR3G.dts
index efe98b0e10..44dfc1796c 100644
--- a/target/linux/ramips/dts/MIR3G.dts
+++ b/target/linux/ramips/dts/MIR3G.dts
@@ -66,16 +66,19 @@
};
};
 
-   gpio_export {
-   compatible = "gpio-export";
-   #size-cells = <0>;
-
-   usbpower {
-   gpio-export,name = "usbpower";
-   gpio-export,output = <1>;
-   gpios = < 12 GPIO_ACTIVE_HIGH>;
-   };
+   reg_usb_vbus: reg_usb_vbus {
+   compatible = "regulator-fixed";
+   regulator-name = "usb_vbus";
+   regulator-min-microvolt = <500>;
+   regulator-max-microvolt = <500>;
+   gpio = < 12 GPIO_ACTIVE_HIGH>;
+   enable-active-high;
};
+
+};
+
+ {
+   vbus-supply = <_usb_vbus>;
 };
 
  {
diff --git a/target/linux/ramips/mt7621/config-4.14 
b/target/linux/ramips/mt7621/config-4.14
index 3a5cd4296a..c19d735e5c 100644
--- a/target/linux/ramips/mt7621/config-4.14
+++ b/target/linux/ramips/mt7621/config-4.14
@@ -227,6 +227,8 @@ CONFIG_RCU_STALL_COMMON=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_I2C=y
 CONFIG_REGMAP_SPI=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_RESET_CONTROLLER=y
 CONFIG_RFS_ACCEL=y
 CONFIG_RPS=y
-- 
2.15.1 (Apple Git-101)


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


[OpenWrt-Devel] [PATCH] kernel: bump to 4.9.105

2018-05-31 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Refresh patches.

Drop patches that have been upstreamed:
target/linux/ar71xx/patches-4.9/106-01-MIPS-ath79-fix-AR724X_PLL_REG_PCIE_CONFIG-offset.patch
target/linux/generic/backport-4.9/095-v4.12-ipv6-Need-to-export-ipv6_push_frag_opts-for-tunnelin.patch
target/linux/generic/pending-4.9/180-net-phy-at803x-add-support-for-AT8032.patch
target/linux/generic/pending-4.9/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch
target/linux/generic/pending-4.9/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch

Compile & run tested: ar71xx Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant 
---
 include/kernel-version.mk  |   4 +-
 ...h79-fix-AR724X_PLL_REG_PCIE_CONFIG-offset.patch |  29 --
 .../902-at803x-add-reset-gpio-pdata.patch  |   8 +-
 ...oid-suspending-if-we-re-in-gadget-mode-18.patch |   2 +-
 .../linux/brcm47xx/patches-4.9/159-cpu_fixes.patch |   8 +-
 ...tsq-move-tsq_flags-close-to-sk_wmem_alloc.patch |   2 +-
 .../050-usb-dwc2-Remove-unnecessary-kfree.patch|   2 +-
 ...llocate-struct-bgmac-just-once-don-t-copy.patch |   6 +-
 .../090-net-generalize-napi_complete_done.patch|  18 +-
 ...o-export-ipv6_push_frag_opts-for-tunnelin.patch |  36 --
 ...er.h-prevent-redefinition-of-struct-ethhd.patch |   2 +-
 .../hack-4.9/773-bgmac-add-srab-switch.patch   |   6 +-
 .../generic/hack-4.9/901-debloat_sock_diag.patch   |   2 +-
 ...-.rename2-and-add-RENAME_WHITEOUT-support.patch |   6 +-
 .../141-jffs2-add-RENAME_EXCHANGE-support.patch|   8 +-
 ...180-net-phy-at803x-add-support-for-AT8032.patch |  70 ---
 ...net-usb-add-lte-modem-wistron-neweb-d18q1.patch |  61 ---
 ...t-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch |  28 --
 .../pending-4.9/630-packet_socket_type.patch   |   6 +-
 .../666-Add-support-for-MAP-E-FMRs-mesh-mode.patch |  10 +-
 ...t-phy-at803x-allow-to-configure-via-pdata.patch |  12 +-
 .../735-net-phy-at803x-fix-at8033-sgmii-mode.patch |   2 +-
 .../generic/pending-4.9/834-ledtrig-libata.patch   |   8 +-
 .../pending-4.9/890-uart_optional_sysrq.patch  |   2 +-
 .../ixp4xx/patches-4.9/160-delayed_uart_io.patch   |   4 +-
 .../202-core-linux-support-layerscape.patch|   2 +-
 .../patches-4.9/702-pci-support-layerscape.patch   |   2 +-
 .../704-fsl-mc-layerscape-support.patch|   2 +-
 .../patches-4.9/810-iommu-support-layerscape.patch |   8 +-
 .../816-tty-serial-support-layerscape.patch|  10 +-
 .../patches-4.9/817-usb-support-layerscape.patch   |  32 +-
 .../100-powerpc-85xx-tl-wdr4900-v1-support.patch   |   4 +-
 .../sunxi/patches-4.9/0050-stmmac-form-4-10.patch  | 120 +++---
 .../sunxi/patches-4.9/0051-stmmac-form-4-11.patch  |  36 +-
 .../sunxi/patches-4.9/0052-stmmac-form-4-12.patch  | 468 ++---
 .../sunxi/patches-4.9/0053-stmmac-form-4-13.patch  |  16 +-
 36 files changed, 400 insertions(+), 642 deletions(-)
 delete mode 100644 
target/linux/ar71xx/patches-4.9/106-01-MIPS-ath79-fix-AR724X_PLL_REG_PCIE_CONFIG-offset.patch
 delete mode 100644 
target/linux/generic/backport-4.9/095-v4.12-ipv6-Need-to-export-ipv6_push_frag_opts-for-tunnelin.patch
 delete mode 100644 
target/linux/generic/pending-4.9/180-net-phy-at803x-add-support-for-AT8032.patch
 delete mode 100644 
target/linux/generic/pending-4.9/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch
 delete mode 100644 
target/linux/generic/pending-4.9/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 2c6adc8ab0..877fa880f5 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -4,12 +4,12 @@ LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .71
 LINUX_VERSION-4.4 = .121
-LINUX_VERSION-4.9 = .102
+LINUX_VERSION-4.9 = .105
 LINUX_VERSION-4.14 = .44
 
 LINUX_KERNEL_HASH-3.18.71 = 
5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
 LINUX_KERNEL_HASH-4.4.121 = 
44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
-LINUX_KERNEL_HASH-4.9.102 = 
d155a36ba52d5809805cd370902582ac373c5b23a958c6424325684447119dc5
+LINUX_KERNEL_HASH-4.9.105 = 
d085d228e3ac1fdbdf5a31bb8154e4e8a0943a9085f0384842601db8e9d96dc4
 LINUX_KERNEL_HASH-4.14.44 = 
2eb356e6af25f6ca65affe7704be8c4e0cdf224505e7441ac9d5b6e8d96ec8e4
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1
diff --git 
a/target/linux/ar71xx/patches-4.9/106-01-MIPS-ath79-fix-AR724X_PLL_REG_PCIE_CONFIG-offset.patch
 
b/target/linux/ar71xx/patches-4.9/106-01-MIPS-ath79-fix-AR724X_PLL_REG_PCIE_CONFIG-offset.patch
deleted file mode 100644
index e785b30eff..00
--- 
a/target/linux/ar71xx/patches-4.9/106-01-MIPS-ath79-fix-AR724X_PLL_REG_PCIE_CONFIG-offset.patch
+++ /dev/null
@@ -1,29

[OpenWrt-Devel] [PATCH] nettle: bump to 3.4

2018-05-30 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
3.4 is mainly a bug fix/maintenance release.

3KB increase in ipk lib size on mips.

Compile tested for: ar71xx, ramips
Run tested on: ar71xx Archer C7 v2, ramips mir3g

Signed-off-by: Kevin Darbyshire-Bryant 
---
 package/libs/nettle/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libs/nettle/Makefile b/package/libs/nettle/Makefile
index 172b5b2563..67889d079b 100644
--- a/package/libs/nettle/Makefile
+++ b/package/libs/nettle/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nettle
-PKG_VERSION:=3.3
+PKG_VERSION:=3.4
 PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/nettle
-PKG_HASH:=46942627d5d0ca11720fec18d81fc38f7ef837ea4197c1f630e71ce0d470b11e
+PKG_HASH:=ae7a42df026550b85daca8389b6a60ba6313b0567f374392e54918588a411e94
 
 PKG_LICENSE:=GPL-2.0+
 PKG_LICENSE_FILES:=COPYING
-- 
2.15.1 (Apple Git-101)


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


Re: [OpenWrt-Devel] [PATCH 0/4 RFCv2] Realtek SMI RTL836x DSA driver

2018-05-29 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---


> On 29 May 2018, at 19:41, Linus Walleij  wrote:
> 
> On Tue, May 29, 2018 at 2:24 PM, Andrew Lunn  wrote:
> 
>> Did you look at the switch end? I found a datasheet for the
>> 8366/8369. Register at 0x0050, P8GCR. It has two bits for RGMII
>> delays.
> 
> Unfortunately this datasheet is not applicable to RTL8366RB.
> 
> RTL documentation and model numbers are a complete mess
> around the time when this chip came out, unfortunately... I even
> started to implement using that datasheet and had to toss a bunch
> of stuff away.
> 
> There might not even be a proper datasheet for RTL8366RB,
> I'm afraid. The best we have is different (3 different AFAICT)
> vendor code drops. Here is one drop over at DD-WRT:
> https://svn.dd-wrt.com//browser/src/linux/universal/linux-3.2/drivers/net/ethernet/raeth/rb
> 
> As you can see, the RTL8366RB vendor driver consists of
> a hacked version of their RTL8368S driver, so apparently those
> two ASICs are similar, they even kept the same filenames.
> 
> For example the register defintions:
> https://svn.dd-wrt.com/browser/src/linux/universal/linux-3.2/drivers/net/ethernet/raeth/rb/rtl8368s_reg.h
> 
>> With RGMII delays, you have 3 'choices'.
>> 
>> 1) The hardware design includes the delay, by zig-zagging the clock
>> line to make it longer.
>> 2) The 'MAC' side does the delay.
>> 3) The 'PHY' side does the delay.
>> 
>> I normally recommend the PHY side doing it, because that's what most
>> board do. Gives us some consistency. But it does not really
>> matter. Just make sure one side, and only once side is inserting the
>> delays.
> 
> Makes sense! But I haven't found anything applicable in the
> RTL8366RB registers.
> 
> There are some jam tables with magic values written all over
> the place that have no documentation, I fear this is one of the
> settings poked around with there.
> 
> However, even if this router did not come with any code for
> the RTL8366RB driver, I disassembled the binary to verify
> that they use the same magic jam table, so the ASIC is
> initialized in the same way.
> 
> Yours,
> Linus Walleij
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/listinfo/openwrt-devel

Oh lordy, that horrible device as exhibited in the netgear DGN3500.  Talk about 
magic values 
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=42120bd7f323ff7170b32a5fd4674babd8b184bc

Cheers,

Kevin D-B

012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A



signature.asc
Description: Message signed with OpenPGP
--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] FS#1567 reported: making openrwrt unusable (BT Home Hub 5) since between r6080 and r7050

2018-05-29 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---


> On 29 May 2018, at 08:57, David Woodhouse  wrote:
> 
> On Mon, 2018-05-28 at 14:08 +0000, Kevin Darbyshire-Bryant via openwrt-
> devel wrote:
>> 
>> I have a local-ish ‘tame’ ISP (AAISP) who might let me visit the
>> office and try a test line there… but I’d have to book & arrange it.
>> 
>> Or I could get a second line installed at home for £130+ for a
>> month.   H.  Would be good to have a UK based tester of
>> ADSL/BT/Openwrt compatibility.
> 
> I used to, but I've also upgraded to VDSL.
> 
> I note that the bug at
> https://bugs.openwrt.org/index.php?do=details_id=1567 even
> *mentions* that it looks similar in some ways to FS#1247... but doesn't
> include the PPP debug information requested in the latter. Mauro?
> 
> And is it just PPPoA, or also PPPoEoA (i.e. BR2684)?

In 24 hours I’ll hit the go button on £130 to get a 2nd line installed here at 
home with ADSL on BT’s network using AAISP.  That way I can be sat in front of 
a HH5a (with serial access if it really comes to that) and hopefully answer any 
questions that are flung my way.

Anyone who has a better alternative has until 14:00 GMT Wednesday 30th May to 
stop me.

Cheers,

Kevin D-B

012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A



signature.asc
Description: Message signed with OpenPGP
--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/2] curl: Use ca-bundle for all TLS libraries.

2018-05-28 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---


> On 27 May 2018, at 23:13, Rosen Penev  wrote:
> 
> It simplifies the Makefile a bit. In addition, using ca-bundle
> saves some space as well.
> 
> It also fixes an issue with at least transmission, which has a dependency
> on ca-bundle, but currently libcurl with OpenSSL or GnuTLS cause it not
> to work.
> 
> This has been tested on mt7621 with OpenSSL and GnuTLS just by running
> 'curl https://www.google.com' and seeing if there's a verify error.
> The rest are already using ca-bundle and therefore work fine.
> 
> Signed-off-by: Rosen Penev 
> ---
> package/network/utils/curl/Makefile | 10 ++
> 1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/package/network/utils/curl/Makefile 
> b/package/network/utils/curl/Makefile
> index 92b3cab7dd..ae8cc31edc 100644
> --- a/package/network/utils/curl/Makefile
> +++ b/package/network/utils/curl/Makefile
> @@ -112,13 +112,15 @@ CONFIGURE_ARGS += \
>   --without-libmetalink \
>   --without-librtmp \
>   --without-libidn \
> + --without-ca-path \
> + --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \
>   \
>   $(call autoconf_bool,CONFIG_IPV6,ipv6) \
>   \
> - $(if $(CONFIG_LIBCURL_WOLFSSL),--with-cyassl="$(STAGING_DIR)/usr" 
> --without-ca-path 
> --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt,--without-cyassl) \
> - $(if $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr" 
> --without-ca-bundle --with-ca-path=/etc/ssl/certs,--without-gnutls) \
> - $(if $(CONFIG_LIBCURL_OPENSSL),--with-ssl="$(STAGING_DIR)/usr" 
> --without-ca-bundle --with-ca-path=/etc/ssl/certs,--without-ssl) \
> - $(if $(CONFIG_LIBCURL_MBEDTLS),--with-mbedtls="$(STAGING_DIR)/usr" 
> --without-ca-path 
> --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt,--without-mbedtls) \
> + $(if 
> $(CONFIG_LIBCURL_WOLFSSL),--with-cyassl="$(STAGING_DIR)/usr",--without-cyassl)
>  \
> + $(if 
> $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr",--without-gnutls) 
> \
> + $(if 
> $(CONFIG_LIBCURL_OPENSSL),--with-ssl="$(STAGING_DIR)/usr",--without-ssl) \
> + $(if 
> $(CONFIG_LIBCURL_MBEDTLS),--with-mbedtls="$(STAGING_DIR)/usr",--without-mbedtls)
>  \
>   \
>   $(if 
> $(CONFIG_LIBCURL_LIBIDN2),--with-libidn2="$(STAGING_DIR)/usr",--without-libidn2)
>  \
>   $(if 
> $(CONFIG_LIBCURL_SSH2),--with-libssh2="$(STAGING_DIR)/usr",--without-libssh2) 
> \
> --
> 2.17.0
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> http://lists.infradead.org/mailman/listinfo/openwrt-devel


Works for me and has solved a long annoying issue of needing both ca-bundle & 
ca-certs installed (ddns-scripts v znc), hence taking twice the space in rom.

Tested-by: Kevin Darbyshire-Bryant 


Cheers,

Kevin D-B

012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A



signature.asc
Description: Message signed with OpenPGP
--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] FS#1567 reported: making openrwrt unusable (BT Home Hub 5) since between r6080 and r7050

2018-05-28 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---


> On 28 May 2018, at 14:52, Mauro Mozzarelli  wrote:
> 
> Neither it is to post an arrogant reply which is the only type of reply I get 
> usually from Jo-Philipp as this isn't the first time. You reap what you seed 
> guys.

Oh dear.

This is somewhat frustrating for me as I have a HH5a but no ADSL line to test 
it on.  The mention of VCI/VPI 0.38 suggests this is UK, where I also am.  The 
VDSL line (SKY isp) I have won’t do ADSL and hence PPPoA for testing.

I have a local-ish ‘tame’ ISP (AAISP) who might let me visit the office and try 
a test line there… but I’d have to book & arrange it.

Or I could get a second line installed at home for £130+ for a month.   H.  
Would be good to have a UK based tester of ADSL/BT/Openwrt compatibility.

Cheers,

Kevin D-B

012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A



signature.asc
Description: Message signed with OpenPGP
--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] kmod-sched-cake: RFC latest cake

2018-05-22 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
This bumps to the latest & possibly greatest cake support for tc.
It's not without problems, the netlink api is used to transfer data
between userspace (tc) and kernel space (sch_cake kmod) and we've
started sending 64bit values across it.

For reasons we don't understand, this is fine on some platforms and not
so good on others. e.g. tc -s qdisc show dev net_device_running_cake
won't return all the tin stats on some archs (MIPS r32 BE).

Assistance required!  Bug in openwrt?  Bug in our code?  Endian issue?

Signed-off-by: Kevin Darbyshire-Bryant <l...@darbyshire-bryant.me.uk>
---
 package/kernel/kmod-sched-cake/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/kmod-sched-cake/Makefile 
b/package/kernel/kmod-sched-cake/Makefile
index ad49bdaa19..6a20c4bc55 100644
--- a/package/kernel/kmod-sched-cake/Makefile
+++ b/package/kernel/kmod-sched-cake/Makefile
@@ -13,9 +13,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/dtaht/sch_cake.git
-PKG_SOURCE_DATE:=2018-05-15
-PKG_SOURCE_VERSION:=779e91a91e803cf2b95a6a46de721d3a4fd4dfe6
-PKG_MIRROR_HASH:=2bd1e9aee6d53a2a140ad5ece6d8eeccbfb8ae8c788e84f9dd946e29abb64010
+PKG_SOURCE_DATE:=2018-05-22
+PKG_SOURCE_VERSION:=f65daf6756826c9a4a11dac2d98b68c152e9619d
+PKG_MIRROR_HASH:=c68368923e7ba29f86aec992a19e8831af0915f578c23196bba3a3ffb9d77b1e
 PKG_MAINTAINER:=Kevin Darbyshire-Bryant <l...@darbyshire-bryant.me.uk>
 
 include $(INCLUDE_DIR)/package.mk
-- 
2.15.1 (Apple Git-101)


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


[OpenWrt-Devel] [PATCH 1/2] iproute2: RFC update cake support

2018-05-22 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
This bumps to the latest & possibly greatest cake support for tc.
It's not without problems, the netlink api is used to transfer data
between userspace (tc) and kernel space (sch_cake kmod) and we've
started sending 64bit values across it.

For reasons we don't understand, this is fine on some platforms and not
so good on others. e.g. tc -s qdisc show dev net_device_running_cake
won't return all the tin stats on some archs (MIPS r32 BE).

Assistance required!  Bug in openwrt?  Bug in our code?  Endian issue?

Signed-off-by: Kevin Darbyshire-Bryant <l...@darbyshire-bryant.me.uk>
---
 .../iproute2/patches/950-add-cake-to-tc.patch  | 111 +++--
 1 file changed, 83 insertions(+), 28 deletions(-)

diff --git a/package/network/utils/iproute2/patches/950-add-cake-to-tc.patch 
b/package/network/utils/iproute2/patches/950-add-cake-to-tc.patch
index 3c2cdaaac3..f453af9d2e 100644
--- a/package/network/utils/iproute2/patches/950-add-cake-to-tc.patch
+++ b/package/network/utils/iproute2/patches/950-add-cake-to-tc.patch
@@ -1,13 +1,14 @@
 --- a/include/uapi/linux/pkt_sched.h
 +++ b/include/uapi/linux/pkt_sched.h
-@@ -934,4 +934,110 @@ enum {
+@@ -934,4 +934,118 @@ enum {
  
  #define TCA_CBS_MAX (__TCA_CBS_MAX - 1)
  
 +/* CAKE */
 +enum {
 +  TCA_CAKE_UNSPEC,
-+  TCA_CAKE_BASE_RATE,
++  TCA_CAKE_PAD,
++  TCA_CAKE_BASE_RATE64,
 +  TCA_CAKE_DIFFSERV_MODE,
 +  TCA_CAKE_ATM,
 +  TCA_CAKE_FLOW_MODE,
@@ -29,7 +30,8 @@
 +
 +enum {
 +  __TCA_CAKE_STATS_INVALID,
-+  TCA_CAKE_STATS_CAPACITY_ESTIMATE,
++  TCA_CAKE_STATS_PAD,
++  TCA_CAKE_STATS_CAPACITY_ESTIMATE64,
 +  TCA_CAKE_STATS_MEMORY_LIMIT,
 +  TCA_CAKE_STATS_MEMORY_USED,
 +  TCA_CAKE_STATS_AVG_NETOFF,
@@ -38,6 +40,12 @@
 +  TCA_CAKE_STATS_MIN_ADJLEN,
 +  TCA_CAKE_STATS_MAX_ADJLEN,
 +  TCA_CAKE_STATS_TIN_STATS,
++  TCA_CAKE_STATS_DEFICIT,
++  TCA_CAKE_STATS_COBALT_COUNT,
++  TCA_CAKE_STATS_DROPPING,
++  TCA_CAKE_STATS_DROP_NEXT_US,
++  TCA_CAKE_STATS_P_DROP,
++  TCA_CAKE_STATS_BLUE_TIMER_US,
 +  __TCA_CAKE_STATS_MAX
 +};
 +#define TCA_CAKE_STATS_MAX (__TCA_CAKE_STATS_MAX - 1)
@@ -54,8 +62,8 @@
 +  TCA_CAKE_TIN_STATS_ECN_MARKED_PACKETS,
 +  TCA_CAKE_TIN_STATS_ECN_MARKED_BYTES64,
 +  TCA_CAKE_TIN_STATS_BACKLOG_PACKETS,
-+  TCA_CAKE_TIN_STATS_BACKLOG_BYTES64,
-+  TCA_CAKE_TIN_STATS_THRESHOLD_RATE,
++  TCA_CAKE_TIN_STATS_BACKLOG_BYTES,
++  TCA_CAKE_TIN_STATS_THRESHOLD_RATE64,
 +  TCA_CAKE_TIN_STATS_TARGET_US,
 +  TCA_CAKE_TIN_STATS_INTERVAL_US,
 +  TCA_CAKE_TIN_STATS_WAY_INDIRECT_HITS,
@@ -758,7 +766,7 @@
  TCMODULES += q_hhf.o
 --- /dev/null
 +++ b/tc/q_cake.c
-@@ -0,0 +1,749 @@
+@@ -0,0 +1,796 @@
 +/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
 +/*
 + * Common Applications Kept Enhanced  --  CAKE
@@ -831,7 +839,7 @@
 +struct nlmsghdr *n, const char *dev)
 +{
 +  int unlimited = 0;
-+  unsigned bandwidth = 0;
++  __u64 bandwidth = 0;
 +  unsigned interval = 0;
 +  unsigned target = 0;
 +  unsigned diffserv = 0;
@@ -853,7 +861,7 @@
 +  while (argc > 0) {
 +  if (strcmp(*argv, "bandwidth") == 0) {
 +  NEXT_ARG();
-+  if (get_rate(, *argv)) {
++  if (get_rate64(, *argv)) {
 +  fprintf(stderr, "Illegal \"bandwidth\"\n");
 +  return -1;
 +  }
@@ -1088,7 +1096,7 @@
 +  tail = NLMSG_TAIL(n);
 +  addattr_l(n, 1024, TCA_OPTIONS, NULL, 0);
 +  if (bandwidth || unlimited)
-+  addattr_l(n, 1024, TCA_CAKE_BASE_RATE, , 
sizeof(bandwidth));
++  addattr_l(n, 1024, TCA_CAKE_BASE_RATE64, , 
sizeof(bandwidth));
 +  if (diffserv)
 +  addattr_l(n, 1024, TCA_CAKE_DIFFSERV_MODE, , 
sizeof(diffserv));
 +  if (atm != -1)
@@ -1128,7 +1136,7 @@
 +static int cake_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
 +{
 +  struct rtattr *tb[TCA_CAKE_MAX + 1];
-+  unsigned bandwidth = 0;
++  __u64 bandwidth = 0;
 +  unsigned diffserv = 0;
 +  unsigned flowmode = 0;
 +  unsigned interval = 0;
@@ -1151,9 +1159,9 @@
 +
 +  parse_rtattr_nested(tb, TCA_CAKE_MAX, opt);
 +
-+  if (tb[TCA_CAKE_BASE_RATE] &&
-+  RTA_PAYLOAD(tb[TCA_CAKE_BASE_RATE]) >= sizeof(__u32)) {
-+  bandwidth = rta_getattr_u32(tb[TCA_CAKE_BASE_RATE]);
++  if (tb[TCA_CAKE_BASE_RATE64] &&
++  RTA_PAYLOAD(tb[TCA_CAKE_BASE_RATE64]) >= sizeof(bandwidth)) {
++  bandwidth = rta_getattr_u64(tb[TCA_CAKE_BASE_R

[OpenWrt-Devel] [PATCH 0/2] RFC bumps to latest cake

2018-05-22 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
This bumps to the latest & possibly greatest cake support for tc.
It's not without problems, the netlink api is used to transfer data
between userspace (tc) and kernel space (sch_cake kmod) and we've
started sending 64bit values across it.

For reasons we don't understand, this is fine on some platforms and not
so good on others. e.g. tc -s qdisc show dev net_device_running_cake
won't return all the tin stats on some archs (MIPS r32 BE).

Assistance required!  Bug in openwrt?  Bug in our code?  Endian issue?

Testing, reports, ideas, fixes especially welcome :-)

Kevin Darbyshire-Bryant (2):
  iproute2: RFC update cake support
  kmod-sched-cake: RFC latest cake

 package/kernel/kmod-sched-cake/Makefile|   6 +-
 .../iproute2/patches/950-add-cake-to-tc.patch  | 111 +++--
 2 files changed, 86 insertions(+), 31 deletions(-)

-- 
2.15.1 (Apple Git-101)


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


Re: [OpenWrt-Devel] [PATCH] download.pl: Add a space between the hash and the comma.

2018-05-20 Thread Kevin Darbyshire-Bryant


> On 19 May 2018, at 18:03, Rosen Penev  wrote:
> 
> Makes it easier to copy/paste the hash manually.
> 
> Signed-off-by: Rosen Penev 
> ---
> scripts/download.pl | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/download.pl b/scripts/download.pl
> index 34fd6a6f0b..4df0224bcc 100755
> --- a/scripts/download.pl
> +++ b/scripts/download.pl
> @@ -168,7 +168,7 @@ sub download
>   $sum = $1;
> 
>   if ($sum ne $file_hash) {
> - print STDERR "Hash of the downloaded file does not 
> match (file: $sum, requested: $file_hash) - deleting download.\n";
> + print STDERR "Hash of the downloaded file does not 
> match (file: $sum , requested: $file_hash) - deleting download.\n";
>   cleanup();
>   return;
>   }
> --
> 2.17.0
> 

I hate to bikeshed this - as the comma is now effectively being used as a 
separator instead of an English language pause, I think a separator character 
such as ‘/‘ would be preferable.

Also don’t forget, a sequence such as:

1) make package/foo/download PKG_HASH=skip
2) make package/foo/check FIXUP=1

will download your package source ignoring the hash and then update the 
Makefile’s stored HASH with calculated hash for the downloaded file, thus 
avoiding the need to get involved in cut’n’paste operations.

But I do agree the ‘,’ in its current location is a pain :-)

Kevin


signature.asc
Description: Message signed with OpenPGP
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] wireguard: no longer need portability patch

2018-05-17 Thread Kevin Darbyshire-Bryant
Drop package/network/services/wireguard/patches/100-portability.patch

Instead pass 'PLATFORM=linux' to make since we are always building FOR
linux.

Signed-off-by: Kevin Darbyshire-Bryant <l...@darbyshire-bryant.me.uk>
---

V2 - actually I don't need to bump the package version as this doesn't
really change anything in the binary sense

 package/network/services/wireguard/Makefile   |  1 +
 .../services/wireguard/patches/100-portability.patch  | 19 ---
 2 files changed, 1 insertion(+), 19 deletions(-)
 delete mode 100644 
package/network/services/wireguard/patches/100-portability.patch

diff --git a/package/network/services/wireguard/Makefile 
b/package/network/services/wireguard/Makefile
index 5ca7b7da57..770efe4948 100644
--- a/package/network/services/wireguard/Makefile
+++ b/package/network/services/wireguard/Makefile
@@ -60,6 +60,7 @@ include $(INCLUDE_DIR)/package-defaults.mk
 
 # Used by Build/Compile/Default
 MAKE_PATH:=src/tools
+MAKE_VARS += PLATFORM=linux
 
 define Build/Compile
$(MAKE) $(KERNEL_MAKEOPTS) M="$(PKG_BUILD_DIR)/src" modules
diff --git a/package/network/services/wireguard/patches/100-portability.patch 
b/package/network/services/wireguard/patches/100-portability.patch
deleted file mode 100644
index 33a7373cc7..00
--- a/package/network/services/wireguard/patches/100-portability.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-tools: fix portability issue
-
-Check if the compiler defines __linux__, instead of assuming that the
-host OS is the same as the target OS.
-
-Signed-off-by: Felix Fietkau <n...@nbd.name>

 a/src/tools/Makefile
-+++ b/src/tools/Makefile
-@@ -36,6 +36,9 @@ endif
- endif
- 
- PLATFORM ?= $(shell uname -s | tr '[:upper:]' '[:lower:]')
-+ifeq ($(strip $(shell echo __linux__ | $(CC) -E - | grep -v '^\#')),1)
-+PLATFORM := linux
-+endif
- 
- CFLAGS ?= -O3
- CFLAGS += -std=gnu11 -D_GNU_SOURCE
-- 
2.15.1 (Apple Git-101)


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


[OpenWrt-Devel] [PATCH] wireguard: no longer need portability patch

2018-05-17 Thread Kevin Darbyshire-Bryant
Drop package/network/services/wireguard/patches/100-portability.patch

Instead pass 'PLATFORM=linux' to make since we are always building FOR
linux.

Signed-off-by: Kevin Darbyshire-Bryant <l...@darbyshire-bryant.me.uk>
---
 package/network/services/wireguard/Makefile   |  3 ++-
 .../services/wireguard/patches/100-portability.patch  | 19 ---
 2 files changed, 2 insertions(+), 20 deletions(-)
 delete mode 100644 
package/network/services/wireguard/patches/100-portability.patch

diff --git a/package/network/services/wireguard/Makefile 
b/package/network/services/wireguard/Makefile
index 5ca7b7da57..08412f75db 100644
--- a/package/network/services/wireguard/Makefile
+++ b/package/network/services/wireguard/Makefile
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=wireguard
 
 PKG_VERSION:=0.0.20180514
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/
@@ -60,6 +60,7 @@ include $(INCLUDE_DIR)/package-defaults.mk
 
 # Used by Build/Compile/Default
 MAKE_PATH:=src/tools
+MAKE_VARS += PLATFORM=linux
 
 define Build/Compile
$(MAKE) $(KERNEL_MAKEOPTS) M="$(PKG_BUILD_DIR)/src" modules
diff --git a/package/network/services/wireguard/patches/100-portability.patch 
b/package/network/services/wireguard/patches/100-portability.patch
deleted file mode 100644
index 33a7373cc7..00
--- a/package/network/services/wireguard/patches/100-portability.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-tools: fix portability issue
-
-Check if the compiler defines __linux__, instead of assuming that the
-host OS is the same as the target OS.
-
-Signed-off-by: Felix Fietkau <n...@nbd.name>

 a/src/tools/Makefile
-+++ b/src/tools/Makefile
-@@ -36,6 +36,9 @@ endif
- endif
- 
- PLATFORM ?= $(shell uname -s | tr '[:upper:]' '[:lower:]')
-+ifeq ($(strip $(shell echo __linux__ | $(CC) -E - | grep -v '^\#')),1)
-+PLATFORM := linux
-+endif
- 
- CFLAGS ?= -O3
- CFLAGS += -std=gnu11 -D_GNU_SOURCE
-- 
2.15.1 (Apple Git-101)


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


Re: [OpenWrt-Devel] [PATCH v2 2/2] kernel: bump 4.14 to 4.14.41

2018-05-17 Thread Kevin Darbyshire-Bryant


> On 17 May 2018, at 21:48, Lev  wrote:
> 
> On Thu, 17 May 2018 18:41:26 +0200
> Koen Vandeputte  wrote:
> 
>> -@@ -115,10 +115,14 @@ static inline void ath79_wdt_disable(void)
>> +@@ -115,10 +115,14 @@ static inline void ath79_wdt_disable(voi
> 
> Is this really compiles?

No, but then it doesn’t need to.  This is a patch reference block, ie. a 
positional reference used by quilt.

Reading patches to patches is err, challenging :-)


Kevin


signature.asc
Description: Message signed with OpenPGP
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [LEDE-DEV] RFC netifd: UCI parameter to sort name servers in resolv.conf.auto

2016-09-05 Thread Kevin Darbyshire-Bryant



On 05/09/16 13:49, Hans Dedecker wrote:

On Mon, Sep 5, 2016 at 1:49 PM, Jo-Philipp Wich  wrote:

Hi Hans,

imho it would also make sense to take any existing metric setting into
account as well. At least I'd expect that if I have a wan1 with metric
10 and a wan2 with metric 20 that the DNS server entries "inherit" the
same weight/order.

So priority wise I'd first order by dns metric, then by interface
metric, then by name - does that make sense to you?

OK I see your point; if the dns metric is equal for the name servers
the interface metric
is used as extra sorting criteria.
I would definitely like to define a dns metric parameter as you don't
need to define an
interface metric if you make use of seperate routing tables.
On existing configs using interface metrics this could to a change in
behavior as the DNS
server order can be changed when upgrading; this is acceptable ?

Hans

The dnsmasq manpage has this to say about resolution order:

*-o, --strict-order*
   By default, dnsmasq will send queries to any of the upstream servers
   it knows about and tries to favour servers that are known to be up.
   Setting this flag forces dnsmasq to try each query with each server
   strictly in the order they appear in /etc/resolv.conf 
*--all-servers*

   By default, when dnsmasq has more than one upstream server
   available, it will send queries to just one server. Setting this
   flag forces dnsmasq to send all queries to all available servers.
   The reply from the server which answers first will be returned to
   the original requester. 

So unless you use '--strict-order' the order in resolv.conf.auto isn't 
going to make any/much difference.


Kevin



Regards,
Jo

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


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


Re: [OpenWrt-Devel] [LEDE-DEV] latency on PPPoA ADSL Annex A on using Lantiq

2016-08-05 Thread Kevin Darbyshire-Bryant
I can confirm this.  Have seen it myself on a DGN3500, reported at least
a month ago.  Router terminated traffic is slow, routed traffic to/from
internal lan is fine.  It's not bufferbloat.

On 04/08/16 16:20, Daniel Niasoff wrote:
> One more thing I forgot to mention is that router traffic is fine so if I 
> dnat to a host on the internal lan, performance is good.
> 
> So if it was bufferbloat it would affect all hosts
> 
> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On 
> Behalf Of Daniel Niasoff
> Sent: 04 August 2016 20:29
> To: Rich Brown 
> Cc: lede-...@lists.infradead.org; openwrt-devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [LEDE-DEV] latency on PPPoA ADSL Annex A on 
> using Lantiq
> 
> Hi Rich,
> 
> There is no traffic occurring when the latency is happening.
> 
> Also icmp requests do not have any latency and are consistently returning 
> with minimal latency.
> 
> It's only occurring in apps such as a ssh server. So whilst I was pinging and 
> getting good results, I ssh'd into the router and it was really sluggish, eg 
> to scroll down a 200 line file in vi is a nightmare.
> 
> So I guess this isn't bufferbloat?
> 
> Thanks
> 
> Daniel
> 
> -Original Message-
> From: Rich Brown [mailto:richb.hano...@gmail.com]
> Sent: 04 August 2016 20:20
> To: Daniel Niasoff 
> Cc: Donald Chisholm ; 
> lede-...@lists.infradead.org; openwrt-devel@lists.openwrt.org
> Subject: Re: [LEDE-DEV] [OpenWrt-Devel] latency on PPPoA ADSL Annex A on 
> using Lantiq
> 
> Hi Daniel,
> 
> (I feel like a one-trick pony here, but...) Could this be bufferbloat? Maybe 
> not, but here's how to test:
> 
> Use the procedure for "A Quick Test for Bufferbloat" at 
> https://www.bufferbloat.net/projects/cerowrt/wiki/Tests_for_Bufferbloat/#a-quick-test-for-bufferbloat
>  Watch to see if the ping times increase during download/uploads then drop 
> back down.
> 
> If the ping times do increase, consider installing luci-app-sqm as suggested 
> on 
> https://www.bufferbloat.net/projects/cerowrt/wiki/What_to_do_about_Bufferbloat/
> 
> Best regards,
> 
> Rich
> 
> 
>> On Aug 4, 2016, at 3:10 PM, Daniel Niasoff  wrote:
>>
>> Hi Donald,
>>
>> Thanks for responding
>>
>> The MTU seems fine.
>>
>> This is the WAN link
>>
>> pppoa-wan Link encap:Point-to-Point Protocol
>>  inet addr:2.25.173.155  P-t-P:172.16.11.136  Mask:255.255.255.255
>>  UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
>>  RX packets:94409 errors:0 dropped:0 overruns:0 frame:0
>>  TX packets:85742 errors:0 dropped:0 overruns:0 carrier:0
>>  collisions:0 txqueuelen:3
>>  RX bytes:75750172 (72.2 MiB)  TX bytes:14369708 (13.7 MiB)
>>
>> I sent a 1492 byte icmp request externally which got through.
>>
>> root@ubuntu:~# ping -s 1464 2.25.173.155 PING 2.25.173.155
>> (2.25.173.155) 1464(1492) bytes of data.
>> 1472 bytes from 2.25.173.155: icmp_seq=1 ttl=57 time=49.4 ms ^C
>> --- 2.25.173.155 ping statistics ---
>> 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt 
>> min/avg/max/mdev = 49.439/49.439/49.439/0.000 ms
>>
>> So MTU looks fine.
>>
>> Thanks
>>
>> Daniel
>>
>> From: Donald Chisholm [mailto:donald.chish...@gmail.com]
>> Sent: 04 August 2016 19:41
>> To: Daniel Niasoff 
>> Subject: Re: [OpenWrt-Devel] latency on PPPoA ADSL Annex A on using 
>> Lantiq
>>
>> Hi Daniel,
>>
>> I just saw your message on the LEDE mailing list.  The freezing and catching 
>> up sounds like a MTU problem.  Could there be a MTU mismatch on the ADSL 
>> interface (1500 <->1492)?
>>
>> Donald
>>
>> On Thu, Aug 4, 2016 at 6:47 AM, Daniel Niasoff 
>>  wrote:
>> Hi,
>>
>> I am quite desperate because I have a project going with these routers and I 
>> am running really late.
>>
>> Can anyone spare some time to help me, I am willing to pay an hourly rate 
>> for the time if it will help.
>>
>> This issue only occurs on ADSL. On VDSL performance is really good even 
>> using PPPoE.
>>
>> The issue is a sluggish access to the CPU interface via ADSL, so for example 
>> if you are typing in a SSH client, it will keep freezing for a second or 
>> two, than catch up.
>>
>> Routed traffic is fine.
>>
>> Thanks
>>
>> Daniel
>>
>> -Original Message-
>> From: Martin Blumenstingl
>> [mailto:mailto:martin.blumensti...@googlemail.com]
>> Sent: 03 August 2016 08:03
>> To: Alexander Couzens 
>> Cc: Daniel Niasoff ; 
>> mailto:openwrt-devel@lists.openwrt.org;
>> mailto:lede-...@lists.infradead.org; mailto:ha...@hauke-m.de; 
>> mailto:j...@phrozen.org
>> Subject: Re: [OpenWrt-Devel] latency on PPPoA ADSL Annex A on using 
>> Lantiq
>>
>> On Tue, Aug 2, 2016 at 6:10 PM, Alexander Couzens  
>> wrote:
>>> On Tue, 2 Aug 2016 13:38:55 +
>>> 

[OpenWrt-Devel] [PATCH] routing: miniupnpd: update to v2.0

2016-05-29 Thread Kevin Darbyshire-Bryant
Update miniupnpd to v2.0  Refresh patches

Signed-off-by: Kevin Darbyshire-Bryant <ke...@darbyshire-bryant.me.uk>
---
 miniupnpd/Makefile| 4 ++--
 miniupnpd/patches/100-no-ssl.patch| 6 +++---
 miniupnpd/patches/102-ipv6-ext-port.patch | 2 +-
 miniupnpd/patches/103-no-ipv6-autodetection.patch | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/miniupnpd/Makefile b/miniupnpd/Makefile
index 1000929..0207036 100644
--- a/miniupnpd/Makefile
+++ b/miniupnpd/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=miniupnpd
-PKG_VERSION:=1.9.20151212
+PKG_VERSION:=2.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://miniupnp.free.fr/files
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=86465b35f711ca9982d48b34c094033a
+PKG_MD5SUM:=1c07a215dd9b362e75a9efc05e2fb3b4
 
 PKG_MAINTAINER:=Markus Stenberg <fin...@iki.fi>
 PKG_LICENSE:=BSD-3-Clause
diff --git a/miniupnpd/patches/100-no-ssl.patch 
b/miniupnpd/patches/100-no-ssl.patch
index 343e615..5caafc2 100644
--- a/miniupnpd/patches/100-no-ssl.patch
+++ b/miniupnpd/patches/100-no-ssl.patch
@@ -1,6 +1,6 @@
 --- a/Makefile.linux
 +++ b/Makefile.linux
-@@ -147,7 +147,8 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
+@@ -153,7 +153,8 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
  LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libnetfilter_conntrack)
  endif # ($(TEST),1)
  
@@ -8,5 +8,5 @@
 +# n/a - we don't enable https server for IGD v2 anyway
 +#LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)
  
- TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
- 
+ TEST := $(shell $(PKG_CONFIG) --exists uuid && echo 1)
+ ifeq ($(TEST),1)
diff --git a/miniupnpd/patches/102-ipv6-ext-port.patch 
b/miniupnpd/patches/102-ipv6-ext-port.patch
index fdb2af4..806c7fd 100644
--- a/miniupnpd/patches/102-ipv6-ext-port.patch
+++ b/miniupnpd/patches/102-ipv6-ext-port.patch
@@ -1,6 +1,6 @@
 --- a/pcpserver.c
 +++ b/pcpserver.c
-@@ -1004,6 +1004,7 @@ static int CreatePCPMap_NAT(pcp_info_t *
+@@ -982,6 +982,7 @@ static int CreatePCPMap_NAT(pcp_info_t *
   timestamp);
if (r < 0)
return PCP_ERR_NO_RESOURCES;
diff --git a/miniupnpd/patches/103-no-ipv6-autodetection.patch 
b/miniupnpd/patches/103-no-ipv6-autodetection.patch
index 61c023a..50d5a39 100644
--- a/miniupnpd/patches/103-no-ipv6-autodetection.patch
+++ b/miniupnpd/patches/103-no-ipv6-autodetection.patch
@@ -17,7 +17,7 @@ As the OpenWRT buildsystem already passes the right compile 
flags, we can skip t
  #testiptpinhole
 --- a/Makefile.linux
 +++ b/Makefile.linux
-@@ -70,7 +70,6 @@ CPPFLAGS += -DIPTABLES_143
+@@ -73,7 +73,6 @@ CPPFLAGS += -DIPTABLES_143
  endif
  
  CFLAGS  += $(shell $(PKG_CONFIG) --cflags libiptc)
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


  1   2   >