[OpenWrt-Devel] [PATCH] ath79: fix wmac memory region for qca953x

2019-02-18 Thread Chuanhong Guo
According to /arch/mips/include/asm/mach-ath79/ar71xx_regs.h
the size of wmac register range for qca953x is only 0x2.

Signed-off-by: Chuanhong Guo 
---
 target/linux/ath79/dts/qca953x.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ath79/dts/qca953x.dtsi 
b/target/linux/ath79/dts/qca953x.dtsi
index 4ce5bfe0a2..669e3fb851 100644
--- a/target/linux/ath79/dts/qca953x.dtsi
+++ b/target/linux/ath79/dts/qca953x.dtsi
@@ -173,7 +173,7 @@
 
wmac: wmac@1810 {
compatible = "qca,qca9530-wmac";
-   reg = <0x1810 0x23>;
+   reg = <0x1810 0x2>;
 
interrupt-parent = <&intc2>;
interrupts = <0>;
-- 
2.20.1


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


[OpenWrt-Devel] [PATCH v2 2/3] uboot-fritz4040: bump version to 2019-02-08

2019-02-18 Thread David Bauer
Adds support for the AVM FRITZ!Box 7530.

Signed-off-by: David Bauer 
---
 package/boot/uboot-fritz4040/Makefile | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/package/boot/uboot-fritz4040/Makefile 
b/package/boot/uboot-fritz4040/Makefile
index df00b89af0..45f211527d 100644
--- a/package/boot/uboot-fritz4040/Makefile
+++ b/package/boot/uboot-fritz4040/Makefile
@@ -10,22 +10,23 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_SOURCE_URL:=https://github.com/chunkeey/FritzBox-4040-UBOOT
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=a768e513b07b5999a8e7d7740ac8d9da04ee7e51
-PKG_SOURCE_DATE:=2019-01-25
-PKG_MIRROR_HASH:=eb552c946bcad53763557b19703b10210f7acabf0d135759beddb7b11fa4ef25
+PKG_SOURCE_VERSION:=d306cce36f98a0a67becc42f20df4b22f1d1465f
+PKG_SOURCE_DATE:=2019-02-08
+PKG_MIRROR_HASH:=715380605dd0cd6ffd65a18b34127bd57dfe9fb0a0164bf8aca703ee018d8070
 
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 include $(INCLUDE_DIR)/u-boot.mk
 include $(INCLUDE_DIR)/package.mk
 
 define U-Boot/Default
   BUILD_TARGET:=ipq40xx
+  UBOOT_BOARD:=$(1)
+  UBOOT_IMAGE:=uboot-$(1).bin
 endef
 
 define U-Boot/fritz4040
   NAME:=FritzBox 4040
-  UBOOT_IMAGE:=uboot-fritz4040.bin
   BUILD_DEVICES:=avm_fritzbox-4040
 endef
 
@@ -42,7 +43,7 @@ endef
 
 define Build/Compile
$(Build/Compile/U-Boot)
-   (cd $(PKG_BUILD_DIR); ./fritz/fritzcreator.sh;)
+   (cd $(PKG_BUILD_DIR); ./fritz/fritzcreator.sh $(UBOOT_BOARD);)
 endef
 
 define Build/InstallDev
-- 
2.20.1


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


[OpenWrt-Devel] [PATCH v2 3/3] ipq40xx: add support for FritzBox 7530

2019-02-18 Thread David Bauer
Hardware

CPU:   Qualcomm IPQ4019
RAM:   256M
FLASH: 128M NAND
ETH:   QCA8075
VDSL:  Intel/Lantiq VRX518 PCIe attached
   currently not supported
DECT:  Dialog SC14448
   currently not supported
WiFi2: IPQ4019 2T2R 2SS b/g/n
WiFi5: IPQ4019 2T2R 2SS n/ac
LED:- Power/DSL green
- WLAN green
- FON/DECT green
- Connect/WPS green
- Info green
- Info red
BTN:- WLAN
- FON
- WPS/Connect
UART:  115200n8 3.3V (located under the Dialog chip)
   VCC - RX - TX - GND (Square is VCC)

Installation

1. Grab the uboot for the Device from the 'u-boot-fritz7530'
   subdirectory. Place it in the same directory as the 'eva_ramboot.py'
   script. It is located in the 'scripts/flashing' subdirectory of the
   OpenWRT tree.

2. Assign yourself the IP address 192.168.178.10/24. Connect your
   Computer to one of the boxes LAN ports.

3. Connect Power to the Box. As soon as the LAN port of your computer
   shows link, load the U-Boot to the box using following command.

   > ./eva_ramboot.py --offset 0x8500 192.168.178.1 uboot-fritz7530.bin

4. The U-Boot will now start. Now assign yourself the IP address
   192.168.1.70/24. Copy the OpenWRT initramfs (!) image to a TFTP
   server root directory and rename it to 'FRITZ7530.bin'.

5. The Box will now boot OpenWRT from RAM. This can take up to two
   minutes.

6. Copy the U-Boot and the OpenWRT sysupgrade (!) image to the Box using
   scp. SSH into the Box and first write the Bootloader to both previous
   kernel partitions.

   > mtd write /path/to/uboot-fritz7530.bin uboot0
   > mtd write /path/to/uboot-fritz7530.bin uboot1

7. Remove the AVM filesystem partitions to make room for our kernel +
   rootfs + overlayfs.

   > ubirmvol /dev/ubi0 --name=avm_filesys_0
   > ubirmvol /dev/ubi0 --name=avm_filesys_1

8. Flash OpenWRT peristently using sysupgrade.

   > sysupgrade -n /path/to/openwrt-sysupgrade.bin

Signed-off-by: David Bauer 
---
v2:
 - add PCIe subnode so VRX518 is detected on the PCIe bus
   - driver is still missing
 - add fallback onto uboot1 partition for the caldata
 - adjust caldata size so no padding is extracted
 - reordered 01_leds
 - remove gpio52 from nand pinmux
 - fixed wrong label on SBL1 partition
 - drop 'qcom,ipq4019' compatible

 package/boot/uboot-fritz4040/Makefile |   7 +-
 package/firmware/ipq-wifi/Makefile|   3 +-
 package/firmware/ipq-wifi/board-fritz7530.bin | Bin 0 -> 24324 bytes
 .../ipq40xx/base-files/etc/board.d/01_leds|   7 +-
 .../ipq40xx/base-files/etc/board.d/02_network |   4 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata  |   8 +
 .../base-files/lib/upgrade/platform.sh|   3 +-
 .../boot/dts/qcom-ipq4019-fritzbox-7530.dts   | 305 +
 .../boot/dts/qcom-ipq4019-fritzbox-7530.dts   | 309 ++
 target/linux/ipq40xx/image/Makefile   |   9 +
 .../901-arm-boot-add-dts-files.patch  |   3 +-
 .../901-arm-boot-add-dts-files.patch  |   3 +-
 12 files changed, 653 insertions(+), 8 deletions(-)
 create mode 100644 package/firmware/ipq-wifi/board-fritz7530.bin
 create mode 100644 
target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts
 create mode 100644 
target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts

diff --git a/package/boot/uboot-fritz4040/Makefile 
b/package/boot/uboot-fritz4040/Makefile
index 45f211527d..a53b7d010f 100644
--- a/package/boot/uboot-fritz4040/Makefile
+++ b/package/boot/uboot-fritz4040/Makefile
@@ -30,6 +30,11 @@ define U-Boot/fritz4040
   BUILD_DEVICES:=avm_fritzbox-4040
 endef
 
+define U-Boot/fritz7530
+  NAME:=FritzBox 7530
+  BUILD_DEVICES:=avm_fritzbox-7530
+endef
+
 UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
 UBOOT_MAKE_FLAGS = USE_PRIVATE_LIBGCC=yes
 export DTC
@@ -56,6 +61,6 @@ define Package/u-boot/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/upload-to-f4040.sh $(1)/
 endef
 
-UBOOT_TARGETS := fritz4040
+UBOOT_TARGETS := fritz4040 fritz7530
 
 $(eval $(call BuildPackage/U-Boot))
diff --git a/package/firmware/ipq-wifi/Makefile 
b/package/firmware/ipq-wifi/Makefile
index 7c9def8967..695d2f4429 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -17,7 +17,7 @@ endef
 # Please send a mail with your device-specific board files upstream.
 # You can find instructions and examples on the linux-wireless wiki:
 # 
-ALLWIFIBOARDS:=asus_map-ac2200 engenius_eap1300 linksys_ea6350v3
+ALLWIFIBOARDS:=asus_map-ac2200 engenius_eap1300 fritz7530 linksys_ea6350v3
 ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))
 
 define Package/ipq-wifi-default
@@ -54,6 +54,7 @@ endef
 #$(eval $(call 
generate-ipq-wifi-package,,,))
 $(eval $(call 
generate-ipq-wifi-package,asus_map-ac2200,board-map-ac2200.bin,ASUS MAP-AC2200))
 $(eval $(call 
generate-ipq-wifi-package,engenius_eap1300,bo

[OpenWrt-Devel] [PATCH v2 1/3] scripts: make eva_ramboot.py offset configurable

2019-02-18 Thread David Bauer
The current eva_ramboot.py script is currently only compatible with
Lantiq based AVM devices. For IPQ40xx devices, the offset needs to be
changed. Also an alignment is not necessary here.

Adjust the script to be able to pass an optional offset to load the
image to. In case no offset is provided, the script behaves exactly as
before this commit.

Signed-off-by: David Bauer 
---
 scripts/flashing/eva_ramboot.py | 30 +++---
 1 file changed, 19 insertions(+), 11 deletions(-)

diff --git a/scripts/flashing/eva_ramboot.py b/scripts/flashing/eva_ramboot.py
index b825d2768b..b182f09d21 100755
--- a/scripts/flashing/eva_ramboot.py
+++ b/scripts/flashing/eva_ramboot.py
@@ -1,24 +1,32 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
+
+import argparse
 
 from ftplib import FTP
 from sys import argv
 from os import stat
 
-assert len(argv) == 3
-ip = argv[1]
-image = argv[2]
+parser = argparse.ArgumentParser(description='Tool to boot AVM EVA ramdisk 
images.')
+parser.add_argument('ip', type=str, help='IP-address to transfer the image to')
+parser.add_argument('image', type=str, help='Location of the ramdisk image')
+parser.add_argument('--offset', type=lambda x: int(x,0), help='Offset to load 
the image to in hex format with leading 0x. Only needed for non-lantiq 
devices.')
+args = parser.parse_args()
 
-size = stat(image).st_size
+size = stat(args.image).st_size
 # arbitrary size limit, to prevent the address calculations from overflows etc.
 assert size < 0x200
 
-# We need to align the address. A page boundary seems to be sufficient on 
7362sl
-# and 7412
-addr = ((0x800 - size) & ~0xfff)
-haddr = 0x8000 + addr
-img = open(image, "rb")
+if args.offset:
+   addr = size
+   haddr = args.offset
+else:
+   # We need to align the address.
+   # A page boundary seems to be sufficient on 7362sl and 7412
+   addr = ((0x800 - size) & ~0xfff)
+   haddr = 0x8000 + addr
 
-ftp = FTP(ip, 'adam2', 'adam2')
+img = open(args.image, "rb")
+ftp = FTP(args.ip, 'adam2', 'adam2')
 
 def adam(cmd):
print("> %s"%(cmd))
-- 
2.20.1


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


[OpenWrt-Devel] Fwd: Re: 5GHz wifi is broken

2019-02-18 Thread e9hack




 Weitergeleitete Nachricht 
Betreff: Re: [OpenWrt-Devel] 5GHz wifi is broken
Datum: Mon, 18 Feb 2019 21:13:58 +0100
Von: e9hack 
An: Ben Greear 

Hi,

this is my wireless configuration. I build hostapd with the internal radius 
server enabled and set the expected
configuration for the internal radius server for hostapd if config value for 
auth_server isn't given or empty.

config wifi-device 'radio0'
option type 'mac80211'
option channel 'auto'
option channels '36-140'
option hwmode '11a'
option path 'pci:00/:00:00.0'
option htmode 'VHT80'
option country 'DE'
option disassoc_low_ack '0'
option log_level '0'

config wifi-iface
option device 'radio0'
option mode 'ap'
#   option encryption 'wpa2+ccmp'
option encryption 'wpa3-mixed'
option ssid 'Wxxb-radius'
option ca_cert '/etc/certs/ca-d171225.crt'
option server_cert '/etc/certs/crt-d170807.crt'
option private_key '/etc/certs/key-d170807.key'
option dh_file '/etc/certs/hostapd.dh4096.pem'
option eap_user_file '/etc/config/haprad.eap_user'
option network 'lan'
option eapol_version '2'
option ieee80211w '1'
option wpa_group_rekey '3600'

config wifi-iface
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'Wxxb'
#   option encryption 'psk2+ccmp'
option encryption 'sae-mixed'
option wpa_psk_file '/etc/config/hostapd.wpa_psk'
option disassoc_low_ack '0'
option ieee80211w '1'
option wpa_group_rekey '3600'

config wifi-iface
option device 'radio0'
option mode 'ap'
option ssid 'Txx'
#   option encryption 'psk2+ccmp'
option encryption 'sae-mixed'
option key ''
option network 'tor'
option macaddr '00:xx:xx:xx:xx:xx'
option disassoc_low_ack '0'
option ieee80211w '1'
option wpa_group_rekey '3600'

config wifi-device 'radio1'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'platform/ahb/ahb:apb/1810.wmac'
option htmode 'HT40-'
option country 'DE'
option noscan '1'
option log_level '3'
option ht_coex '1'

config wifi-iface
option device 'radio1'
option mode 'ap'
option network 'lan'
#   option encryption 'wpa2+ccmp'
option encryption 'wpa3-mixed'
option ssid 'Wxxa-radius'
option ca_cert '/etc/certs/ca-d171225.crt'
option crl_file '/etc/certs/crl-d181127.pem'
option check_crl '2'
option server_cert '/etc/certs/crt-d170807.crt'
option private_key '/etc/certs/key-d170807.key'
option dh_file '/etc/certs/hostapd.dh4096.pem'
option eap_user_file '/etc/config/haprad.eap_user'
option eapol_version '2'
option ieee80211w '1'

config wifi-iface
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'Wxxa'
#   option encryption 'psk2+ccmp'
option encryption 'sae-mixed'
option wpa_psk_file '/etc/config/hostapd.wpa_psk'
option beacon_int '500'

config wifi-iface
option device 'radio1'
option network 'guest1'
option mode 'ap'
option ssid 'Wxxc'
#   option encryption 'psk2+ccmp'
option encryption 'sae-mixed'
option key ''
list maclist 'fc:xx:xx:xx:xx:xx'
list maclist 'e8:xx:xx:xx:xx:xx'
option macfilter 'deny'
option ieee80211w '1'

config wifi-iface
option device 'radio1'
option network 'guest2'
option mode 'ap'
option ssid 'Wxxd'
#   option encryption 'psk2+ccmp'
option encryption 'sae-mixed'
option key ''
list maclist '8c:xx:xx:xx:xx:xx'
option macfilter 'deny'
option ieee80211w '1'

config wifi-iface
option device 'radio1'
option network 'Ix'
option mode 'ap'
option ssid 'The Internet of Shitty Things'
#   option encryption 'psk2+ccmp'
option encryption 'sae-mixed'
option key ''
option ieee80211w '1'
option disassoc_low_ack '0'
option max_inactivity '1800'

config wifi-iface
option device 'radio1'
option network 'radio'
option mode 'ap'
option ssid 'wx'
#   option encryption 'psk2+ccmp'
option encryption 'sae-mixed'
option key ''
option ieee80211w '1'
list maclist '8c:xx:xx:xx:xx:xx'
list maclist 'fc:xx:xx:xx:xx:xx'
list maclist 'e8:xx:xx:xx:xx:xx'
option macfilter 'deny'

config wifi-iface
option device 'radio1'
opti

Re: [OpenWrt-Devel] 5GHz wifi is broken

2019-02-18 Thread Hartmut Birr
Hi,

this is my wireless configuration. I build hostapd with the internal radius 
server enabled and set the expected
configuration for the internal radius server for hostapd if config value for 
auth_server isn't given or empty.

config wifi-device 'radio0'
option type 'mac80211'
option channel 'auto'
option channels '36-140'
option hwmode '11a'
option path 'pci:00/:00:00.0'
option htmode 'VHT80'
option country 'DE'
option disassoc_low_ack '0'
option log_level '0'

config wifi-iface
option device 'radio0'
option mode 'ap'
#   option encryption 'wpa2+ccmp'
option encryption 'wpa3-mixed'
option ssid 'Wxxb-radius'
option ca_cert '/etc/certs/ca-d171225.crt'
option server_cert '/etc/certs/crt-d170807.crt'
option private_key '/etc/certs/key-d170807.key'
option dh_file '/etc/certs/hostapd.dh4096.pem'
option eap_user_file '/etc/config/haprad.eap_user'
option network 'lan'
option eapol_version '2'
option ieee80211w '1'
option wpa_group_rekey '3600'

config wifi-iface
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'Wxxb'
#   option encryption 'psk2+ccmp'
option encryption 'sae-mixed'
option wpa_psk_file '/etc/config/hostapd.wpa_psk'
option disassoc_low_ack '0'
option ieee80211w '1'
option wpa_group_rekey '3600'

config wifi-iface
option device 'radio0'
option mode 'ap'
option ssid 'Txx'
#   option encryption 'psk2+ccmp'
option encryption 'sae-mixed'
option key ''
option network 'tor'
option macaddr '00:xx:xx:xx:xx:xx'
option disassoc_low_ack '0'
option ieee80211w '1'
option wpa_group_rekey '3600'

config wifi-device 'radio1'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'platform/ahb/ahb:apb/1810.wmac'
option htmode 'HT40-'
option country 'DE'
option noscan '1'
option log_level '3'
option ht_coex '1'

config wifi-iface
option device 'radio1'
option mode 'ap'
option network 'lan'
#   option encryption 'wpa2+ccmp'
option encryption 'wpa3-mixed'
option ssid 'Wxxa-radius'
option ca_cert '/etc/certs/ca-d171225.crt'
option crl_file '/etc/certs/crl-d181127.pem'
option check_crl '2'
option server_cert '/etc/certs/crt-d170807.crt'
option private_key '/etc/certs/key-d170807.key'
option dh_file '/etc/certs/hostapd.dh4096.pem'
option eap_user_file '/etc/config/haprad.eap_user'
option eapol_version '2'
option ieee80211w '1'

config wifi-iface
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'Wxxa'
#   option encryption 'psk2+ccmp'
option encryption 'sae-mixed'
option wpa_psk_file '/etc/config/hostapd.wpa_psk'
option beacon_int '500'

config wifi-iface
option device 'radio1'
option network 'guest1'
option mode 'ap'
option ssid 'Wxxc'
#   option encryption 'psk2+ccmp'
option encryption 'sae-mixed'
option key ''
list maclist 'fc:xx:xx:xx:xx:xx'
list maclist 'e8:xx:xx:xx:xx:xx'
option macfilter 'deny'
option ieee80211w '1'

config wifi-iface
option device 'radio1'
option network 'guest2'
option mode 'ap'
option ssid 'Wxxd'
#   option encryption 'psk2+ccmp'
option encryption 'sae-mixed'
option key ''
list maclist '8c:xx:xx:xx:xx:xx'
option macfilter 'deny'
option ieee80211w '1'

config wifi-iface
option device 'radio1'
option network 'Ix'
option mode 'ap'
option ssid 'The Internet of Shitty Things'
#   option encryption 'psk2+ccmp'
option encryption 'sae-mixed'
option key ''
option ieee80211w '1'
option disassoc_low_ack '0'
option max_inactivity '1800'

config wifi-iface
option device 'radio1'
option network 'radio'
option mode 'ap'
option ssid 'wx'
#   option encryption 'psk2+ccmp'
option encryption 'sae-mixed'
option key ''
option ieee80211w '1'
list maclist '8c:xx:xx:xx:xx:xx'
list maclist 'fc:xx:xx:xx:xx:xx'
list maclist 'e8:xx:xx:xx:xx:xx'
option macfilter 'deny'

config wifi-iface
option device 'radio1'
option network 'tor'
option mode 'ap'
option ssid 'Tx'
#   option encryption 'psk2+ccmp'
option encryption 'sae-mixed'
option key 

[OpenWrt-Devel] [PATCH 1/3][rpcd] iwinfo: show more stats from assoclist.

2019-02-18 Thread Daniel Danzberger
Signed-off-by: Daniel Danzberger 
---
 iwinfo.c | 16 
 1 file changed, 16 insertions(+)

diff --git a/iwinfo.c b/iwinfo.c
index 1849196..d476ce3 100644
--- a/iwinfo.c
+++ b/iwinfo.c
@@ -458,10 +458,22 @@ rpc_iwinfo_assoclist(struct ubus_context *ctx, struct 
ubus_object *obj,
 
blobmsg_add_string(&buf, "mac", mac);
blobmsg_add_u32(&buf, "signal", a->signal);
+   blobmsg_add_u32(&buf, "signal_avg", a->signal_avg);
blobmsg_add_u32(&buf, "noise", a->noise);
blobmsg_add_u32(&buf, "inactive", a->inactive);
+   blobmsg_add_u32(&buf, "connected_time", 
a->connected_time);
+   blobmsg_add_u32(&buf, "thr", a->thr);
+   blobmsg_add_u8(&buf, "authorized", a->is_authorized);
+   blobmsg_add_u8(&buf, "authenticated", 
a->is_authenticated);
+   blobmsg_add_string(&buf, "preamble", 
a->is_preamble_short ? "short" : "long");
+   blobmsg_add_u8(&buf, "wme", a->is_wme);
+   blobmsg_add_u8(&buf, "mfp", a->is_mfp);
+   blobmsg_add_u8(&buf, "tdls", a->is_tdls);
 
e = blobmsg_open_table(&buf, "rx");
+   blobmsg_add_u64(&buf, "drop_misc", a->rx_drop_misc);
+   blobmsg_add_u32(&buf, "packets", a->rx_packets);
+   blobmsg_add_u32(&buf, "bytes", a->rx_bytes);
blobmsg_add_u32(&buf, "rate", a->rx_rate.rate);
blobmsg_add_u32(&buf, "mcs", a->rx_rate.mcs);
blobmsg_add_u8(&buf, "40mhz", a->rx_rate.is_40mhz);
@@ -469,6 +481,10 @@ rpc_iwinfo_assoclist(struct ubus_context *ctx, struct 
ubus_object *obj,
blobmsg_close_table(&buf, e);
 
e = blobmsg_open_table(&buf, "tx");
+   blobmsg_add_u32(&buf, "failed", a->tx_failed);
+   blobmsg_add_u32(&buf, "retries", a->tx_retries);
+   blobmsg_add_u32(&buf, "packets", a->tx_packets);
+   blobmsg_add_u32(&buf, "bytes", a->tx_bytes);
blobmsg_add_u32(&buf, "rate", a->tx_rate.rate);
blobmsg_add_u32(&buf, "mcs", a->tx_rate.mcs);
blobmsg_add_u8(&buf, "40mhz", a->tx_rate.is_40mhz);
-- 
2.20.1


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


[OpenWrt-Devel] [PATCH 3/3][rpcd] iwinfo: add mesh infos in assoclist.

2019-02-18 Thread Daniel Danzberger
Signed-off-by: Daniel Danzberger 
---
 iwinfo.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/iwinfo.c b/iwinfo.c
index 983001a..a76b72a 100644
--- a/iwinfo.c
+++ b/iwinfo.c
@@ -470,6 +470,13 @@ rpc_iwinfo_assoclist(struct ubus_context *ctx, struct 
ubus_object *obj,
blobmsg_add_u8(&buf, "mfp", a->is_mfp);
blobmsg_add_u8(&buf, "tdls", a->is_tdls);
 
+   blobmsg_add_u16(&buf, "mesh llid", a->llid);
+   blobmsg_add_u16(&buf, "mesh plid", a->plid);
+   blobmsg_add_string(&buf, "mesh plink", a->plink_state);
+   blobmsg_add_string(&buf, "mesh local PS", a->local_ps);
+   blobmsg_add_string(&buf, "mesh peer PS", a->peer_ps);
+   blobmsg_add_string(&buf, "mesh non-peer PS", 
a->nonpeer_ps);
+
e = blobmsg_open_table(&buf, "rx");
blobmsg_add_u64(&buf, "drop_misc", a->rx_drop_misc);
blobmsg_add_u32(&buf, "packets", a->rx_packets);
-- 
2.20.1


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


[OpenWrt-Devel] [PATCH 2/3][rpcd] iwinfo: add survey.

2019-02-18 Thread Daniel Danzberger
Signed-off-by: Daniel Danzberger 
---
 iwinfo.c | 40 
 1 file changed, 40 insertions(+)

diff --git a/iwinfo.c b/iwinfo.c
index d476ce3..983001a 100644
--- a/iwinfo.c
+++ b/iwinfo.c
@@ -511,6 +511,45 @@ rpc_iwinfo_assoclist(struct ubus_context *ctx, struct 
ubus_object *obj,
return UBUS_STATUS_OK;
 }
 
+static int
+rpc_iwinfo_survey(struct ubus_context *ctx, struct ubus_object *obj,
+struct ubus_request_data *req, const char *method,
+struct blob_attr *msg)
+{
+   char res[IWINFO_BUFSIZE];
+   struct iwinfo_survey_entry *e;
+   void *c, *d;
+   int i, rv, len;
+
+   blob_buf_init(&buf, 0);
+
+   rv = rpc_iwinfo_open(msg);
+
+   c = blobmsg_open_array(&buf, "results");
+
+   if (rv || iw->survey(ifname, res, &len) || len < 0)
+   return UBUS_STATUS_OK;
+
+   for (i = 0; i < len; i += sizeof(struct iwinfo_survey_entry)) {
+   e = (struct iwinfo_survey_entry *)&res[i];
+
+   d = blobmsg_open_table(&buf, NULL);
+   blobmsg_add_u32(&buf, "mhz", e->mhz);
+   blobmsg_add_u32(&buf, "noise", e->noise);
+   blobmsg_add_u64(&buf, "active_time", e->active_time);
+   blobmsg_add_u64(&buf, "busy_time", e->busy_time);
+   blobmsg_add_u64(&buf, "busy_time_ext", e->busy_time_ext);
+   blobmsg_add_u64(&buf, "rx_time", e->rxtime);
+   blobmsg_add_u64(&buf, "tx_time", e->txtime);
+   blobmsg_close_table(&buf, d);
+   }
+
+   blobmsg_close_array(&buf, c);
+   ubus_send_reply(ctx, req, buf.head);
+   rpc_iwinfo_close();
+   return UBUS_STATUS_OK;
+}
+
 static int
 rpc_iwinfo_freqlist(struct ubus_context *ctx, struct ubus_object *obj,
 struct ubus_request_data *req, const char *method,
@@ -791,6 +830,7 @@ rpc_iwinfo_api_init(const struct rpc_daemon_ops *o, struct 
ubus_context *ctx)
UBUS_METHOD("freqlist",rpc_iwinfo_freqlist,
rpc_device_policy),
UBUS_METHOD("txpowerlist", rpc_iwinfo_txpowerlist, 
rpc_device_policy),
UBUS_METHOD("countrylist", rpc_iwinfo_countrylist, 
rpc_device_policy),
+   UBUS_METHOD("survey",  rpc_iwinfo_survey,  
rpc_device_policy),
UBUS_METHOD("phyname", rpc_iwinfo_phyname, 
rpc_uci_policy),
};
 
-- 
2.20.1


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


[OpenWrt-Devel] [PATCH] openssl: backport devcrypto changes from master

2019-02-18 Thread Rosen Penev
From: Eneas U de Queiroz 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.
The patches to the /dev/crypto engine were commited to openssl master,
and will be in the next major version (3.0).

Changes:
- Optimization in computing a digest in one operation, saving an ioctl
- Runtime configuration options for the choice of algorithms to use
- Command to dump useful information about the algorithms supported by
  the engine and the system.
- Build the devcrypto engine as a dynamic module, like other engines.

The devcrypto engine is built as a separate package by default, but
options were added to allow building the engines into the main library.

Signed-off-by: Eneas U de Queiroz 
---
 package/libs/openssl/Config.in|  35 +-
 package/libs/openssl/Makefile |  65 +-
 ...o-save-ioctl-if-EVP_MD_.FLAG_ONESHOT.patch |  60 ++
 ..._devcrypto-add-configuration-options.patch | 569 ++
 ...ypto-add-command-to-dump-driver-info.patch | 275 +
 ...o-make-the-dev-crypto-engine-dynamic.patch | 336 +++
 6 files changed, 1322 insertions(+), 18 deletions(-)
 create mode 100644 
package/libs/openssl/patches/400-eng_devcrypto-save-ioctl-if-EVP_MD_.FLAG_ONESHOT.patch
 create mode 100644 
package/libs/openssl/patches/410-eng_devcrypto-add-configuration-options.patch
 create mode 100644 
package/libs/openssl/patches/420-eng_devcrypto-add-command-to-dump-driver-info.patch
 create mode 100644 
package/libs/openssl/patches/430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch

diff --git a/package/libs/openssl/Config.in b/package/libs/openssl/Config.in
index 3ad8a66b9e..235f38e787 100644
--- a/package/libs/openssl/Config.in
+++ b/package/libs/openssl/Config.in
@@ -253,18 +253,41 @@ config OPENSSL_ENGINE
Note that you need to enable KERNEL_AIO to be able to build the
afalg engine package.
 
-config OPENSSL_ENGINE_CRYPTO
+config OPENSSL_ENGINE_BUILTIN
+   bool "Build chosen engines into libcrypto"
+   depends on OPENSSL_ENGINE
+   help
+   This builds all chosen engines into libcrypto.so, instead of 
building
+   them as dynamic engines in separate packages.
+   The benefit of building the engines into libcrypto is that they 
won't
+   require any configuration to be used by default.
+
+config OPENSSL_ENGINE_BUILTIN_AFALG
bool
-   select OPENSSL_ENGINE
-   select PACKAGE_kmod-cryptodev
+   prompt "Acceleration support through AF_ALG sockets engine"
+   depends on OPENSSL_ENGINE_BUILTIN && KERNEL_AIO && !LINUX_3_18
select PACKAGE_libopenssl-conf
+   help
+   This enables use of hardware acceleration through the
+   AF_ALG kenrel interface.
+
+config OPENSSL_ENGINE_BUILTIN_DEVCRYPTO
+   bool
prompt "Acceleration support through /dev/crypto"
+   depends on OPENSSL_ENGINE_BUILTIN
+   select PACKAGE_libopenssl-conf
help
This enables use of hardware acceleration through OpenBSD
Cryptodev API (/dev/crypto) interface.
-   You must install kmod-cryptodev (under Kernel modules, 
Cryptographic
-   API modules) for /dev/crypto to show up and use hardware
-   acceleration; otherwise it falls back to software.
+
+config OPENSSL_ENGINE_BUILTIN_PADLOCK
+   bool
+   prompt "VIA Padlock Acceleration support engine"
+   depends on OPENSSL_ENGINE_BUILTIN && TARGET_x86
+   select PACKAGE_libopenssl-conf
+   help
+   This enables use of hardware acceleration through the
+   VIA Padlock module.
 
 config OPENSSL_WITH_ASYNC
bool
diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index 732e3eb1cb..9b97b5399b 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -32,7 +32,10 @@ PKG_LICENSE_FILES:=LICENSE
 PKG_CPE_ID:=cpe:/a:openssl:openssl
 PKG_CONFIG_DEPENDS:= \
CONFIG_OPENSSL_ENGINE \
-   CONFIG_OPENSSL_ENGINE_CRYPTO \
+   CONFIG_OPENSSL_ENGINE_BUILTIN \
+   CONFIG_OPENSSL_ENGINE_BUILTIN_AFALG \
+   CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO \
+   CONFIG_OPENSSL_ENGINE_BUILTIN_PADLOCK \
CONFIG_OPENSSL_NO_DEPRECATED \
CONFIG_OPENSSL_OPTIMIZE_SPEED \
CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM \
@@ -89,7 +92,10 @@ endef
 define Package/libopenssl
 $(call Package/openssl/Default)
   SUBMENU:=SSL
-  DEPENDS:=+OPENSSL_WITH_COMPRESSION:zlib
+  DEPENDS:=+OPENSSL_WITH_COMPRESSION:zlib \
+  +OPENSSL_ENGINE_BUILTIN_AFALG:kmod-crypto-user \
+  +OPENSSL_ENGINE_BUILTIN_DEVCRYPTO:kmod-cryptodev \
+  +OPENSSL_ENGINE_BUILTIN_PADLOCK:kmod-crypto-hw-padlock
   TITLE+= (libraries)
   ABI_VERSION:

Re: [OpenWrt-Devel] [PATCH v2] dnsmasq: allow using dnsmasq as the sole resolver

2019-02-18 Thread Hans Dedecker
On Mon, Feb 18, 2019 at 3:18 PM Yousong Zhou  wrote:
>
> Currently it seems impossible to configure /etc/config/dhcp to achieve
> the following use case
>
>  - run dnsmasq with no-resolv
>  - re-generate /etc/resolv.conf with "nameserver 127.0.0.1"
>
> Before this change, we have to set resolvfile to /tmp/resolv.conf.auto
> to achive the 2nd effect above, but setting resolvfile requires noresolv
> being false.
>
> A new boolean option "localuse" is added to indicate that we intend to
> use dnsmasq as the local dns resolver.  It's false by default and to
> align with old behaviour it will be true automatically if resolvfile is
> set to /tmp/resolv.conf.auto
>
> Signed-off-by: Yousong Zhou 
Acked-by: Hans Dedecker 
> ---
> v2 <- v1
>
>  - retain /tmp/resolv.conf.auto as the default value of resolvfile when
>doing config_get, i.e. 2nd patch in the 1st version is now dropped
>  - retain the old behavior of rewriting /tmp/resolv.conf when resolvfile
>is /tmp/resolv.conf.auto
>
>  .../services/dnsmasq/files/dnsmasq.init   | 30 +--
>  1 file changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/package/network/services/dnsmasq/files/dnsmasq.init 
> b/package/network/services/dnsmasq/files/dnsmasq.init
> index f3066627d6..f65736e268 100644
> --- a/package/network/services/dnsmasq/files/dnsmasq.init
> +++ b/package/network/services/dnsmasq/files/dnsmasq.init
> @@ -731,7 +731,9 @@ dhcp_relay_add() {
>
>  dnsmasq_start()
>  {
> -   local cfg="$1" disabled resolvfile user_dhcpscript
> +   local cfg="$1"
> +   local disabled user_dhcpscript
> +   local resolvfile localuse
>
> config_get_bool disabled "$cfg" disabled 0
> [ "$disabled" -gt 0 ] && return 0
> @@ -882,14 +884,14 @@ dnsmasq_start()
> config_get_bool cachelocal "$cfg" cachelocal 1
>
> config_get_bool noresolv "$cfg" noresolv 0
> +   config_get_bool localuse "$cfg" localuse 0
> if [ "$noresolv" != "1" ]; then
> -   config_get resolvfile "$cfg" resolvfile 
> "/tmp/resolv.conf.auto"
> -   # So jail doesn't complain if file missing
> -   [ -n "$resolvfile" -a \! -e "$resolvfile" ] && touch 
> "$resolvfile"
> +   config_get resolvfile "$cfg" resolvfile /tmp/resolv.conf.auto
> +   [ -n "$resolvfile" -a ! -e "$resolvfile" ] && touch 
> "$resolvfile"
> +   xappend "--resolv-file=$resolvfile"
> +   [ "$resolvfile" = "/tmp/resolv.conf.auto" ] && localuse=1
> fi
>
> -   [ -n "$resolvfile" ] && xappend "--resolv-file=$resolvfile"
> -
> config_get hostsfile "$cfg" dhcphostsfile
> [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
>
> @@ -1011,7 +1013,7 @@ dnsmasq_start()
> mv -f $CONFIGFILE_TMP $CONFIGFILE
> mv -f $HOSTFILE_TMP $HOSTFILE
>
> -   [ "$resolvfile" = "/tmp/resolv.conf.auto" ] && {
> +   [ "$localuse" -gt 0 ] && {
> rm -f /tmp/resolv.conf
> [ $ADD_LOCAL_DOMAIN -eq 1 ] && [ -n "$DOMAIN" ] && {
> echo "search $DOMAIN" >> /tmp/resolv.conf
> @@ -1037,17 +1039,15 @@ dnsmasq_start()
>
>  dnsmasq_stop()
>  {
> -   local cfg="$1" resolvfile
> +   local cfg="$1"
> +   local noresolv resolvfile localuse
>
> +   config_get_bool noresolv "$cfg" noresolv 0
> +   config_get_bool localuse "$cfg" localuse 0
> config_get resolvfile "$cfg" "resolvfile"
>
> -   #relink /tmp/resolve.conf only for main instance
> -   [ "$resolvfile" = "/tmp/resolv.conf.auto" ] && {
> -   [ -f /tmp/resolv.conf ] && {
> -   rm -f /tmp/resolv.conf
> -   ln -s "$resolvfile" /tmp/resolv.conf
> -   }
> -   }
> +   [ "$noresolv" = 0 -a "$resolvfile" = "/tmp/resolv.conf.auto" ] && 
> localuse=1
> +   [ "$localuse" -gt 0 ] && ln -sf "/tmp/resolv.conf.auto" 
> /tmp/resolv.conf
>
> rm -f ${BASEDHCPSTAMPFILE}.${cfg}.*.dhcp
>  }

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


Re: [OpenWrt-Devel] Random PARTUUID on every rebuild

2019-02-18 Thread Petr Štetiar
R. Diez  [2019-02-18 20:27:55]:

> Besides, like I mentioned in my first mail, this random PARTUUID is an
> obstacle for repeatable builds. In my opinion, repeatable builds is a
> desirable goal. It can help troubleshoot some problems, but it is especially
> interesting from a security point of view. Two independent parties can
> verify that a binary was created from the stated sources. This particular
> UUID issue is listed here as a problem:
> 
> https://reproducible-builds.org/docs/system-images/

Well, one can notice following on IRC:

 -KGB-1:#openwrt-devel- 
https://tests.reproducible-builds.org/openwrt/openwrt_ramips.html has been 
updated. 
  (0% images and 99.8% packages reproducible in our current test framework.)

So I would say, that it's just lack of resources, rather then lack of
interest or lack of awareness.

> However, you did not actually give a reason why this OpenWrt PARTUUID has to
> be random at build time.

Simply I just don't know all the details, to give you such answer.  I tend to
believe, that it's named UUID for a reason.

-- ynezz

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


Re: [OpenWrt-Devel] Random PARTUUID on every rebuild

2019-02-18 Thread R. Diez 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 ---

The one thing I noticed is that there is a random PARTUUID for the X86_64
target, and that it gets regenerated on every (re)build. This makes the
image different every time, even if nothing has changed.


PARTUUID can't be the source of the rebuild as PARTUUID is not target or
dependency in the make's build pipeline. The (re)build times here are the same,
with or without ptgen's random signature.


It is probably true that a different PARTUUID would not cause a rebuild of some 
source files.

But then again, a different PARTUUID would probably cause a rebuild of the final image file, even if nothing else has changed. There is no need for 
such a rebuild if the image contents have not changed in the meantime.


Besides, like I mentioned in my first mail, this random PARTUUID is an obstacle for repeatable builds. In my opinion, repeatable builds is a desirable 
goal. It can help troubleshoot some problems, but it is especially interesting from a security point of view. Two independent parties can verify that 
a binary was created from the stated sources. This particular UUID issue is listed here as a problem:


https://reproducible-builds.org/docs/system-images/



Is there a reason why this partition ID has to be random? Such things make it
impossible to do repeatable builds.


It's UUID, so I think it should be unique. It seems like you could use
CONFIG_TARGET_ROOTFS_PARTNAME for fixed root partition name, but by looking at
the code, it might probably need some love to get it working properly.


Thanks for pointing out CONFIG_TARGET_ROOTFS_PARTNAME.

However, you did not actually give a reason why this OpenWrt PARTUUID has to be 
random at build time.

A unique ID is certainly interesting for USB sticks or external disks that need to be recognised when mounted again. Or if you have several partitions 
on a rather dynamic hard disk. But the OpenWrt system partition probably does not need such an ID. Even if it did, maybe for the benefit of other 
operating systems in a multiboot environment, it does not make sense to regenerate this PARTUUID every time. The partition IDs on Linux do not change 
when the files inside the partition change.


If you think about it, a fixed PARTUUID is a bad idea in any case. You could install the same OpenWrt image on 2 different partitions on your hard 
disk, and then both copies would have the same PARTUUID, which actually beats the purpose of such UUIDs. Setting a PARTUUID should probably be done by 
the installer, and not be a random but fixed value embedded during image build time.


Regards,
  rdiez

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


Re: [OpenWrt-Devel] Random PARTUUID on every rebuild

2019-02-18 Thread Petr Štetiar
R. Diez via openwrt-devel  [2019-02-16 
18:14:14]:

> The one thing I noticed is that there is a random PARTUUID for the X86_64
> target, and that it gets regenerated on every (re)build. This makes the
> image different every time, even if nothing has changed.

PARTUUID can't be the source of the rebuild as PARTUUID is not target or
dependency in the make's build pipeline. The (re)build times here are the same,
with or without ptgen's random signature.

> Is there a reason why this partition ID has to be random? Such things make it
> impossible to do repeatable builds.

It's UUID, so I think it should be unique. It seems like you could use
CONFIG_TARGET_ROOTFS_PARTNAME for fixed root partition name, but by looking at
the code, it might probably need some love to get it working properly.

-- ynezz

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


Re: [OpenWrt-Devel] [PATCH] [ubox] kmodloader: increase module name length

2019-02-18 Thread Bjørn Mork
Sergiy Kibrik  writes:
> On 2/18/19 4:24 PM, Bjørn Mork wrote:
>> Agreed that 33 is not enough, but NAME_MAX is way overkill again.  Why
>> not use the actual max length from the kernel?:
>> 
>>  include/linux/module.h:#define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN
>>  include/linux/moduleparam.h:#define MAX_PARAM_PREFIX_LEN (64 - 
>> sizeof(unsigned long))
>
> but those aren't exposed to user space.
> Or do you suggest to duplicate that (64 - sizeof(unsigned long)) definition?

This is my personal taste only, but yes, I prefer duplicating
definitions to document such relationships. Or at least having a comment
documenting it if some other value is used.  Which would have
immediately exposed the original bug.


Bjørn

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


Re: [OpenWrt-Devel] [PATCH] [ubox] kmodloader: increase module name length

2019-02-18 Thread Sergiy Kibrik
hi Bjørn,

On 2/18/19 4:24 PM, Bjørn Mork wrote:
> Agreed that 33 is not enough, but NAME_MAX is way overkill again.  Why
> not use the actual max length from the kernel?:
> 
>  include/linux/module.h:#define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN
>  include/linux/moduleparam.h:#define MAX_PARAM_PREFIX_LEN (64 - 
> sizeof(unsigned long))

but those aren't exposed to user space.
Or do you suggest to duplicate that (64 - sizeof(unsigned long)) definition?

--
regards,
Sergiy



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


Re: [OpenWrt-Devel] [PATCH] [ubox] kmodloader: increase module name length

2019-02-18 Thread Bjørn Mork
Sergiy Kibrik  writes:

> Otherwise modules with long names, e.g. lttng (>32 chars) can't be loaded.
>
> Signed-off-by: Sergiy Kibrik 
> ---
>  kmodloader.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kmodloader.c b/kmodloader.c
> index 3196deb..67e3706 100644
> --- a/kmodloader.c
> +++ b/kmodloader.c
> @@ -157,7 +157,7 @@ static char* get_module_path(char *name)
>  
>  static char* get_module_name(char *path)
>  {
> - static char name[33];
> + static char name[NAME_MAX];
>   char *t;
>  
>   strncpy(name, basename(path), sizeof(name) - 1);

Agreed that 33 is not enough, but NAME_MAX is way overkill again.  Why
not use the actual max length from the kernel?:

 include/linux/module.h:#define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN
 include/linux/moduleparam.h:#define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned 
long))


Bjørn

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


[OpenWrt-Devel] [PATCH v2] dnsmasq: allow using dnsmasq as the sole resolver

2019-02-18 Thread Yousong Zhou
Currently it seems impossible to configure /etc/config/dhcp to achieve
the following use case

 - run dnsmasq with no-resolv
 - re-generate /etc/resolv.conf with "nameserver 127.0.0.1"

Before this change, we have to set resolvfile to /tmp/resolv.conf.auto
to achive the 2nd effect above, but setting resolvfile requires noresolv
being false.

A new boolean option "localuse" is added to indicate that we intend to
use dnsmasq as the local dns resolver.  It's false by default and to
align with old behaviour it will be true automatically if resolvfile is
set to /tmp/resolv.conf.auto

Signed-off-by: Yousong Zhou 
---
v2 <- v1

 - retain /tmp/resolv.conf.auto as the default value of resolvfile when
   doing config_get, i.e. 2nd patch in the 1st version is now dropped
 - retain the old behavior of rewriting /tmp/resolv.conf when resolvfile
   is /tmp/resolv.conf.auto

 .../services/dnsmasq/files/dnsmasq.init   | 30 +--
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init 
b/package/network/services/dnsmasq/files/dnsmasq.init
index f3066627d6..f65736e268 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -731,7 +731,9 @@ dhcp_relay_add() {
 
 dnsmasq_start()
 {
-   local cfg="$1" disabled resolvfile user_dhcpscript
+   local cfg="$1"
+   local disabled user_dhcpscript
+   local resolvfile localuse
 
config_get_bool disabled "$cfg" disabled 0
[ "$disabled" -gt 0 ] && return 0
@@ -882,14 +884,14 @@ dnsmasq_start()
config_get_bool cachelocal "$cfg" cachelocal 1
 
config_get_bool noresolv "$cfg" noresolv 0
+   config_get_bool localuse "$cfg" localuse 0
if [ "$noresolv" != "1" ]; then
-   config_get resolvfile "$cfg" resolvfile "/tmp/resolv.conf.auto"
-   # So jail doesn't complain if file missing
-   [ -n "$resolvfile" -a \! -e "$resolvfile" ] && touch 
"$resolvfile"
+   config_get resolvfile "$cfg" resolvfile /tmp/resolv.conf.auto
+   [ -n "$resolvfile" -a ! -e "$resolvfile" ] && touch 
"$resolvfile"
+   xappend "--resolv-file=$resolvfile"
+   [ "$resolvfile" = "/tmp/resolv.conf.auto" ] && localuse=1
fi
 
-   [ -n "$resolvfile" ] && xappend "--resolv-file=$resolvfile"
-
config_get hostsfile "$cfg" dhcphostsfile
[ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
 
@@ -1011,7 +1013,7 @@ dnsmasq_start()
mv -f $CONFIGFILE_TMP $CONFIGFILE
mv -f $HOSTFILE_TMP $HOSTFILE
 
-   [ "$resolvfile" = "/tmp/resolv.conf.auto" ] && {
+   [ "$localuse" -gt 0 ] && {
rm -f /tmp/resolv.conf
[ $ADD_LOCAL_DOMAIN -eq 1 ] && [ -n "$DOMAIN" ] && {
echo "search $DOMAIN" >> /tmp/resolv.conf
@@ -1037,17 +1039,15 @@ dnsmasq_start()
 
 dnsmasq_stop()
 {
-   local cfg="$1" resolvfile
+   local cfg="$1"
+   local noresolv resolvfile localuse
 
+   config_get_bool noresolv "$cfg" noresolv 0
+   config_get_bool localuse "$cfg" localuse 0
config_get resolvfile "$cfg" "resolvfile"
 
-   #relink /tmp/resolve.conf only for main instance
-   [ "$resolvfile" = "/tmp/resolv.conf.auto" ] && {
-   [ -f /tmp/resolv.conf ] && {
-   rm -f /tmp/resolv.conf
-   ln -s "$resolvfile" /tmp/resolv.conf
-   }
-   }
+   [ "$noresolv" = 0 -a "$resolvfile" = "/tmp/resolv.conf.auto" ] && 
localuse=1
+   [ "$localuse" -gt 0 ] && ln -sf "/tmp/resolv.conf.auto" /tmp/resolv.conf
 
rm -f ${BASEDHCPSTAMPFILE}.${cfg}.*.dhcp
 }

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


Re: [OpenWrt-Devel] 5GHz wifi is broken

2019-02-18 Thread Sven Eckelmann
On Saturday, 16 February 2019 22:36:18 CET Christian Lamparter wrote:
> @Ben can you please take a peek into your wave-1 firmware and check if the 
> mgmt_rate WMI (WMI_10X_VDEV_PARAM_MGMT_RATE) is supported, or if there is
> a bad interaction somewhere else?

I am using the same driver and ath10k-firmware-qca988x-ct on an OM5P-ACv2 with 
reboot-9393-gd0b45962ef. It seems to  work here for me with following 
configuration:

config wifi-device 'radio0'
option type 'mac80211'
option channel '36'
option hwmode '11a'
option path 'pci:00/:00:00.0'
option htmode 'VHT80'
option disabled '0'

config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'psk'
option key 'supersecret'

config wifi-iface 'default_radio2'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt5'
option encryption 'psk'
option key 'supersecret2'

config wifi-device 'radio1'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'platform/qca955x_wmac'
option htmode 'HT20'
option disabled '1'

config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'

So it should work in theory. I personally (and some Freifunk Communities) need 
it more for 2.4GHz PHYs (Dakota). But also playing around with the rates for 
the QCA988X PHY (radio0) seems to work for me:

list supported_rates '24000'
list supported_rates '48000'
list supported_rates '54000'
list basic_rate '24000'
list basic_rate '54000'

and the management rates (captured by a second device) are 24MBit/s.

So I would guess that it is something very specific (yeah, I know step 6 of 
"six stages of debugging": How did that ever work?). Having some way to 
reproduce it could be helpful - just do as Ben said to better understand the 
problem.

And we have a different user which also complained about something like this 
on Tp-Link Archer C60 V2 - but both radios were not working anymore. If this 
is true and related the it doesn't sound to me like this is strictly a 
ath10k(-ct) problem - one of the radios is ath9k. But who knows.

@Ben, the patch (or actually the whole series) is basically the upstream way 
to change the rate for management/broadcast/multicast frames. It is not using 
debugfs to communicate with the driver but just the events from mac80211. So 
it is less flexible in what you can do but works automatically. The broadcast 
multicast parts are in the kernel (and OpenWrt) for a while and these two 
patches just add the missing management rates part. They just wait for an 
BSS_CHANGED_BASIC_RATES event in ath10k_bss_info_changed and find the lowest 
basic rate + set this as management rate. Similar behavior to what ath9k & co 
are doing automatically with minstrel(_ht).

The implementation is a best effort implementation - if it fails to set the 
rate via WMI then it will print a warning and continue. I personally don't 
like how the control flow works in this patch. It just returns from 
ath10k_bss_info_changed even when some other parts (not yet existing in the 
current code) still might have to be run. But this is just how it was 
implemented and how Kalle Valo accepted it.

But the WMI part of the ath10k firmware (called by your debugfs interface and 
this upstream patch) is the same.

Kind regards,
Sven

signature.asc
Description: This is a digitally signed message part.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [ubox] kmodloader: increase module name length

2019-02-18 Thread Sergiy Kibrik
Otherwise modules with long names, e.g. lttng (>32 chars) can't be loaded.

Signed-off-by: Sergiy Kibrik 
---
 kmodloader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kmodloader.c b/kmodloader.c
index 3196deb..67e3706 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -157,7 +157,7 @@ static char* get_module_path(char *name)
 
 static char* get_module_name(char *path)
 {
-   static char name[33];
+   static char name[NAME_MAX];
char *t;
 
strncpy(name, basename(path), sizeof(name) - 1);
-- 
2.7.4


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


[OpenWrt-Devel] [PATCH 1/2] armvirt: 32: refresh kernel config

2019-02-18 Thread Yousong Zhou
The diff was genereated by running the following command without
actually changing any kernel config options

make kernel_menuconfig CONFIG_TARGET=subtarget

Here are some initial findings on the change

 - CONFIG_ARCH_OPTIONAL_KERNEL_RWX is now arch default
 - CONFIG_ARM_GIC_V3_ITS is selected by CONFIG_ARCH_VIRT
 - CONFIG_CPU_SPECTRE is select by CONFIG_CPU_V7
 - CONFIG_TIMER_OF is now a arch default
 - CONFIG_TIMER_PROBE is select by CONFIG_TIMER_OF

The following options should probably be moved to generic config

 - CONFIG_MIGRATION is a default on option
 - CONFIG_TREE_SRCU is a default on option for !PREEMPT && SMP system
 - CONFIG_RCU_NEED_SEGCBLIST

Signed-off-by: Yousong Zhou 
---
 target/linux/armvirt/32/config-default | 26 --
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/target/linux/armvirt/32/config-default 
b/target/linux/armvirt/32/config-default
index a3530b0e77..cdac5ffe56 100644
--- a/target/linux/armvirt/32/config-default
+++ b/target/linux/armvirt/32/config-default
@@ -1,4 +1,8 @@
 CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
+CONFIG_ARCH_HAS_SET_MEMORY=y
+CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
+CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
 CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
 CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
 CONFIG_ARCH_MULTIPLATFORM=y
@@ -6,6 +10,8 @@ CONFIG_ARCH_MULTIPLATFORM=y
 CONFIG_ARCH_MULTI_V6_V7=y
 CONFIG_ARCH_MULTI_V7=y
 CONFIG_ARCH_NR_GPIO=0
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
 # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
 # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
 CONFIG_ARCH_SUPPORTS_UPROBES=y
@@ -15,6 +21,7 @@ CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_ARM=y
 CONFIG_ARM_CPU_SUSPEND=y
+CONFIG_ARM_GIC_V3_ITS=y
 CONFIG_ARM_HAS_SG_CHAIN=y
 CONFIG_ARM_HEAVY_MB=y
 CONFIG_ARM_L1_CACHE_SHIFT=6
@@ -27,7 +34,8 @@ CONFIG_ARM_THUMB=y
 # CONFIG_ARM_THUMBEE is not set
 CONFIG_ARM_VIRT_EXT=y
 CONFIG_AUTO_ZRELADDR=y
-# CONFIG_BINFMT_FLAT is not set
+CONFIG_BLK_MQ_VIRTIO=y
+CONFIG_BLK_SCSI_REQUEST=y
 CONFIG_CACHE_L2X0=y
 CONFIG_CPU_32v6K=y
 CONFIG_CPU_32v7=y
@@ -41,6 +49,8 @@ CONFIG_CPU_CP15_MMU=y
 CONFIG_CPU_HAS_ASID=y
 # CONFIG_CPU_ICACHE_DISABLE is not set
 CONFIG_CPU_PABRT_V7=y
+CONFIG_CPU_SPECTRE=y
+CONFIG_CPU_THUMB_CAPABLE=y
 CONFIG_CPU_TLB_V7=y
 CONFIG_CPU_V7=y
 CONFIG_DEBUG_BUGVERBOSE=y
@@ -48,9 +58,14 @@ CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
 # CONFIG_DEBUG_UART_8250 is not set
 # CONFIG_DEBUG_USER is not set
 CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_GENERIC_ARCH_TOPOLOGY=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+# CONFIG_GRO_CELLS is not set
 CONFIG_HARDEN_BRANCH_PREDICTOR=y
 CONFIG_HAVE_ARM_ARCH_TIMER=y
-CONFIG_HAVE_CBPF_JIT=y
+CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y
+CONFIG_HAVE_EBPF_JIT=y
 CONFIG_HAVE_IDE=y
 CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
 CONFIG_HAVE_OPROFILE=y
@@ -59,8 +74,10 @@ CONFIG_HAVE_PROC_CPU=y
 CONFIG_HAVE_SMP=y
 CONFIG_HZ_FIXED=0
 CONFIG_HZ_PERIODIC=y
+# CONFIG_MDIO_BUS is not set
 CONFIG_MIGHT_HAVE_CACHE_L2X0=y
 CONFIG_MIGHT_HAVE_PCI=y
+CONFIG_MIGRATION=y
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MULTI_IRQ_HANDLER=y
 CONFIG_NEON=y
@@ -74,12 +91,17 @@ CONFIG_PGTABLE_LEVELS=2
 # CONFIG_PL310_ERRATA_727915 is not set
 # CONFIG_PL310_ERRATA_753970 is not set
 # CONFIG_PL310_ERRATA_769419 is not set
+CONFIG_RCU_NEED_SEGCBLIST=y
 CONFIG_RTC_MC146818_LIB=y
 CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SG_POOL=y
 CONFIG_SMP_ON_UP=y
 CONFIG_SWP_EMULATE=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 # CONFIG_THUMB2_KERNEL is not set
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TREE_SRCU=y
 CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
 CONFIG_USE_OF=y
 CONFIG_VECTORS_BASE=0x

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


[OpenWrt-Devel] [PATCH 2/2] armvirt: 32: enable CONFIG_ARM_LPAE

2019-02-18 Thread Yousong Zhou
This is required for running armvirt_32 on QEMU 3.0 [1], otherwise the
kernel will emit the following complaint and virtio-net-pci devices will
fail to be initialized

[1.124214] OF: PCI: host bridge /pcie@1000 ranges:
[1.125093] OF: PCI:IO 0x3eff..0x3eff -> 0x
[1.125942] OF: PCI:   MEM 0x1000..0x3efe -> 0x1000
[1.126403] OF: PCI:   MEM 0x80..0xff -> 0x80
[1.127748] pci-host-generic 401000.pcie: can't claim ECAM area 
[mem 0x1000-0x1fff]: address conflict with /pcie@1000 [mem 
0x1000-0x3efe]
[1.129752] pci-host-generic: probe of 401000.pcie failed with 
error -16

Running QEMU with "-M virt,highmem=off" is an option, but "highmem" was only
introduced as a default on flag since QEMU 2.5.0 and QEMU will fail and quit on
encounter of unknown flags

 [1] Armv7 guest fails to boot with qemu-3.0.0-1,
 https://bugzilla.redhat.com/show_bug.cgi?id=1633328#c5

Signed-off-by: Yousong Zhou 
---
 target/linux/armvirt/32/config-default | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/target/linux/armvirt/32/config-default 
b/target/linux/armvirt/32/config-default
index cdac5ffe56..a31488749c 100644
--- a/target/linux/armvirt/32/config-default
+++ b/target/linux/armvirt/32/config-default
@@ -1,4 +1,5 @@
 CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_ARCH_AXXIA is not set
 CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
 CONFIG_ARCH_HAS_SET_MEMORY=y
 CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
@@ -12,6 +13,7 @@ CONFIG_ARCH_MULTI_V7=y
 CONFIG_ARCH_NR_GPIO=0
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
+CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
 # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
 # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
 CONFIG_ARCH_SUPPORTS_UPROBES=y
@@ -26,7 +28,7 @@ CONFIG_ARM_HAS_SG_CHAIN=y
 CONFIG_ARM_HEAVY_MB=y
 CONFIG_ARM_L1_CACHE_SHIFT=6
 CONFIG_ARM_L1_CACHE_SHIFT_6=y
-# CONFIG_ARM_LPAE is not set
+CONFIG_ARM_LPAE=y
 CONFIG_ARM_PATCH_IDIV=y
 CONFIG_ARM_PATCH_PHYS_VIRT=y
 CONFIG_ARM_PSCI=y
@@ -63,15 +65,19 @@ CONFIG_GENERIC_CPU_AUTOPROBE=y
 CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
 # CONFIG_GRO_CELLS is not set
 CONFIG_HARDEN_BRANCH_PREDICTOR=y
+CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
 CONFIG_HAVE_ARM_ARCH_TIMER=y
 CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y
 CONFIG_HAVE_EBPF_JIT=y
+CONFIG_HAVE_GENERIC_GUP=y
 CONFIG_HAVE_IDE=y
 CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
 CONFIG_HAVE_OPROFILE=y
 CONFIG_HAVE_OPTPROBES=y
 CONFIG_HAVE_PROC_CPU=y
+CONFIG_HAVE_RCU_TABLE_FREE=y
 CONFIG_HAVE_SMP=y
+# CONFIG_HUGETLBFS is not set
 CONFIG_HZ_FIXED=0
 CONFIG_HZ_PERIODIC=y
 # CONFIG_MDIO_BUS is not set
@@ -86,7 +92,8 @@ CONFIG_OUTER_CACHE=y
 CONFIG_OUTER_CACHE_SYNC=y
 CONFIG_PAGE_OFFSET=0xC000
 CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PGTABLE_LEVELS=2
+CONFIG_PGTABLE_LEVELS=3
+CONFIG_PHYS_ADDR_T_64BIT=y
 # CONFIG_PL310_ERRATA_588369 is not set
 # CONFIG_PL310_ERRATA_727915 is not set
 # CONFIG_PL310_ERRATA_753970 is not set
@@ -98,6 +105,7 @@ CONFIG_SG_POOL=y
 CONFIG_SMP_ON_UP=y
 CONFIG_SWP_EMULATE=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_SYS_SUPPORTS_HUGETLBFS=y
 # CONFIG_THUMB2_KERNEL is not set
 CONFIG_TIMER_OF=y
 CONFIG_TIMER_PROBE=y

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


Re: [OpenWrt-Devel] [PATCH 0/8 v3] Stable material from OpenWrt for v4.9.y

2019-02-18 Thread Greg Kroah-Hartman
On Thu, Feb 14, 2019 at 02:23:55PM +0100, Linus Walleij wrote:
> This is a series of patches used in OpenWrt's v4.9 backports
> that seem to be of generic interest to v4.9.y
> 
> For the remaining patches I cherry-picked the upstream
> commits except for (8/8)
> "netfilter: nf_tables: fix mismatch in big-endian system"
> where I used OpenWrt's backport.

Now queued up, except for the ones that were new features :)

thanks,

greg k-h

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


Re: [OpenWrt-Devel] [PATCH 2/2] dnsmasq: decouple /tmp/resolv.conf from value of option resolvfile

2019-02-18 Thread Hans Dedecker
On Mon, Feb 18, 2019 at 7:52 AM Yousong Zhou  wrote:
>
> On Mon, 18 Feb 2019 at 04:00, Hans Dedecker  wrote:
> >
> > Hi Yousong,
> > On Thu, Feb 14, 2019 at 1:15 PM Yousong Zhou  wrote:Y
> > >
> > > Option resolvfile should now affect only how dnsmasq itself will run.
> > > The implicit effect of its specific value on other parts of the system
> > > makes the code unnecessarily hard to follow
> > >
> > > Signed-off-by: Yousong Zhou 
> > > ---
> > >  package/network/services/dnsmasq/Makefile   | 2 +-
> > >  package/network/services/dnsmasq/files/dnsmasq.init | 7 +--
> > >  2 files changed, 2 insertions(+), 7 deletions(-)
> > >
> > > diff --git a/package/network/services/dnsmasq/Makefile 
> > > b/package/network/services/dnsmasq/Makefile
> > > index d51f23e48b..5e83b4f8e5 100644
> > > --- a/package/network/services/dnsmasq/Makefile
> > > +++ b/package/network/services/dnsmasq/Makefile
> > > @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
> > >
> > >  PKG_NAME:=dnsmasq
> > >  PKG_VERSION:=2.80
> > > -PKG_RELEASE:=8
> > > +PKG_RELEASE:=9
> > >
> > >  PKG_SOURCE:=$(PKG_NAME)-$(PKG_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 05c555bd8c..22471c11aa 100644
> > > --- a/package/network/services/dnsmasq/files/dnsmasq.init
> > > +++ b/package/network/services/dnsmasq/files/dnsmasq.init
> > > @@ -888,7 +888,6 @@ dnsmasq_start()
> > > config_get resolvfile "$cfg" resolvfile
> > > [ -n "$resolvfile" -a ! -e "$resolvfile" ] && touch 
> > > "$resolvfile"
> > > xappend "--resolv-file=$resolvfile"
> > > -   [ "$resolvfile" = "/tmp/resolv.conf.auto" ] && localuse=1
> > By removing this line 127.0.0.1 is not added anymore in
> > /tmp/resolv.conf as localuse is 0 by default;
> > as a result local resolving is broken.
>
> Yes, this is exactly the behavior change.  It intends to make it clear
> that to use dnsmasq for local dns query, one has to set explicitly
> localuse to 1.  And with localuse being 0, /etc/resolv.conf will
> default to /tmp/resolv.conf.auto as setup by /etc/init.d/boot
This will mean a change in behavior when an user upgrades as localuse will
default to 0 which will mean for local dns queries dnsmasq will be bypassed as
the local dns requests will be forwarded to the dns servers in
/tmp/resolv.conf.auto
I understand the motivation for the change but shouldn't we try to preserve the
behavior when an user upgrades ?

Hans
>
> The argument is mainly that resolvfile being /tmp/resolv.conf.auto
> should not have a consequence on the content of /tmp/resolv.conf.
> resolvfile is dnsmasq specific and /tmp/resolv.conf is for all other
> processes in the local system
>
> Should have made it more clear in the commit message that this can
> break existing expectations.  Sorry about that, I will drop this
> change, amend the first, then send another version.
>
> Thank you,
>yousong

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