OpenWrt/LEDE Project

Welcome to the OpenWrt/LEDE Project bug reporting and issue tracking system

Problems to be reported here are for the OpenWrt/LEDE Project targets, sources, toolchain, core packages, build procedures, distribution and infrastructure. Guidelines for submitting a good bug report can be found at the OpenWrt/LEDE Project website. Problems related to LuCI or OpenWrt packages need to be reported in their repositories:

Notifications of all submissions and task changes are sent to lede-bugs@infradead.org.

OpenedIDCategoryTask TypePriority  descSeveritySummaryReported InStatus
25.05.2017803PackagesBug ReportVery LowMediumNL80211_STA_INFO_INACTIVE_TIME incorrect value for IB...TrunkUnconfirmed Task Description

- ar71xx affected
- latest LEDE trunk affected and may be older versions
- Steps to reproduce

Buid current LEDE trunk with a10k-ct driver and CT firmware for QCA988x.
Flash devices with firmware.
Create IBSS interface for 2 or more ath10k devices and connect them.

 

iwinfo shows negative value for last activity. Value is rising. TX traffic can’t pass through interface.
All incoming packets come with “unknown” bitrate.

root@LEDE:~# iwinfo mesh5_0 assoclist
84:16:F9:B1:A0:3E -39 dBm / -103 dBm (SNR 64) -230820 ms ago

      RX: unknown                                      794 Pkts.
      TX: 6.0 MBit/s                                     0 Pkts.

root@LEDE:~# iwinfo mesh5_0 assoclist
84:16:F9:B1:A0:3E -39 dBm / -103 dBm (SNR 64) -127810 ms ago

      RX: unknown                                     2828 Pkts.
      TX: 6.0 MBit/s  
                                 0 Pkts.

root@LEDE:~# iwinfo mesh5_0 assoclist
84:16:F9:B1:A0:3E -40 dBm / -103 dBm (SNR 63) -117860 ms ago

      RX: unknown                                     3022 Pkts.
      TX: 6.0 MBit/s                                     0 Pkts.

According to iw output this value is close to th “unsigned long” value limit
root@LEDE:~# iw mesh5_0 station dump
Station 18:a6:f7:3e:b4:de (on mesh5_0)

      inactive time:  4294805756 ms
      rx bytes:       152352
      rx packets:     2208
      tx bytes:       0
      tx packets:     0
      tx retries:     0
      tx failed:      0
      rx drop misc:   0
      signal:         -39 dBm
      signal avg:     -37 dBm
      tx bitrate:     6.0 MBit/s
      authorized:     yes
      authenticated:  yes
      associated:     yes
      preamble:       long
      WMM/WME:        yes
      MFP:            no
      TDLS peer:      no
      DTIM period:    0
      beacon interval:100
      short slot time:yes
      connected time: 113 seconds

root@LEDE:~# iw mesh5_0 station dump
Station 18:a6:f7:3e:b4:de (on mesh5_0)

      inactive time:  4294878176 ms
      rx bytes:       250056
      rx packets:     3624
      tx bytes:       0
      tx packets:     0
      tx retries:     0
      tx failed:      0
      rx drop misc:   0
      signal:         -40 dBm
      signal avg:     -39 dBm
      tx bitrate:     6.0 MBit/s
      authorized:     yes
      authenticated:  yes
      associated:     yes
      preamble:       long
      WMM/WME:        yes
      MFP:            no
      TDLS peer:      no
      DTIM period:    0
      beacon interval:100
      short slot time:yes
      connected time: 185 seconds

After some time (3-5 minutes) the value overflows and starting from zero with normal values.

root@LEDE:~# iwinfo mesh5_0 assoclist
84:16:F9:B1:A0:3E -38 dBm / -103 dBm (SNR 65) 80 ms ago

      RX: unknown                                     5732 Pkts.
      TX: 6.0 MBit/s                                     0 Pkts.

root@LEDE:~# iw mesh5_0 station dump
Station 18:a6:f7:3e:b4:de (on mesh5_0)

      inactive time:  50 ms
      rx bytes:       399372
      rx packets:     5788
      tx bytes:       0
      tx packets:     0
      tx retries:     0
      tx failed:      0
      rx drop misc:   0
      signal:         -41 dBm
      signal avg:     -39 dBm
      tx bitrate:     6.0 MBit/s
      authorized:     yes
      authenticated:  yes
      associated:     yes
      preamble:       long
      WMM/WME:        yes
      MFP:            no
      TDLS peer:      no
      DTIM period:    0
      beacon interval:100
      short slot time:yes
      connected time: 296 seconds
01.08.2017944PackagesBug ReportVery LowLowfirewall3 isn't holding iptables lockTrunkUnconfirmed Task Description

I was first thinking that my missing iptables rules are related to the bug  FS#943 . But it looks like firewall3 is not holding the iptables lock via the option “-w”. This is unsafe because multiple iptables process may try to change a table at the same time and thus overwrite the final results of another iptables process.

The -w functionality for iptables-restore can be found in https://git.netfilter.org/iptables/commit/?id=999eaa241212d3952ddff39a99d0d55a74e3639e

03.08.2017948PackagesBug ReportVery LowHighlua: on 64bit targets integer number truncation may occ...AllUnconfirmed Task Description

On 64bit target implementations (eg x86_64) and with LNUM on int32
mode (default), assignation of an integer number greater than
UINT_MAX (ie 4294967295), but lesser or equal than UINT_MAX +
0x7FFFFFFF + 1 (ie 6442450943) to a variable does result in
truncation of the final value stored in memory.

E.g.:

   > n=4294967296; print(n)
   0
   > n=6442450943; print(n)
   2147483647

Cause:
LNUM does perform a C-Style cast in the intermediate function wrapper
used to check for the fitness of numbers. This cast is not only unnecessary
but also brings on undefined behaviour on 64bit target implementations
where INT’s and LONG’s are of size 32 and 64bit respectively.

Fix:
Removal of the unnecessary cast in wrapper does bring back the ‘overflow detection’.

Regards, Víctor Calvís.

29.09.20171024PackagesFeature RequestVery LowLowThere is no "LEDE interface" for the Linux interface cr...AllResearching Task Description

Let’s say I want to enable dropbear only in the tun0 interface created by OpenVPN. The dropbear configuration has an “Interface” field where I can make it listen, for example, only on the “wan” or “lan” interfaces. But the tun0 interface has not been created by anything in /etc/config/network and LEDE doesn’t really know about it, so I can’t specify it the dropbear configuration.

Even adding the tun0 interface to a “vpn” network in /etc/config/network using “proto none” fails to do the trick.

19.10.20171076PackagesBug ReportVery LowHighBugs about QCA9886AllWaiting on reporter Task Description

Supply the following if possible:
- Device problem occurs on archer-c58-v1
- Software versions of LEDE release is the latest master version, and other versions have same bug.

  I noticed the memory is leaking after connected serveral devices with QCA9886,

that will cause system crash in the end. Before leaking, WIFI can work fine, but when memory is leaking, WIFI can not work anymore.

  My OS is latest lede(mac80211 version is backports-2017-10-06), 

and the board can work with QSDK.

  If you need more detail information, please let me know.
 


20.10.20171091PackagesBuild FailureVery LowLowlibiconv-full undefined reference compile-time linking ...TrunkUnconfirmed Task Description

LEDE Trunk using latest commit fbde9ac718409720a937671f3354837223b5db76
Feeds all using latest trunk sources, though that shouldn't affect this
Target is "x86" Generic (also tried x86_64)
Selected GCC 7 for compiler options
.config is attached

Problem discovered when enabling the 'minidlna' package, which has a dependency on 'libiconv-full' - a core LEDE package.

Compilation fails on 'libiconv-full' with undefined reference errors (linking errors) for objects 'aliases_lookup' and 'aliases2_lookup' in "libiconv.so":

make[5]: Entering directory '/home/jstaehle/prem2/depot/lede/build_dir/target-i386_pentium4_musl/libiconv-1.11.1/src'
/bin/sh ../libtool --mode=link i486-openwrt-linux-musl-gcc -L/home/jstaehle/prem2/depot/lede/staging_dir/target-i386_pentium4_musl/usr/lib -L/home/jstaehle/prem2/depot/lede/staging_dir/target-i386_pentium4_musl/lib -L/home/jstaehle/prem2/depot/lede/staging_dir/toolchain-i386_pentium4_gcc-7.2.0_musl/usr/lib -L/home/jstaehle/prem2/depot/lede/staging_dir/toolchain-i386_pentium4_gcc-7.2.0_musl/lib -znow -zrelro  iconv_no_i18n.o ../srclib/libicrt.a ../lib/libiconv.la -o iconv_no_i18n
i486-openwrt-linux-musl-gcc -znow -zrelro iconv_no_i18n.o -o iconv_no_i18n  -L/home/jstaehle/prem2/depot/lede/staging_dir/target-i386_pentium4_musl/usr/lib -L/home/jstaehle/prem2/depot/lede/staging_dir/target-i386_pentium4_musl/lib -L/home/jstaehle/prem2/depot/lede/staging_dir/toolchain-i386_pentium4_gcc-7.2.0_musl/usr/lib -L/home/jstaehle/prem2/depot/lede/staging_dir/toolchain-i386_pentium4_gcc-7.2.0_musl/lib ../srclib/libicrt.a ../lib/.libs/libiconv.so -Wl,--rpath -Wl,/home/jstaehle/prem2/depot/lede/build_dir/target-i386_pentium4_musl/libiconv-1.11.1/lib/.libs
../lib/.libs/libiconv.so: undefined reference to `aliases_lookup'
../lib/.libs/libiconv.so: undefined reference to `aliases2_lookup'
collect2: error: ld returned 1 exit status
Makefile:64: recipe for target 'iconv_no_i18n' failed
make[5]: *** [iconv_no_i18n] Error 1

Full build log is also attached

Tested with a full default configuration and only options enabled being GCC 7 and a modular option for the libiconv-full package, so that should rule out any external influence.

I did find one other reference to this issue on the LEDE forums a few months ago here: LEDE Forums: compilation fails on libiconv-full

01.11.20171137PackagesBug ReportVery LowLowdnsmasq static hosts configuration should support clien...TrunkUnconfirmed Task Description

By design, dnsmasq does not assume that two requests from the same source MAC address are for the same client if their client-id is different. Put another way, the requester is effectively identified by a <MAC,client-id> pair. This is discussed in the dnsmasq FAQ http://www.thekelleys.org.uk/dnsmasq/docs/FAQ under the question “I’m network booting my machines, and trying to give them static DHCP-assigned addresses...”

As a result, a machine that has been assigned a static address, which first requests an IP address without sending a client-id, and later makes a request with a client-id, will not be given the assigned static IP in response to the subsequent request. (The static IP will bind to the initial <MAC,client-id> pair with the null client-ID.)

To resolve this, one of the following options could be implemented:

  1. Mention the problem in the documentation, and advise the user to append “,id:*” to the MAC address if they run into this issue. (This will cause issues for luci users because this will be considered a malformed MAC address, and luci will refuse to save changes.)
  2. The dnsmasq init script could always insert “,id:*” immediately after the mac address on the generated dhcp-host configuration line.
  3. The dhcp.host entry could be extended with an “allow-any-client-id” or “ignore-client-id” boolean, which, if selected, would cause “,id:*” to be inserted as above.
  4. The dhcp.host entry could be extended with an optional “client-id” field, which would allow an explicit DHCP client-id to be set for the host. That ID could be used instead of or in addition to the existing “mac” entry. Semantics would need to be defined to make sure that the handling is well-defined.

Whichever option is chosen, the documentation should be updated. If an entry is added to the dhcp.host schema, bugs should be filed on other DHCP server packages (e.g.: isc-dhcp-server-ipv4) so that they can also implement the new functionality.

22.12.20171238PackagesBug ReportVery LowMediumcurl: https request returns 'Illegal instruction'TrunkUnconfirmed Task Description

Environment:

root@LEDE:~# cat /etc/os-release
NAME="LEDE"
VERSION="17.01.4, Reboot"
ID="lede"
ID_LIKE="lede openwrt"
PRETTY_NAME="LEDE Reboot 17.01.4"
VERSION_ID="17.01.4"
HOME_URL="http://lede-project.org/"
BUG_URL="http://bugs.lede-project.org/"
SUPPORT_URL="http://forum.lede-project.org/"
BUILD_ID="r3560-79f57e422d"
LEDE_BOARD="mpc85xx/generic"
LEDE_ARCH="powerpc_8540"
LEDE_TAINTS="no-all"
LEDE_DEVICE_MANUFACTURER="LEDE"
LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/"
LEDE_DEVICE_PRODUCT="Generic"
LEDE_DEVICE_REVISION="v0"
LEDE_RELEASE="LEDE Reboot 17.01.4 r3560-79f57e422d"

Description:

I’m using oficial stable release for TP-Link TL-WDR4900 v1 and when I try to use curl I give the following error:

root@LEDE:~# curl https://google.com
Illegal instruction

I have installed all curl dependencies and ca-certificates:

root@LEDE:~# opkg list-installed | egrep "ssl|curl|mbed|ddns"
curl - 7.52.1-6
ddns-scripts - 2.7.6-13
ddns-scripts_cloudflare.com-v4 - 2.7.6-13
libcurl - 7.52.1-6
libmbedtls - 2.6.0-1
libopenssl - 1.0.2n-1
luci-app-ddns - 2.4.8-2
openvpn-openssl - 2.4.4-2

And wget works well:

root@LEDE:~# wget https://google.com
--2017-12-18 13:25:10--  https://google.com/
Resolving google.com... 178.60.128.37, 178.60.128.42, 178.60.128.20, ...
Connecting to google.com|178.60.128.37|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://www.google.es/?gfe_rd=cr&dcr=0&ei=prM3Wp3qOeGs8wfNpI_gDg [following]
--2017-12-18 13:25:10--  https://www.google.es/?gfe_rd=cr&dcr=0&ei=prM3Wp3qOeGs8wfNpI_gDg
Resolving www.google.es... 172.217.21.67, 2a00:1450:4006:807::2003
Connecting to www.google.es|172.217.21.67|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: 'index.html'

index.html                                       [ <=>     ]  12.82K  81.4KB/s    in 0.2s    

2017-12-18 13:25:11 (81.4 KB/s) - 'index.html' saved [13132]

There is an issue with `curl - 7.52.1-6`?

22.12.20171239PackagesBug ReportVery LowLowuhttpd package comes with /etc/config/uhttpd file that ...TrunkUnconfirmed Task Description

Supply the following if possible:
- Device problem occurs on
- Software versions of LEDE release, packages, etc.
- Steps to reproduce

root@OpenWRT:~# cat /etc/openwrt_release
DISTRIB_ID=’OpenWrt’ DISTRIB_RELEASE=’SNAPSHOT’ DISTRIB_REVISION=’r5601-efa22b1’ DISTRIB_TARGET=’ar71xx/generic’ DISTRIB_ARCH=’mips_24kc’ DISTRIB_DESCRIPTION=’OpenWrt SNAPSHOT r5601-efa22b1’ DISTRIB_TAINTS=’’ root@OpenWRT:~# cat /etc/board.json
{

"model": {
	"id": "tl-wdr4300",
	"name": "TP-Link TL-WDR3600 v1"
},

...

to reproduce:
- install lede
- run lua/luci, modify configuration somehow and save, so that /etc/config/uhttpd is overwritten
- flash corresponding sysupgrade.bin with “[x] keepsettings” - ssh root@OpenWRT.localnet opkg update
- ssh root@OpenWRT.localnet opkg install luci-ssl strace snmpd snmp-mibs lsof rsyslog diffutils vim less

note in output:

Collected errors:
* resolve_conffiles: Existing conffile /etc/config/uhttpd is different from the conffile in the new package. The new conffile will be placed at /etc/config/uhttpd-opkg.
* resolve_conffiles: Existing conffile /etc/config/luci is different from the conffile in the new package. The new conffile will be placed at /etc/config/luci-opkg.

The contents of uhttpd-opkg and uhttpd are quite the same, the lua/luci version being without comments and with ‘quoted’ values (see attached file).

A resolution of “wont fix” would be absolutely acceptable.

Kind regards,
Dominik

28.01.20181305PackagesBug ReportVery LowLowNot working UAS driver for usb hdd case ORICO 2599US3-V...TrunkUnconfirmed Task Description

- Xiaomi Mi Router 3G
- OpenWrt/LEDE trunk with kmod-usb-storage-uas package.
- After fresh install trunk version and kmod-usb-storage-uas drivers for USB storage have error:

[  457.174784] scsi host0: uas
[  457.178931] xhci-mtk 1e1c0000.xhci: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  457.188303] xhci-mtk 1e1c0000.xhci: @000000000fded170 0ee20000 00000000 05000000 01058001
[  457.196514] xhci-mtk 1e1c0000.xhci: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  457.205879] xhci-mtk 1e1c0000.xhci: @000000000fded180 0ee20100 00000000 05000000 01078001
[  464.441727] Data buffer not 16 bytes aligned: 8ee2c458
[  464.469820] Data buffer not 16 bytes aligned: 8ee2c0d8
[  464.477079] Data buffer not 16 bytes aligned: 8ee2c368
[  477.979944] scsi 0:0:0:0: tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
[  477.987509] scsi 0:0:0:0: tag#0 CDB: opcode=0x12 12 00 00 00 24 00
[  479.029938] scsi host0: uas_eh_bus_reset_handler FAILED to get lock err -16
[  479.036896] scsi 0:0:0:0: Device offlined - not ready after error recovery
 

FULL log

[    0.000000] Linux version 4.9.77 (buildbot@builds) (gcc version 5.5.0 (OpenWrt GCC 5.5.0 r5972-74beb6f) ) #0 SMP Sun Jan 28 07:53:50 2018
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is Xiaomi Mi Router 3G
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 10000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] On node 0 totalpages: 65536
[    0.000000] free_area_init_node: node 0, pgdat 80519c20, node_mem_map 81003000
[    0.000000]   Normal zone: 512 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    0.000000] percpu: Embedded 12 pages/cpu @8120f000 s17744 r8192 d23216 u49152
[    0.000000] pcpu-alloc: s17744 r8192 d23216 u49152 alloc=12*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyS0,115200n8 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Writing ErrCtl register=00022211
[    0.000000] Readback ErrCtl register=00022211
[    0.000000] Memory: 253888K/262144K available (4083K kernel code, 221K rwdata, 920K rodata, 204K init, 272K bss, 8256K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:256
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000010] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.007796] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.070423] pid_max: default: 32768 minimum: 301
[    0.075160] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.081686] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.095326] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.095339] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.095351] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.095506] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.177455] Synchronize counters for CPU 1:
[    0.177457] done.
[    0.190893] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.190901] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.190910] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.190995] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.269476] Synchronize counters for CPU 2:
[    0.269477] done.
[    0.279363] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.279371] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.279379] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.279472] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.354659] Synchronize counters for CPU 3:
[    0.354660] done.
[    0.360901] Brought up 4 CPUs
[    0.367821] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.377613] futex hash table entries: 1024 (order: 3, 32768 bytes)
[    0.383863] pinctrl core: initialized pinctrl subsystem
[    0.389755] NET: Registered protocol family 16
[    0.403515] FPU Affinity set after 11720 emulations
[    0.449650] pull PCIe RST: RALINK_RSTCTRL = 4000000
[    0.754956] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.760005] ***** Xtal 40MHz *****
[    0.763360] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.768459] Port 0 N_FTS = 1b105000
[    0.771934] Port 1 N_FTS = 1b105000
[    0.775368] Port 2 N_FTS = 1b102800
[    1.930662] PCIE2 no card, disable it(RST&CLK)
[    1.935027]  -> 21007f2
[    1.937422] PCIE0 enabled
[    1.940014] PCIE1 enabled
[    1.942610] PCI host bridge /pcie@1e140000 ranges:
[    1.947395]  MEM 0x0000000060000000..0x000000006fffffff
[    1.952552]   IO 0x000000001e160000..0x000000001e16ffff
[    1.957754] PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[    2.009324] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.015156] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.020966] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.027884] PCI host bridge to bus 0000:00
[    2.031941] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    2.038727] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    2.044616] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    2.051341] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    2.059269] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[    2.059300] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    2.059312] pci 0000:00:00.0: reg 0x14: [mem 0x60300000-0x6030ffff]
[    2.059374] pci 0000:00:00.0: supports D1
[    2.059383] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    2.059617] pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400
[    2.059641] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    2.059656] pci 0000:00:01.0: reg 0x14: [mem 0x60310000-0x6031ffff]
[    2.059705] pci 0000:00:01.0: supports D1
[    2.059713] pci 0000:00:01.0: PME# supported from D0 D1 D3hot
[    2.060115] pci 0000:01:00.0: [14c3:7603] type 00 class 0x028000
[    2.060145] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[    2.060267] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    2.060466] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    2.060648] pci 0000:02:00.0: [14c3:7662] type 00 class 0x028000
[    2.060683] pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    2.060728] pci 0000:02:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    2.060816] pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
[    2.061016] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    2.061034] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 02
[    2.061093] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    2.067602] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.074545] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    2.081087] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.088015] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    2.094738] pci 0000:00:01.0: BAR 8: assigned [mem 0x60100000-0x601fffff]
[    2.101497] pci 0000:00:01.0: BAR 9: assigned [mem 0x60200000-0x602fffff pref]
[    2.108649] pci 0000:00:00.0: BAR 1: assigned [mem 0x60300000-0x6030ffff]
[    2.115404] pci 0000:00:01.0: BAR 1: assigned [mem 0x60310000-0x6031ffff]
[    2.122138] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff]
[    2.128881] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.133788] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    2.140555] pci 0000:02:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit]
[    2.147793] pci 0000:02:00.0: BAR 6: assigned [mem 0x60200000-0x6020ffff pref]
[    2.154968] pci 0000:00:01.0: PCI bridge to [bus 02]
[    2.159885] pci 0000:00:01.0:   bridge window [mem 0x60100000-0x601fffff]
[    2.166635] pci 0000:00:01.0:   bridge window [mem 0x60200000-0x602fffff pref]
[    2.173807] BAR0 at slot 0 = 0
[    2.176821] bus=0x0, slot = 0x0
[    2.179929] BAR0 at slot 1 = 0
[    2.182941] bus=0x0, slot = 0x1
[    2.186059] bus=0x1, slot = 0x0, irq=0xff
[    2.190052] bus=0x2, slot = 0x1, irq=0xff
[    2.195374] clocksource: Switched to clocksource GIC
[    2.201886] NET: Registered protocol family 2
[    2.206991] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    2.213879] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    2.220380] TCP: Hash tables configured (established 2048 bind 2048)
[    2.226740] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    2.232503] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    2.238991] NET: Registered protocol family 1
[    2.243310] PCI: CLS 80 bytes, default 32
[    2.475320] 4 CPUs re-calibrate udelay(lpj = 2924544)
[    2.481720] Crashlog allocated RAM at address 0x3f00000
[    2.487253] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    2.497205] random: fast init done
[    2.503153] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.508957] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.521334] io scheduler noop registered
[    2.525170] io scheduler deadline registered (default)
[    2.530800] gpio-export gpio_export: 1 gpio(s) exported
[    2.536631] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    2.546698] console [ttyS0] disabled
[    2.550247] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 18, base_baud = 3125000) is a 16550A
[    2.559239] console [ttyS0] enabled
[    2.566106] bootconsole [early0] disabled
[    2.575604] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[    2.582660] Allocate 16 byte aligned buffer: 80588360
[    2.587709] Enable NFI Clock
[    2.590575] # MTK NAND # : Use HW ECC
[    2.594233] Device not found, ID: c8d1
[    2.597975] Not Support this Device!
[    2.601702] chip_mode=00000001
[    2.604750] Support this Device in MTK table! c8d1
[    2.609710] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[    2.616186] nand: device found, Manufacturer ID: 0xc8, Chip ID: 0xd1
[    2.622507] nand: ESMT NAND 128MiB 3,3V 8-bit
[    2.626855] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    2.634399] Scanning device for bad blocks
[    2.784501] 10 ofpart partitions found on MTD device MT7621-NAND
[    2.790493] Creating 10 MTD partitions on "MT7621-NAND":
[    2.795810] 0x000000000000-0x000000080000 : "Bootloader"
[    2.802545] 0x000000080000-0x0000000c0000 : "Config"
[    2.808805] 0x0000000c0000-0x000000100000 : "Bdata"
[    2.814961] 0x000000100000-0x000000140000 : "Factory"
[    2.821369] 0x000000140000-0x000000180000 : "crash"
[    2.827570] 0x000000180000-0x0000001c0000 : "crash_syslog"
[    2.834259] 0x0000001c0000-0x000000200000 : "reserved0"
[    2.840866] 0x000000200000-0x000000600000 : "kernel_stock"
[    2.847705] 0x000000600000-0x000000a00000 : "kernel"
[    2.853942] 0x000000a00000-0x000007f80000 : "ubi"
[    2.860898] [mtk_nand] probe successfully!
[    2.865771] Signature matched and data read!
[    2.870021] load_fact_bbt success 1023
[    2.874429] libphy: Fixed MDIO Bus: probed
[    2.947980] libphy: mdio: probed
[    4.350751] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[    4.357511] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 20
[    4.368063] NET: Registered protocol family 10
[    4.374121] NET: Registered protocol family 17
[    4.378695] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    4.391609] 8021q: 802.1Q VLAN Support v1.8
[    4.398759] UBI: auto-attach mtd9
[    4.402087] ubi0: attaching mtd9
[    4.618462] mtk_soc_eth 1e100000.ethernet eth0: port 1 link up
[    5.521109] ubi0: scanning is finished
[    5.541359] ubi0: attached mtd9 (name "ubi", size 117 MiB)
[    5.546892] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    5.553734] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    5.560504] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    5.567456] ubi0: good PEBs: 940, bad PEBs: 0, corrupted PEBs: 0
[    5.573433] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    5.580638] ubi0: max/mean erase counter: 13/8, WL threshold: 4096, image sequence number: 2038926528
[    5.589837] ubi0: available PEBs: 0, total reserved PEBs: 940, PEBs reserved for bad PEB handling: 20
[    5.599059] ubi0: background thread "ubi_bgt0d" started, PID 375
[    5.601341] block ubiblock0_0: created from ubi0:0(rootfs)
[    5.601351] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    5.601368] hctosys: unable to open rtc device (rtc0)
[    5.628756] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    5.636357] Freeing unused kernel memory: 204K
[    5.640789] This architecture does not have kernel memory protection.
[    6.074383] init: Console is alive
[    6.078103] init: - watchdog -
[    6.598228] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.689821] usbcore: registered new interface driver usbfs
[    6.695512] usbcore: registered new interface driver hub
[    6.700979] usbcore: registered new device driver usb
[    6.715182] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    6.720568] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
[    6.735589] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x00210010
[    6.744061] xhci-mtk 1e1c0000.xhci: irq 19, io mem 0x1e1c0000
[    6.750901] hub 1-0:1.0: USB hub found
[    6.754722] hub 1-0:1.0: 2 ports detected
[    6.759206] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    6.764511] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
[    6.772203] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    6.781167] hub 2-0:1.0: USB hub found
[    6.784977] hub 2-0:1.0: 1 port detected
[    6.791578] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.815674] init: - preinit -
[    7.225713] usb 2-1: new SuperSpeed USB device number 2 using xhci-mtk
[    7.959769] mtk_soc_eth 1e100000.ethernet eth0: port 2 link up
[   10.669578] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 466
[   10.743280] UBIFS (ubi0:1): recovery needed
[   11.027687] UBIFS (ubi0:1): recovery completed
[   11.032307] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   11.040127] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   11.050019] UBIFS (ubi0:1): FS size: 112754688 bytes (107 MiB, 888 LEBs), journal size 5586944 bytes (5 MiB, 44 LEBs)
[   11.060604] UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
[   11.067215] UBIFS (ubi0:1): media format: w4/r0 (latest is w4/r0), UUID 20B5BE78-6BF9-4D9C-97D0-63EEEE29FCD2, small LPT model
[   11.089886] mount_root: overlay filesystem has not been fully initialized yet
[   11.099816] mount_root: switching to ubifs overlay
[   11.120963] urandom-seed: Seed file not found (/etc/urandom.seed)
[   11.206878] procd: - early -
[   11.209848] procd: - watchdog -
[   11.915518] procd: - watchdog -
[   11.918952] procd: - ubus -
[   11.977423] procd: - init -
[   12.220332] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.230433] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   12.243720] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[   12.251747] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[   12.260419] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.272071] nf_conntrack version 0.5.0 (4096 buckets, 16384 max)
[   12.311093] xt_time: kernel timezone is -0000
[   12.364278] mt7603e 0000:01:00.0: ASIC revision: 76030010
[   12.395013] mt7603e 0000:01:00.0: Firmware Version: ap_pcie
[   12.400808] mt7603e 0000:01:00.0: Build Time: 20160107100755
[   12.445412] firmware init done
[   12.617059] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   12.624541] mt76x2e 0000:02:00.0: ASIC revision: 76120044
[   12.655444] mt76x2e 0000:02:00.0: ROM patch already applied
[   12.662251] mt76x2e 0000:02:00.0: Firmware Version: 0.0.00
[   12.667798] mt76x2e 0000:02:00.0: Build: 1
[   12.671877] mt76x2e 0000:02:00.0: Build Time: 201507311614____
[   12.705439] mt76x2e 0000:02:00.0: Firmware running!
[   12.711683] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   12.719726] PPP generic driver version 2.4.2
[   12.725836] NET: Registered protocol family 24
[   12.733132] kmodloader: done loading kernel modules from /etc/modules.d/*
[   19.603555] device eth0 entered promiscuous mode
[   19.610919] br-lan: port 1(eth0.1) entered blocking state
[   19.616476] br-lan: port 1(eth0.1) entered disabled state
[   19.622586] device eth0.1 entered promiscuous mode
[   19.634503] br-lan: port 1(eth0.1) entered blocking state
[   19.639985] br-lan: port 1(eth0.1) entered forwarding state
[   19.646017] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   20.605960] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   22.159899] random: crng init done
[  191.009312] Data buffer not 16 bytes aligned: 8e40c028
[  191.017026] Data buffer not 16 bytes aligned: 8e40c508
[  191.025523] Data buffer not 16 bytes aligned: 8e40c238
[  191.034117] Data buffer not 16 bytes aligned: 8e40c198
[  191.052419] Data buffer not 16 bytes aligned: 8e40c4f8
[  191.066409] Data buffer not 16 bytes aligned: 8e40c278
[  191.081738] Data buffer not 16 bytes aligned: 8e40c1c8
[  191.096954] Data buffer not 16 bytes aligned: 8e40c088
[  191.111147] Data buffer not 16 bytes aligned: 8e40c028
[  191.139460] Data buffer not 16 bytes aligned: 8e40c018
[  191.161243] Data buffer not 16 bytes aligned: 8e40c028
[  191.176451] Data buffer not 16 bytes aligned: 8e40c128
[  191.193724] Data buffer not 16 bytes aligned: 8e40c018
[  191.213324] Data buffer not 16 bytes aligned: 8e40c078
[  191.225880] Data buffer not 16 bytes aligned: 8e40c2a8
[  191.265755] Data buffer not 16 bytes aligned: 8e40c158
[  191.278589] Data buffer not 16 bytes aligned: 8e40c138
[  191.289159] Data buffer not 16 bytes aligned: 8e40c248
[  191.317077] Data buffer not 16 bytes aligned: 8e40c278
[  191.334425] Data buffer not 16 bytes aligned: 8e40c0e8
[  191.350534] Data buffer not 16 bytes aligned: 8e40c0f8
[  283.715442] kmodloader: loading kernel modules from /etc/modules.d/*
[  283.733985] SCSI subsystem initialized
[  283.745511] usbcore: registered new interface driver usb-storage
[  283.751874] kmodloader: done loading kernel modules from /etc/modules.d/*
[  283.816960] kmodloader: loading kernel modules from /etc/modules.d/*
[  283.825496] kmodloader: done loading kernel modules from /etc/modules.d/*
[  313.727224] Data buffer not 16 bytes aligned: 8ee38068
[  313.741091] Data buffer not 16 bytes aligned: 8ee38128
[  313.749533] Data buffer not 16 bytes aligned: 8ee38078
[  313.756765] Data buffer not 16 bytes aligned: 8ee383d8
[  313.785037] Data buffer not 16 bytes aligned: 8ee38128
[  313.795667] Data buffer not 16 bytes aligned: 8ee38258
[  313.805290] Data buffer not 16 bytes aligned: 8ee38418
[  313.813705] Data buffer not 16 bytes aligned: 8ee381a8
[  313.822188] Data buffer not 16 bytes aligned: 8ee380d8
[  313.840545] Data buffer not 16 bytes aligned: 8ee38438
[  313.848969] Data buffer not 16 bytes aligned: 8ee382d8
[  434.295326] kmodloader: loading kernel modules from /etc/modules.d/*
[  434.305009] usbcore: registered new interface driver ums-alauda
[  434.312020] usbcore: registered new interface driver ums-cypress
[  434.319060] usbcore: registered new interface driver ums-datafab
[  434.326131] usbcore: registered new interface driver ums-freecom
[  434.333240] usbcore: registered new interface driver ums-isd200
[  434.340310] usbcore: registered new interface driver ums-jumpshot
[  434.347438] usbcore: registered new interface driver ums-karma
[  434.354646] usbcore: registered new interface driver ums-sddr09
[  434.361748] usbcore: registered new interface driver ums-sddr55
[  434.368806] usbcore: registered new interface driver ums-usbat
[  434.374965] kmodloader: done loading kernel modules from /etc/modules.d/*
[  457.162257] kmodloader: loading kernel modules from /etc/modules.d/*
[  457.174784] scsi host0: uas
[  457.178931] xhci-mtk 1e1c0000.xhci: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  457.188303] xhci-mtk 1e1c0000.xhci: @000000000fded170 0ee20000 00000000 05000000 01058001
[  457.196514] xhci-mtk 1e1c0000.xhci: ERROR Transfer event for disabled endpoint or incorrect stream ring
[  457.205879] xhci-mtk 1e1c0000.xhci: @000000000fded180 0ee20100 00000000 05000000 01078001
[  464.441727] Data buffer not 16 bytes aligned: 8ee2c458
[  464.469820] Data buffer not 16 bytes aligned: 8ee2c0d8
[  464.477079] Data buffer not 16 bytes aligned: 8ee2c368
[  477.979944] scsi 0:0:0:0: tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
[  477.987509] scsi 0:0:0:0: tag#0 CDB: opcode=0x12 12 00 00 00 24 00
[  479.029938] scsi host0: uas_eh_bus_reset_handler FAILED to get lock err -16
[  479.036896] scsi 0:0:0:0: Device offlined - not ready after error recovery
[  479.044393] usbcore: registered new interface driver uas
[  479.050016] kmodloader: done loading kernel modules from /etc/modules.d/*
02.02.20181321PackagesBug ReportVery LowLowUCI potential invalid memory access when updating exist...TrunkUnconfirmed Task Description

- Software versions

UCI 2018-01-01

- Device problem occurs on

There is a potential memory leak when updating existing section in list.c:709

Return pointer from realloc may not be the same as ptr→s. Due to realloc mechanism, pointers value from ptr→s→options are copied to the ptr→last. However, those pointers (ptr→last→s→options) are pointing back to the ptr→s which has been freed.

Below are steps to reproduce.

- Steps to reproduce

 

Given a config file like that

cat /etc/config/network
config interface wan

Given test codes like that

#include <uci.h>

int main(int argc, const char *argv[])
{
    struct uci_context *uci_ctx = uci_alloc_context();
    struct uci_ptr ptr          = {0};
    ptr.package                 = "network";
    ptr.section                 = "wan";
    ptr.value                   = "interface";
    uci_lookup_ptr(uci_ctx, &ptr, NULL, false);
    uci_set(uci_ctx, &ptr);
    uci_save(uci_ctx, ptr.p);
    uci_commit(uci_ctx, &ptr.p, false);
    uci_free_context(uci_ctx);

    return 0;
}

Runs like that

cd UCI_PROJECT_ROOT
mkdir build
cmake ..
make
valgrind ./test/test_mem_leak_section
.... CTRL-C after a while ....

Here is the output of valgrind before the hotfix below

==1567== Memcheck, a memory error detector
==1567== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==1567== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==1567== Command: ./test/test_mem_leak_section
==1567== 
==1567== Invalid write of size 8
==1567==    at 0x4E3946B: uci_list_del (uci_internal.h:116)
==1567==    by 0x4E3946B: uci_free_element (list.c:71)
==1567==    by 0x4E394F4: uci_free_section (list.c:211)
==1567==    by 0x4E39590: uci_free_package (list.c:243)
==1567==    by 0x4E39C97: uci_free_context (libuci.c:84)
==1567==    by 0x400719: main (test_mem_leak_section.c:12)
==1567==  Address 0x561a850 is 32 bytes inside a block of size 82 free'd
==1567==    at 0x4C2CE8E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1567==    by 0x4E3C4FE: uci_realloc (util.c:49)
==1567==    by 0x4E3AC77: uci_set (list.c:709)
==1567==    by 0x400711: main (test_mem_leak_section.c:11)
==1567== 
==1567== Invalid write of size 8
==1567==    at 0x4E3946E: uci_list_del (uci_internal.h:117)
==1567==    by 0x4E3946E: uci_free_element (list.c:71)
==1567==    by 0x4E394F4: uci_free_section (list.c:211)
==1567==    by 0x4E39590: uci_free_package (list.c:243)
==1567==    by 0x4E39C97: uci_free_context (libuci.c:84)
==1567==    by 0x400719: main (test_mem_leak_section.c:12)
==1567==  Address 0x561a858 is 40 bytes inside a block of size 82 free'd
==1567==    at 0x4C2CE8E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1567==    by 0x4E3C4FE: uci_realloc (util.c:49)
==1567==    by 0x4E3AC77: uci_set (list.c:709)
==1567==    by 0x400711: main (test_mem_leak_section.c:11)
==1567== 
==1567== Invalid read of size 8
==1567==    at 0x4E394F8: uci_free_section (list.c:210)
==1567==    by 0x4E39590: uci_free_package (list.c:243)
==1567==    by 0x4E39C97: uci_free_context (libuci.c:84)
==1567==    by 0x400719: main (test_mem_leak_section.c:12)
==1567==  Address 0x561a850 is 32 bytes inside a block of size 82 free'd
==1567==    at 0x4C2CE8E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1567==    by 0x4E3C4FE: uci_realloc (util.c:49)
==1567==    by 0x4E3AC77: uci_set (list.c:709)
==1567==    by 0x400711: main (test_mem_leak_section.c:11)
==1567== 
==1567== Invalid read of size 4
==1567==    at 0x4E39486: uci_free_option (list.c:97)
==1567==    by 0x4E394F4: uci_free_section (list.c:211)
==1567==    by 0x4E39590: uci_free_package (list.c:243)
==1567==    by 0x4E39C97: uci_free_context (libuci.c:84)
==1567==    by 0x400719: main (test_mem_leak_section.c:12)
==1567==  Address 0x561a878 is 72 bytes inside a block of size 82 free'd
==1567==    at 0x4C2CE8E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1567==    by 0x4E3C4FE: uci_realloc (util.c:49)
==1567==    by 0x4E3AC77: uci_set (list.c:709)
==1567==    by 0x400711: main (test_mem_leak_section.c:11)
==1567== 
==1567== Invalid read of size 8
==1567==    at 0x4E39456: uci_free_element (list.c:69)
==1567==    by 0x4E394F4: uci_free_section (list.c:211)
==1567==    by 0x4E39590: uci_free_package (list.c:243)
==1567==    by 0x4E39C97: uci_free_context (libuci.c:84)
==1567==    by 0x400719: main (test_mem_leak_section.c:12)
==1567==  Address 0x561a868 is 56 bytes inside a block of size 82 free'd
==1567==    at 0x4C2CE8E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1567==    by 0x4E3C4FE: uci_realloc (util.c:49)
==1567==    by 0x4E3AC77: uci_set (list.c:709)
==1567==    by 0x400711: main (test_mem_leak_section.c:11)
==1567== 
==1567== Invalid read of size 8
==1567==    at 0x4E3945F: uci_free_element (list.c:70)
==1567==    by 0x4E394F4: uci_free_section (list.c:211)
==1567==    by 0x4E39590: uci_free_package (list.c:243)
==1567==    by 0x4E39C97: uci_free_context (libuci.c:84)
==1567==    by 0x400719: main (test_mem_leak_section.c:12)
==1567==  Address 0x561a850 is 32 bytes inside a block of size 82 free'd
==1567==    at 0x4C2CE8E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1567==    by 0x4E3C4FE: uci_realloc (util.c:49)
==1567==    by 0x4E3AC77: uci_set (list.c:709)
==1567==    by 0x400711: main (test_mem_leak_section.c:11)
==1567== 
==1567== Invalid free() / delete / delete[] / realloc()
==1567==    at 0x4C2BDEC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1567==    by 0x4E394F4: uci_free_section (list.c:211)
==1567==    by 0x4E39590: uci_free_package (list.c:243)
==1567==    by 0x4E39C97: uci_free_context (libuci.c:84)
==1567==    by 0x400719: main (test_mem_leak_section.c:12)
==1567==  Address 0x561a850 is 32 bytes inside a block of size 82 free'd
==1567==    at 0x4C2CE8E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1567==    by 0x4E3C4FE: uci_realloc (util.c:49)
==1567==    by 0x4E3AC77: uci_set (list.c:709)
==1567==    by 0x400711: main (test_mem_leak_section.c:11)
==1567== 
^C
==1567== 
==1567== HEAP SUMMARY:
==1567==     in use at exit: 973 bytes in 17 blocks
==1567==   total heap usage: 189 allocs, 408,927 frees, 8,483 bytes allocated
==1567== 
==1567== LEAK SUMMARY:
==1567==    definitely lost: 0 bytes in 0 blocks
==1567==    indirectly lost: 0 bytes in 0 blocks
==1567==      possibly lost: 0 bytes in 0 blocks
==1567==    still reachable: 973 bytes in 17 blocks
==1567==         suppressed: 0 bytes in 0 blocks
==1567== Rerun with --leak-check=full to see details of leaked memory
==1567== 
==1567== For counts of detected and suppressed errors, rerun with: -v
==1567== ERROR SUMMARY: 2043783 errors from 7 contexts (suppressed: 0 from 0)

- Hot fix

-			ptr->last = NULL;
-			ptr->last = uci_realloc(ctx, ptr->s, sizeof(struct uci_section));
-			ptr->s = uci_to_section(ptr->last);
-			uci_list_fixup(&ptr->s->e.list);
+			ptr->last = (struct uci_element *) ptr->s;

Please take a look the attachment. It includes my hot fix for this issue and corresponding demo codes as illustrated above.

I am not sure how to “update” the “uci_options” associated to the “uci_section”. So, I simply omit and replace the realloc part.

Tested by valgrind again

valgrind ./test/test_mem_leak_section 
==1749== Memcheck, a memory error detector
==1749== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==1749== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==1749== Command: ./test/test_mem_leak_section
==1749== 
==1749== 
==1749== HEAP SUMMARY:
==1749==     in use at exit: 0 bytes in 0 blocks
==1749==   total heap usage: 392 allocs, 392 frees, 23,574 bytes allocated
==1749== 
==1749== All heap blocks were freed -- no leaks are possible
==1749== 
==1749== For counts of detected and suppressed errors, rerun with: -v
==1749== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)


19.02.20181374PackagesBug ReportVery LowHighubox: logd memory leak AllUnconfirmed Task Description

I checked the use of memory with `top` command and saw that the logd was consuming memory disproportionately (around 60MB).

```
PID PPID USER STAT VSZ VSZ %CPU COMMAND
971 1 root S 59768 48% 0% /sbin/logd -S 64
```

- There was no remote log configured.
- I was using logread -f for a long time.
- When doing an /etc/init.d/log restart the consumed memory returned to normality.
- ubox version:

```
PKG_SOURCE_DATE:=2017-09-01
PKG_SOURCE_VERSION:=b1bc8d5fb874cdd22701a08d0fb0de4330f86814
PKG_MIRROR_HASH:=b07e750d941d691e2745aa3a058e504966b15d1db5636162dc686bad275eb296
```


02.03.20181404PackagesFeature RequestVery LowLowRFE : in package "gpsd" init / config : a way to bring ...TrunkUnconfirmed Task Description

FYI, I fixed a build bug in gpsd that allows using gpsd with CANbus / NMEA 2000 : FS#783

Now, it would nice to have a way to initialize the CANbus.

For example, the “8 devices USB2CAN” adapter ( https://www.8devices.com/products/usb2can ) needs :

ip link set can0 type can bitrate 250000

... and the CANable adapter ( http://canable.io/ ) needs :

slcan_attach -w -o -c -s5 /dev/ttyACM0 &

ip link set up slcan0

... after that gpsd can be configured with

gpsd.device=”nmea2000://slcan0”

... and it should work

24.03.20181454PackagesBug ReportVery LowLowargp-standalone: option ARGP_NO_ERRS is not honouredTrunkUnconfirmed Task Description

Symptom: error message is written for invalid option even with ARGP_NO_ERRS set in function argp_parse

 

Verified on ar71xx / mips_24kc / wndr3700 and mpc85xx / powerpc_8540 / tl-wdr4900
OpenWrt / LEDE trunk OpenWrt SNAPSHOT, r6548-8e1065d681

Found a problem when working with a software project where the LEDE / OpenWrt binary issues an error message for an invalid option when starting the binary while the debian / ubuntu linux version does not. I tracked it down to the fact that it must be a bug in the argp-standalone library of OpenWrt / LEDE where the option ARGP_NO_ERRS in function argp_parse is not honoured.

To reproduce I wrote a little demo program which works fine on debian and ubuntu but shows the invalid behaviour on OpenWrt / LEDE.

The demo program is hosted on https://github.com/tru7/argp-demo where I have also provided a feed named Makefile.lede to build the package on OpenWrt / LEDE.

I have no skills in coding and absolutely no skills in debugging, so this is about all I can do about this.

30.03.20181463PackagesBug ReportVery LowMediumnetifd disagrees with static route documentationTrunkUnconfirmed Task Description

https://openwrt.org/docs/guide-user/network/routes_configuration says, of the static route “gateway” configuration variable, “If omitted, the gateway from the parent interface is taken; if set to 0.0.0.0 no gateway will be specified for the route”. However, netifd HEAD does not distinguish all zeros from unset. In particular, https://git.openwrt.org/?p=project/netifd.git;a=blob;f=interface-ip.c;h=1c84d4f8afed8bbe8af9fcc868fb1472b048019d;hb=HEAD#l343 is the only place where ROUTE_GATEWAY is decoded from a blob message and will leave route→nexthop all zeros if none is provided:

 343         if ((cur = tb[ROUTE_GATEWAY]) != NULL) {
 344                 if (!inet_pton(af, blobmsg_data(cur), &route->nexthop)) {
 345                         DPRINTF("Failed to parse route gateway: %s\n", (char *) blobmsg_data(cur));
 346                         goto error;
 347                 }
 348         }

When it comes time to actually use the resulting route→nexthop value, https://git.openwrt.org/?p=project/netifd.git;a=blob;f=system-linux.c;h=0ca525602d9ea63ac5b845b2be9c6c7bdec7c26c;hb=HEAD#l1851 just checks for all-zeros and, if so, declares it to be a link-local route:

1851         if (alen == 4)
1852                 have_gw = !!route->nexthop.in.s_addr;
1853         else
1854                 have_gw = route->nexthop.in6.s6_addr32[0] ||
1855                         route->nexthop.in6.s6_addr32[1] ||
1856                         route->nexthop.in6.s6_addr32[2] ||
1857                         route->nexthop.in6.s6_addr32[3];
...
1882                         rtm.rtm_scope = (have_gw) ? RT_SCOPE_UNIVERSE : RT_SCOPE_LINK;
...
1925         if (have_gw)
1926                 nla_put(msg, RTA_GATEWAY, alen, &route->nexthop);

I believe that struct device_route needs a flag to indicate whether the incoming blobmsg had a ROUTE_GATEWAY or not, and that system_rt should use the device’s configured default gateway if not. There is, at present, no workaround except to hard-code the next hop in the configuration, which is gross.

12.04.20181486PackagesBug ReportVery LowLow`ping` from `iputils-ping` is not respecting the `-I` o...TrunkUnconfirmed Task Description

There’re two WAN connections in my router. I installed `iputils-ping` for some fancy features. If I use `ping -I wan2 x.x.x.x`, the ICMP Echo request will still be sent from the main wan interface, ignoring the `-I` option. Busybox ping doesn’t have this problem.

The iputils-* packages are version 20101006. This issue is solved by this commit and I suggest that the iputils packages should be updated.

11.05.20181543PackagesBuild FailureVery LowCriticalMany packages in snapshot failing on one build, ok on n...TrunkUnconfirmed Task Description

Snapshot/Packages
Occurs on all architectures apparently at random with faillogs.
After next build some that failed will be ok and some that previously built will fail.
eg submit a PR on https://github.com/openwrt/packages Travis shows fail on dependencies. After next automated build, Travis errors will be different, or if lucky will pass, only to fail again after the next build.
It seems the build system is chasing its tail somehow.

09.06.20181584PackagesBug ReportVery LowLowOmcproxy CrashloopTrunkUnconfirmed Task Description

- Device problem occurs on

Tp-Link Archer C7 v.4

- Software versions of OpenWrt/LEDE release, packages, etc.

System version: OpenWrt SNAPSHOT r7115-8796680

Package version: omcproxy (2017-02-14-1fe6f48f-4)

- Steps to reproduce

Install Omcproxy and you see in the log:

” Sat Jun 9 14:44:12 2018 kern.info kernel: [93170.004602] do_page_fault(): sending SIGSEGV to omcproxy for invalid read access from 00000008
Sat Jun 9 14:44:12 2018 kern.info kernel: [93170.013655] epc = 004048d5 in omcproxy[400000+6000]
Sat Jun 9 14:44:12 2018 kern.info kernel: [93170.018710] ra = 00401225 in omcproxy[400000+6000]
Sat Jun 9 14:44:17 2018 kern.info kernel: [93175.064523] do_page_fault(): sending SIGSEGV to omcproxy for invalid read access from 00000008
Sat Jun 9 14:44:17 2018 kern.info kernel: [93175.073623] epc = 004048d5 in omcproxy[400000+6000]
Sat Jun 9 14:44:17 2018 kern.info kernel: [93175.078700] ra = 00401225 in omcproxy[400000+6000]
Sat Jun 9 14:44:23 2018 kern.info kernel: [93180.091827] do_page_fault(): sending SIGSEGV to omcproxy for invalid read access from 00000008
Sat Jun 9 14:44:23 2018 kern.info kernel: [93180.100819] epc = 004048d5 in omcproxy[400000+6000]
Sat Jun 9 14:44:23 2018 kern.info kernel: [93180.105923] ra = 00401225 in omcproxy[400000+6000]
Sat Jun 9 14:44:28 2018 kern.info kernel: [93185.116772] do_page_fault(): sending SIGSEGV to omcproxy for invalid read access from 00000008
Sat Jun 9 14:44:28 2018 kern.info kernel: [93185.125753] epc = 004048d5 in omcproxy[400000+6000]
Sat Jun 9 14:44:28 2018 kern.info kernel: [93185.130807] ra = 00401225 in omcproxy[400000+6000]
Sat Jun 9 14:44:33 2018 kern.info kernel: [93190.142183] do_page_fault(): sending SIGSEGV to omcproxy for invalid read access from 00000008
Sat Jun 9 14:44:33 2018 kern.info kernel: [93190.151123] epc = 004048d5 in omcproxy[400000+6000]
Sat Jun 9 14:44:33 2018 kern.info kernel: [93190.156230] ra = 00401225 in omcproxy[400000+6000]
Sat Jun 9 14:44:38 2018 kern.info kernel: [93195.169040] do_page_fault(): sending SIGSEGV to omcproxy for invalid read access from 00000008
Sat Jun 9 14:44:38 2018 kern.info kernel: [93195.178006] epc = 004048d5 in omcproxy[400000+6000]
Sat Jun 9 14:44:38 2018 kern.info kernel: [93195.183084] ra = 00401225 in omcproxy[400000+6000]
Sat Jun 9 14:44:38 2018 daemon.info procd: Instance omcproxy::instance1 s in a crash loop 6 crashes, 0 seconds since last crash

This started happening about two weeks ago, sorry I can’t tell what version specifically.

If there is another software that i can use instead please let me know.
If not, I’d like some help to find documentation to configure omcproxy.

Thanks!

25.06.20181611PackagesBug ReportVery LowMediumMissing files for ZyXEL P2812-HNU-FXopenwrt-18.06Unconfirmed Task Description

The ‘Supplementary Files’ section of lantiq/xrx200 contains only a u-boot-p2812hnufx_ram.

To install OpenWRT on an OEM box a u-boot-nand, uImage and initramfs are needed according to the install instructions.

https://openwrt.org/toh/zyxel/p2812hnu-f1

 


12.07.20181648PackagesFeature RequestVery LowLowPlease build busybox swapon with discard supportopenwrt-18.06Unconfirmed Task Description

Busybox supports swap discard mounting since late March 2014[1]. Zram suports TRIM/discard since early April 2014[2]. On OpenWrt systems with zram-swap, being able to mount the zram swap space as discardable would be quite beneficial, since compressed freed pages would be immediately returned to the system.

[1] https://git.busybox.net/busybox/commit/?id=0a53b203f9e7157136c8ab4e8753008a63a56660 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/block/zram?id=f4659d8e620d08bd1a84a8aec5d2f5294a242764

15.07.20181654PackagesBug ReportVery LowLowuci cli tool always returns 0 on uci del_list even if n...openwrt-18.06Unconfirmed Task Description

uci del_list dhcp.@dnsmasq[0].nothing=’nothing’ && echo yes

Filing this just for record keeping, so that others know that you cannot depend on return value for uci del_list (while uci del only returns 0 if something was actually deleted).

25.07.20181692PackagesBug ReportVery LowMediumDDNS seems to not use ca-certificatesTrunkWaiting on reporter Task Description

On 18.06 rc2 I have to type “IGNORE” in the “Path to ca-file” field. Otherwise I always get this error:

Wed Jul 25 23:31:21 2018 user.err ddns-scripts[1745]: myddns_ipv4: cURL Error: ‘77’ Wed Jul 25 23:31:22 2018 user.warn ddns-scripts[1745]: myddns_ipv4: Transfer failed - retry 1/0 in 60 seconds

The ca-certificates package is installed. On 18.06 rc1 I got not this error.

30.07.20181713PackagesBug ReportVery LowMediumlevel of deamon log messagesAllUnconfirmed Task Description

during some driver tests noticed these:

Sat Jul  7 13:41:52 2018 daemon.err hostapd: Using interface wlan0-2 with hwaddr <mac_addr> and ssid "9531_3"
Sat Jul  7 13:41:52 2018 daemon.err hostapd: Using interface wlan1-2 with hwaddr <mac_addr> and ssid "OpenWrt3"

this was not an error but rather notice.
Sat Jul  7 13:10:06 2018 daemon.notice hostapd: nl80211: Failed to remove interface wlan1-1 from bridge br-lan: No such device
Sat Jul  7 13:11:01 2018 daemon.notice hostapd: wlan1: STA <mac_addr> IEEE 802.11: Could not set STA to kernel driver
Sat Jul  7 13:11:28 2018 daemon.notice hostapd: wlan1: STA <mac_addr> IEEE 802.11: did not acknowledge authentication response

this is most likely an error isn't it rather than just notice?
12.08.20181769PackagesFeature RequestVery LowMediumEnable built-in RADIUS support for full version of host...TrunkUnconfirmed Task Description

hostapd has built-in RADIUS server and capable to perform EAP authentication without external authenticator. Unfortunately OpenWRT package builds full version of hostapd with internal crypto backend. All functions related to EAP-TLS in internal crypto backend stubbed with empty bodies returning error immediately.

Recently I used FreeRADIUS running directly on my router, but it requires pretty remarkable amount of RAM. I ended up with patch for openwrt build specs in order to build fully functional hostapd. Also I made some ugly hacks in netifd scripts to compose proper hostapd.conf. Finally, I got working EAP-TLS auth virtually with no additional costs.

Probably support for internal RADIUS and some authentication methods should be added to LUCI/UCI configuration interface.

I guess secure WLAN is not a luxury feature and EAP auth is mandatory for modern secure networks.

My device is: TP-Link Archer C50 V1
My current OpenWRT version is: OpenWrt 18.06.0, r7188-b0b5c64c22

01.10.20181876PackagesBug ReportVery LowMediumar71xx: btrfs (RAID1) broken on the TL-WDR3600 TrunkUnconfirmed Task Description

Hi,

I updated my TP-LINK TL-WDR3600 to OpenWrt 18.06.1 to attach 2 Harddisks in RAID1. The disks were attached to a Linux PC before and they work there without any problems. They are also working with gexxbox (cubibox hardware).

uname -a
Linux Grisu-AP 4.9.120 #0 Thu Aug 16 07:51:15 2018 mips GNU/Linux

root@Grisu-AP:/mnt# block info
label buffer too small 256 > 63
label buffer too small 256 > 63
/dev/mtdblock2: UUID=”d74faf39-3bf99749-7ff34679-ea820947” VERSION=”4.0” MOUNT=”/rom” TYPE=”squashfs” /dev/mtdblock3: MOUNT=”/overlay” TYPE=”jffs2” /dev/sda: UUID=”72a8abd2-1880-47d5-a91b-836c2bd0e6ae” TYPE=”btrfs” /dev/sdb: UUID=”72a8abd2-1880-47d5-a91b-836c2bd0e6ae” TYPE=”btrfs”

If I try to mount the RAID as sda I get the following:
mount /dev/sda /mnt/share
mount: mounting /dev/sda on /mnt/share failed: Invalid argument

If I try to mount the RAID as sdb it seems to work. I can browse through the directories for some seconds. Then nothing is listed anymore and I found the following in the log.

[ 206.334816] BTRFS: device label BTRFS_RAID1 devid 1 transid 21115 /dev/sda
[ 206.344960] BTRFS info (device sda): disk space caching is enabled
[ 206.353718] BTRFS error (device sda): failed to read the system array: -5
[ 206.362914] BTRFS error (device sda): open_ctree failed
[ 227.727463] BTRFS info (device sda): disk space caching is enabled
[ 227.735960] BTRFS error (device sda): failed to read the system array: -5
[ 227.745478] BTRFS error (device sda): open_ctree failed
[ 237.303189] BTRFS: device label BTRFS_RAID1 devid 2 transid 21115 /dev/sdb
[ 237.313585] BTRFS info (device sdb): disk space caching is enabled
[ 292.959623] ————[ cut here ]———— [ 292.964449] WARNING: CPU: 0 PID: 2010 at fs/btrfs/extent-tree.c:2967 0x8771f3e8 [btrfs@87700000+0xd74a0]
[ 292.974243] BTRFS: Transaction aborted (error -17)
[ 292.979183] Modules linked in: ath9k ath9k_common pppoe ppp_async ath9k_hw ath pppox ppp_generic nf_conntrack_ipv6 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_CT slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack lzo libcrc32c iptable_mangle iptable_filter ip_tables crc_ccitt compat ledtrig_usbport ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables nfsd nfs lockd sunrpc grace dns_resolver uas usb_storage sd_mod scsi_mod btrfs zlib_inflate zlib_deflate xor raid6_pq lzo_decompress lzo_compress
[ 293.051845] exportfs crc32c_generic crypto_hash ehci_platform ehci_hcd gpio_button_hotplug usbcore nls_base usb_common
[ 293.061554] CPU: 0 PID: 2010 Comm: btrfs-transacti Not tainted 4.9.120 #0
[ 293.068477] Stack : 80497672 0000003d 00000000 00000001 00000000 00000000 00000000 00000000
[ 293.077154] 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 293.085741] 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 293.094322] 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 293.102919] 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 293.111499] ...
[ 293.114007] Call Trace:
[ 293.116327] [<8006ad5c>] 0x8006ad5c
[ 293.119889] [<8006ad5c>] 0x8006ad5c
[ 293.123427] [<8007fd44>] 0x8007fd44
[ 293.127028] [<8771f3e8>] 0x8771f3e8 [btrfs@87700000+0xd74a0]
[ 293.132814] [<8007fd7c>] 0x8007fd7c
[ 293.136393] [<8771f3e8>] 0x8771f3e8 [btrfs@87700000+0xd74a0]
[ 293.142249] [<87737e5c>] 0x87737e5c [btrfs@87700000+0xd74a0]
[ 293.148041] [<877385ec>] 0x877385ec [btrfs@87700000+0xd74a0]
[ 293.153811] [<803a79d8>] 0x803a79d8
[ 293.157380] [<87732d94>] 0x87732d94 [btrfs@87700000+0xd74a0]
[ 293.163158] [<87732c10>] 0x87732c10 [btrfs@87700000+0xd74a0]
[ 293.168960] [<87732c10>] 0x87732c10 [btrfs@87700000+0xd74a0]
[ 293.174786] [<80098150>] 0×80098150 [ 293.178399] [<80098074>] 0×80098074 [ 293.181992] [<80065ef8>] 0x80065ef8
[ 293.185533]
[ 293.187041] —[ end trace 467c7995bdeef333 ]— [ 293.191792] BTRFS: error (device sdb) in btrfs_run_delayed_refs:2967: errno=-17 Object already exists
[ 293.201178] BTRFS info (device sdb): forced readonly
[ 293.206265] BTRFS warning (device sdb): Skipping commit of aborted transaction.
[ 293.213736] BTRFS: error (device sdb) in cleanup_transaction:1850: errno=-17 Object already exists

If you need more information please let me know.
Best regards, grisu

25.10.20181906PackagesBug ReportVery LowLowStatic lease doesn't work sometimesTrunkWaiting on reporter Task Description

Device: Xiaomi mi wifi mini
OpenWRT: SNAPSHOT r8377-70315fe144

If i reboot router or turn on it at the same time with PC static lease doesn’t work.

cat /etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '1'
        option localise_queries '1'
        option rebind_protection '1'
        option local '/[REDACTED]/'
        option domain '[REDACTED]'
        option expandhosts '1'
        option authoritative '1'
        option leasefile '/tmp/dhcp.leases'
        option nonwildcard '1'
        option localservice '0'
        option noresolv '1'
        list server '::1#5453'
        list server '127.0.0.1#5453'
        list rebind_domain '/[REDACTED]/'
        list server '[REDACTED]'
        option cachesize '1024'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '24h'
        option dhcpv6 'server'
        option ra 'server'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

config srvhost
[REDACTED]

config host
        option name 'wks1'
        option mac '60:a4:4c:ce:65:ac'
        option ip '172.16.9.10'

config domain
[REDACTED]

logread -e dnsmasq-dhcp

Thu Oct 25 07:43:05 2018 daemon.info dnsmasq-dhcp[1780]: DHCP, IP range 172.16.9.100 -- 172.16.9.249, lease time 1d
Thu Oct 25 07:43:19 2018 daemon.info dnsmasq-dhcp[1780]: DHCPDISCOVER(br-lan) 172.16.9.10 60:a4:4c:ce:65:ac
Thu Oct 25 07:43:19 2018 daemon.info dnsmasq-dhcp[1780]: DHCPOFFER(br-lan) 172.16.9.211 60:a4:4c:ce:65:ac
Thu Oct 25 07:43:19 2018 daemon.info dnsmasq-dhcp[1780]: DHCPREQUEST(br-lan) 172.16.9.211 60:a4:4c:ce:65:ac
Thu Oct 25 07:43:19 2018 daemon.info dnsmasq-dhcp[1780]: DHCPACK(br-lan) 172.16.9.211 60:a4:4c:ce:65:ac wks1

config.seed

CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_mt7620=y
CONFIG_TARGET_ramips_mt7620_DEVICE_miwifi-mini=y
CONFIG_GETDNS_ENABLE_STUB_ONLY=y
CONFIG_LIBCURL_COOKIES=y
CONFIG_LIBCURL_FILE=y
CONFIG_LIBCURL_FTP=y
CONFIG_LIBCURL_HTTP=y
CONFIG_LIBCURL_NO_SMB="!"
CONFIG_LIBCURL_OPENSSL=y
CONFIG_LIBCURL_PROXY=y
CONFIG_OPENSSL_WITH_DEPRECATED=y
CONFIG_OPENSSL_WITH_EC=y
CONFIG_OPENSSL_WITH_NPN=y
CONFIG_OPENSSL_WITH_PSK=y
CONFIG_OPENSSL_WITH_SRP=y
CONFIG_PACKAGE_bind-dig=y
CONFIG_PACKAGE_bind-libs=y
CONFIG_PACKAGE_ca-bundle=y
CONFIG_PACKAGE_ca-certificates=y
CONFIG_PACKAGE_curl=y
CONFIG_PACKAGE_ddns-scripts=y
CONFIG_PACKAGE_ddns-scripts_cloudflare.com-v4=y
# CONFIG_PACKAGE_dnsmasq is not set
CONFIG_PACKAGE_dnsmasq-full=y
CONFIG_PACKAGE_dnsmasq_full_auth=y
CONFIG_PACKAGE_dnsmasq_full_conntrack=y
CONFIG_PACKAGE_dnsmasq_full_dhcp=y
CONFIG_PACKAGE_dnsmasq_full_dhcpv6=y
CONFIG_PACKAGE_dnsmasq_full_dnssec=y
CONFIG_PACKAGE_dnsmasq_full_ipset=y
CONFIG_PACKAGE_dnsmasq_full_noid=y
CONFIG_PACKAGE_getdns=y
CONFIG_PACKAGE_gre=y
CONFIG_PACKAGE_ip-full=y
CONFIG_PACKAGE_ipset=y
CONFIG_PACKAGE_kmod-gre=y
CONFIG_PACKAGE_kmod-gre6=y
CONFIG_PACKAGE_kmod-ip6-tunnel=y
CONFIG_PACKAGE_kmod-ipt-ipset=y
CONFIG_PACKAGE_kmod-iptunnel=y
CONFIG_PACKAGE_kmod-iptunnel6=y
CONFIG_PACKAGE_kmod-nf-conntrack-netlink=y
CONFIG_PACKAGE_kmod-nfnetlink=y
CONFIG_PACKAGE_kmod-udptunnel4=y
CONFIG_PACKAGE_kmod-udptunnel6=y
CONFIG_PACKAGE_kmod-wireguard=y
CONFIG_PACKAGE_libcurl=y
CONFIG_PACKAGE_libgmp=y
CONFIG_PACKAGE_libipset=y
CONFIG_PACKAGE_libmnl=y
CONFIG_PACKAGE_libnetfilter-conntrack=y
CONFIG_PACKAGE_libnettle=y
CONFIG_PACKAGE_libnfnetlink=y
CONFIG_PACKAGE_libopenssl=y
CONFIG_PACKAGE_libyaml=y
CONFIG_PACKAGE_resolveip=y
CONFIG_PACKAGE_stubby=y
CONFIG_PACKAGE_wireguard=y
CONFIG_PACKAGE_wireguard-tools=y
CONFIG_PACKAGE_zlib=y
12.11.20181946PackagesBug ReportVery LowLowuqmi --set-data-format does nothingTrunkUnconfirmed Task Description

Investigating commands.c file I’ve found that cmd_ctl_set_data_format_prepare (executed on –set-data-format option) sends zeroed ‘struct qmi_ctl_set_data_format_request sreq’ (command.c lines 149 to 163) to the modem so that operation does not affect modem’s behavior any way.

08.12.20181989PackagesBug ReportVery LowMediumwpa_supplicant disablind timestamp check does not workAllUnconfirmed Task Description

Hi!

As far as I can tell, the option to disable timestamp checks in wpa_supplicant does not work, it can be enabled via
CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK=y

As a result, certificates are rejected if the system time does not match the expected range of valid dates for the certificate. Manual user action is required in my case, where internet acces via ethernet is governed via 802.1x and wpa_supplicant.

I studied the hostapd package for some time, but as I am no programmer is was not able to tell much, but for me it seems the option is not properly integrated.

My build options are:

CONFIG_PACKAGE_wpad=y
# CONFIG_PACKAGE_wpad-mini is not set
CONFIG_WPA_SUPPLICANT_INTERNAL=y
CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK=y

20.12.20182017PackagesBug ReportVery LowMedium[wpad] cannot use encryption on 802.11s meshopenwrt-18.06Unconfirmed Task Description

TLDR:
option encryption ‘none’ works perfectly

option encryption ‘# literally anything else’ wpad assumes encryption = none and everything works
OR
breaks config, mesh interface never comes up
(more than just the UI, also tested with iw)

Router A: ENS202EXT (Atheros/mac80211)
Router B: ENS202EXT (Atheros/mac80211)

Openwrt 18.06.1

wpad 2018-05-21-62566bc2-5 (current as of post)
also tried other versions of wpad (mesh, mesh-openssl)

I have tried both Mesh only and Mesh + AP.
I have not tried wpa_supplicant.

Currently have a mesh point that is working, but unencrypted. Along with an AP

LuCI does not allow the option to add encryption
If I force encryption in the configuration, mesh does not start up.
the package authSAE doesn’t exist anymore...so I assume that I am not missing requirements...

With Unencrypted mesh, LuCI shows association between the routers
Routers show up on each other’s Associated Stations list
everything seems to be working, with manual range testing since I can’t ping between routers, I guess because of firewall.

the most closely related issue I could find is this

another relevant links:
https://forum.openwrt.org/t/setting-up-authenticated-mesh-with-wpad-mesh/12399/49

they claim it’s good but it isn’t
Not sure if this is by design or never resolved.
Please advise how to better show the problem, what to post, etc...
I will be testing this on other routers as well

Working mesh config in wireless:

config wifi-iface

      option device 'radio0'
      option encryption 'none'
      option mode 'mesh'
      option mesh_id '$ID'
      option mesh_fwding '1'
      option network 'WLAN'

Mesh Config that fails:

config wifi-iface ‘SDMesh’

      option network 'WLAN'
      option device 'radio0'
      option mode 'mesh'
      option mesh_fwding '1'
      option mesh_id '$ID'
      option encryption 'psk2+ccmp'
      option key '$KEY'
23.12.20182023PackagesBug ReportVery LowCriticalPPtP not connecting on Xiaomi Mi WiFi R3Gopenwrt-18.06Unconfirmed Task Description

Supply the following if possible:
- Device problem occurs on : Xiaomi Mi WiFi R3G (https://openwrt.org/toh/xiaomi/mir3g)
- OpenWrt 18.06.1

Steps to reproduce:

1.opkg update
2.opkg install ppp-mod-pptp
3.opkg install kmod-nf-nathelper-extra
4.opkg install kmod-ipt-raw
5.disabled rebind attack protection from DNS and DHCP
6.added below custom rule on /etc/firewall.user

iptables -t raw -A OUTPUT -p tcp -m tcp --dport 1723 -j CT --helper pptp

7.setup the PPTP in the LUCI
8.reboot

Relevant Logs appearing repetitively:

Sun Dec 23 17:48:01 2018 daemon.notice pppd[22738]: pppd 2.4.7 started by root, uid 0
Sun Dec 23 17:48:02 2018 kern.info kernel: [ 1551.622787] pptp-ISP: renamed from ppp0
Sun Dec 23 17:48:02 2018 daemon.info pppd[22738]: Using interface pptp-ISP Sun Dec 23 17:48:02 2018 daemon.notice pppd[22738]: Connect: pptp-ISP ←→ pptp (red.connect.net.pk)
Sun Dec 23 17:48:03 2018 daemon.notice pppd[22738]: CHAP authentication succeeded
Sun Dec 23 17:48:03 2018 daemon.notice pppd[22738]: Connection terminated.
Sun Dec 23 17:48:03 2018 daemon.warn pppd[22740]: read returned zero, peer has closed
Sun Dec 23 17:48:03 2018 daemon.warn pppd[22740]: read returned zero, peer has closed
Sun Dec 23 17:48:03 2018 daemon.info pppd[22738]: Exit.
Sun Dec 23 17:48:03 2018 daemon.notice netifd: Interface ‘ISP’ is now down
Sun Dec 23 17:48:03 2018 daemon.notice netifd: Interface ‘ISP’ is setting up now
Sun Dec 23 17:48:03 2018 daemon.info pppd[22998]: Plugin pptp.so loaded.
Sun Dec 23 17:48:03 2018 daemon.info pppd[22998]: PPTP plugin version 1.00
Sun Dec 23 17:48:03 2018 daemon.notice pppd[22998]: pppd 2.4.7 started by root, uid 0


27.12.20182029PackagesFeature RequestVery LowLowfw3, IPv6: create rules with hostnames instead of dest_...TrunkUnconfirmed Task Description

Currently, opening a port on fw3 to allow a local server to be reached from the Internet via IPv6, requires the hardcoding of the destination IPv6 address in the

dest_ip

option. Here's the example on the fw3 IPv6 Configuration Examples wiki page:

config rule
        option src       wan
        option proto     tcp
        option dest      lan
        option dest_ip   2001:db8:42::1337
        option dest_port 80
        option family    ipv6
        option target    ACCEPT

Having an hardcoded IPv6 address becomes troublesome when the public IPv6 prefix changes. This can happen regularly with some ISPs, forcing users to edit the rule.

It would much helpful if one could specify a destination hostname instead of an IP address. fw3 would then have to check the current leases and translate the hostname.

An hardcoded IP address in the firewall rules was no issue with IPv4, since on most scenarios all destination addresses were local and could be statically attributed on

/etc/config/dhcp

. IPv6 public prefix delegation changes this and IMO requires more flexible rules on fw3.

This feature request follows the How to set up OpenWrt traffic rule for port forwarding IPv6 server on my LAN? question on SuperUser by James Johnston.

21.01.20192069PackagesFeature RequestVery LowLowAdd HSTS support to uhttpdopenwrt-18.06Unconfirmed Task Description

I’d like to be able to use HTTP Strict Transport Security (HSTS) on my uhttpd server.

21.01.20192070PackagesBug ReportVery LowCriticalbn_wexpand in bn_div.c are not checked for failure and ...openwrt-18.06Unconfirmed Task Description

Hi,
The code in the openwrt/package/network/services/ead/src/tinysrp/bn_div.c should be fixed to check the bn_wexpand return value. The problem exists in multiple other projects including openssl with CVE (CVE-2009-3245)(https://github.com/openssl/openssl/commit/2d9dcd4ff0923347fab727ac90e8526dd65e4e07).

21.01.20192072PackagesBug ReportVery LowCriticalbn_wexpand return value vulnerable to memory leakopenwrt-18.06Unconfirmed Task Description

Hi,
The code in the openwrt/package/network/services/ead/src/tinysrp/bn_div.c should be fixed to check the bn_wexpand return value. The problem exists in multiple other projects including openssl with CVE (CVE-2009-3245)(https://github.com/openssl/openssl/commit/2d9dcd4ff0923347fab727ac90e8526dd65e4e07).

23.01.20192080PackagesBug ReportVery LowCriticalWan IPV6 interface with 6rd protocol reports bad mac ad...openwrt-18.06Unconfirmed Task Description

Device used is BT Home Hub 5 v1.2.
Openwrt release is 18.06.1,
6rd package version is 9-4
ISP is Free (France)

“Wan” interface, IPV4, with Dchp client protocol is up and works fine on physical interface dsl0.836.
Mac address has to be overriden because ISP uses a fixed mac address, different for each Freebox, it’s own dsl modem/box.

“Wan6”, IPV6, interface with 6rd protocol is up but the mac reported in the not the same as those reported in “Wan” interface.

As you could see on the attached capture of the “Interfaces overview”, the mac address reported is the “Wan” IpV4 address !!!

Wan6 interface is up but frames are rejected by ISP because the mac address is not those one expected as for “Wan” interface. Mac address can’t be overriden on these interface.

network config is attached.



Cromagnon31

26.01.20192084PackagesBug ReportVery LowMediumltq-vdsl-vr9-vectoring-fw-installer: New version of fir...openwrt-18.06Unconfirmed Task Description

When running vdsl_fw_install.sh from the ltq-vdsl-vr9-vectoring-fw-installer package, it tries to download https://www.telekom.de/hilfe/downloads/firmware-speedport-w921v-1.44.000.bin which does not exist anymore on the server.

There is a new version (1.45) out though.

Also, I had to install this package (ltq-vdsl-vr9-vectoring-fw-installer) manually, as it is not available in the repos of 18.06.

Warm regards and thanks for the good work!

Tom

30.01.20192093PackagesFeature RequestVery LowMediumThere is 'dslite' but not 'ipip6'?AllUnconfirmed Task Description

Supply the following if possible:
- Device problem occurs on
This is a suggestion and is not a model-specific bug report.

- Software versions of OpenWrt/LEDE release, packages, etc.
OpenWrt 18.06.1, r7258-5eb055306f

- Steps to reproduce
Description below:

I don't understand why people have not come across this, but I honestly think there should be a package providing users with a generic implementation of IPv4-over-IPv6 tunnel. There is 'dslite' which contains 'dslite.sh' but is too specifically optimized for DS-Lite since it has IPv4 addresses of hard-coded. Sure, I could alter these values locally for personal use, but that just doesn't feel right...I find it rather inflexible. I'm not saying 'dslite' should be renamed to 'ipip6' but I do think folks will be happier if there were a separate package named like 'ipip6' implemented with more flexibility. Or am

11.02.20192119PackagesBug ReportVery LowLowPython and Python3 pip and setuptools compilation step AllUnconfirmed Task Description

When compiling on new version of my OS (Gentoo) I encounter problem with Python and Python3 compilation. Originally there was no problem just weeks before but now I am not able to compile those two packages. It always fails on missing libffi.so.6.

Traceback (most recent call last):
  File "/home/build/run/turris-kittens-mox/8/openwrt/staging_dir/hostpkg/bin/pip3", line 7, in <module>
    from pip._internal import main
  File "/home/build/run/turris-kittens-mox/8/openwrt/staging_dir/hostpkg/lib/python3.6/site-packages/pip/_internal/__init__.py", line 42, in <module>
    from pip._internal import cmdoptions
  File "/home/build/run/turris-kittens-mox/8/openwrt/staging_dir/hostpkg/lib/python3.6/site-packages/pip/_internal/cmdoptions.py", line 16, in <module>
    from pip._internal.index import (
  File "/home/build/run/turris-kittens-mox/8/openwrt/staging_dir/hostpkg/lib/python3.6/site-packages/pip/_internal/index.py", line 25, in <module>
    from pip._internal.download import HAS_TLS, is_url, path_to_url, url_to_path
  File "/home/build/run/turris-kittens-mox/8/openwrt/staging_dir/hostpkg/lib/python3.6/site-packages/pip/_internal/download.py", line 39, in <module>
    from pip._internal.utils.glibc import libc_ver
  File "/home/build/run/turris-kittens-mox/8/openwrt/staging_dir/hostpkg/lib/python3.6/site-packages/pip/_internal/utils/glibc.py", line 3, in <module>
    import ctypes
  File "/home/build/run/turris-kittens-mox/8/openwrt/staging_dir/hostpkg/lib/python3.6/ctypes/__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array
ImportError: libffi.so.6: cannot open shared object file: No such file or directory


The problem is in invalid environment used to run pip. In package python that is on line 170 and 179. In package python3 that is 174 and 183. They are missing something like HostPyRunTarget.

18.02.20192132PackagesBug ReportVery LowMediumumdns: unicast response is always sent to udp port 5353openwrt-18.06Unconfirmed Task Description

According to RFC 6762 - Multicast DNS (https://tools.ietf.org/html/rfc6762), section 6. Responding tells:

The destination UDP port in all Multicast DNS responses MUST be 5353, and the destination address MUST be the mDNS IPv4 link-local multicast address 224.0.0.251 or its IPv6 equivalent FF02::FB, except when generating a reply to a query that explicitly requested a unicast response:
* via the unicast-response bit,
* by virtue of being a legacy query (Section 6.7), or
* by virtue of being a direct unicast query.

But current umdns implementation sets sender’s IP as dst IP for the response and always sets dst port 5353 ignoring actual sender’s port while sending the unicast response.

Also RFC 6762 tells that simple DNS resolver that uses One-Shot Multicast DNS Queries MUST NOT use source port 5353 (sections 5. Querying and 5.1. One-Shot Multicast DNS Queries):

These queries are typically done using a high-numbered ephemeral UDP source port, but regardless of whether they are sent from a dynamic port or from a fixed port, these queries MUST NOT be sent using UDP source port 5353, since using UDP source port 5353 signals the presence of a fully compliant Multicast DNS querier.

So simple DNS resolver can not receive the response from umdns if it requests the unicast response due to dst port 5353 that is always set by umdns for all responses.

21.02.20192138PackagesFeature RequestVery LowLowmwan3-luci: sort order of shown interfaces not like as ...TrunkUnconfirmed Task Description

on current trunk
it hurts, that the ORDER on the mwan3 graphs is different as ORDERED on configuration of mwan3.
is it possible to fix that ?
sorry, i don’T know how i could fix that by myself and to provide a fix for it.

root@router02.dreamteam:/root # opkg list-installed | grep mwan3
luci-app-mwan3 - git-19.043.27122-eda8f02-1
mwan3 - 2.7.10-1

cu Erwin

 


10.03.20192174PackagesBug ReportVery LowMediumOpenVPN tun adapter loses its IP address on network res...openwrt-18.06Unconfirmed Task Description

- Linksys WRT1200AC
- OpenWrt 18.06.2
- OpenVPN 2.4.5

The tun interface loses its IP address when a network restart (/etc/init.d/network restart) gets issued, if the tun adapter is if referenced in /etc/config/network.
You have to restart the OpenVPN service to reassign an IP address.
This happens on the server as well as on the client side and it can lock yourself out if you are connected via VPN.

https://forum.openwrt.org/t/openvpn-client-tun-adapter-loses-its-ip-address-on-network-restart/13825

04.04.20192221PackagesBuild FailureVery LowLowbuilding grub on 32 bit host failsTrunkUnconfirmed Task Description

The build for x86 stops at the following step:

make[8]: Entering directory '/home/lars/opennet/git/firmware/openwrt/build_dir/hostpkg/grub-2.02/grub-core'
i486-openwrt-linux-musl-gcc -DHAVE_CONFIG_H -I. -I..  -Wall -W  -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -m32 -nostdinc -isystem /home/lars/opennet/git/firmware/openwrt/staging_dir/toolchain-i386_pentium4_gcc-7.4.0_musl/lib/gcc/i486-openwrt-linux-musl/7.4.0/include -I../include -I../include -DGRUB_FILE=\"lib/i386/relocator64.S\" -I. -I. -I.. -I.. -I../include -I../include -I../grub-core/lib/libgcrypt-grub/src/    -I/home/lars/opennet/git/firmware/openwrt/staging_dir/host/include -I/home/lars/opennet/git/firmware/openwrt/staging_dir/hostpkg/include -I/home/lars/opennet/git/firmware/openwrt/staging_dir/target-i386_pentium4_musl/host/include -D_FILE_OFFSET_BITS=64 -g  -m32 -msoft-float -DGRUB_FILE=\"lib/i386/relocator64.S\" -I. -I. -I.. -I.. -I../include -I../include -I../grub-core/lib/libgcrypt-grub/src/ -DASM_FILE=1    -O2 -I/home/lars/opennet/git/firmware/openwrt/staging_dir/host/include -I/home/lars/opennet/git/firmware/openwrt/staging_dir/hostpkg/include -I/home/lars/opennet/git/firmware/openwrt/staging_dir/target-i386_pentium4_musl/host/include -MT lib/i386/relocator_module-relocator64.o -MD -MP -MF lib/i386/.deps-core/relocator_module-relocator64.Tpo -c -o lib/i386/relocator_module-relocator64.o `test -f 'lib/i386/relocator64.S' || echo './'`lib/i386/relocator64.S
lib/i386/relocator64.S: Assembler messages:
lib/i386/relocator64.S:66: Error: unknown pseudo-op: `.code64'
lib/i386/relocator64.S:74: Error: bad register name `%rax'
lib/i386/relocator64.S:98: Error: bad register name `%rax'
lib/i386/relocator64.S:132: Error: bad register name `%rip)'
make[8]: *** [Makefile:28991: lib/i386/relocator_module-relocator64.o] Error 1
make[8]: Leaving directory '/home/lars/opennet/git/firmware/openwrt/build_dir/hostpkg/grub-2.02/grub-core'

The build host is a 32 bit Linux system.
This does not seem to happen on a 64 bit build host.

14.04.20192237PackagesBug ReportVery LowMediumSamba4 and Samba 36 - Speed capped at 50Mbit/sec when u...openwrt-18.06Unconfirmed Task Description

Device : Mi router pro R3P
https://openwrt.org/toh/xiaomi/xiaomi_r3p_pro Snapshot firmware because stable firmware isn’t available yet for that specific device.
Seagate 4TB HDD/EXT4/USB3 as source device.

Samba transfer speeds are somehow capped at 50Mbit/sec for wifi transfers. I have tried both samba versions with the same result. I checked the transfer speeds on my oneplus 3 ( which is 1×1 AC, supports max 433Mbit/sec). I checked them on different android phones through wifi, with no change. FTP works fine wirelessly at full speeds on all the devices.

I have firewall, odhcpd and dnsmasq disabled as i use this router as access point. I have the device wired to Archer c7 v4 and the speeds end up being the same 50Mbit/sec wirelessly while wired transfer works fine.

21.04.20192248PackagesFeature RequestVery LowLowuhttpd: implement ubus event listener via Server-Sent E...TrunkWaiting on reporter Task Description

Usecase:
As a web developer I would benefit from having the possibility to send events from the server to the browser so the browser can react to it dynamically.

The proposed implementation is the leanest possible.

A SSE (Server-Sent Event) is a simple protocol on top of basic http polling to send messages from the http server to the browser for the purpose of instant notifications.
It comes implemented in all major browsers, including mobile.

If paired with `ubus listen` or `ubus monitor`, a seamless integration with the ubus pipeline could be implemented.

We tried to implement it by adding an option in this line of code but got stuck in our lack of corutine mechanisms and how uhttpd works.

The difference with the call and list options is that this one should be long-lived and progressive, preventing the dreaded polling from the web (also, better us of resources, more elegant implementation, etc).

As an example, a very basic implementation of a SSE server in php:

<?php
header('Content-Type: text/event-stream');
header('Cache-Control: no-cache');

echo "data: \"hello world\"" . PHP_EOL;
echo PHP_EOL;
echo "data: \"goodbye world\"" . PHP_EOL;
echo PHP_EOL;
ob_flush();
flush();

An example of a very basic implementation of a SSE client in HTML:

<html>
	<body></body>
	<script>
	var source = new EventSource("demo_sse.php");
	source.onmessage = function(event) {
		document.getElementById("result").innerHTML += event.data + "<br>";
	}; 
	</script>
</html>
06.05.20192268PackagesBug ReportVery LowLow[dnsmasq/odhcpd] uninstalling dnsmasq is deleting setti...openwrt-18.06Unconfirmed Task Description

utilising odhcpd for ipv4/6 queries led to uninstalling dnsmsaq from the system and in due course the file /etc/config/dhcp got wiped. Said file however holds the settings for odhcpd as well and thus is expected to be retained.

Since the /etc/config/dhcp holds the settings for both, dnsmasq and odhcpd, it should not be wiped if either packages gets uninstalled.

 


06.05.20192269PackagesBug ReportVery LowVery Lowiwinfo_lib.c does not correlate it's list with kernelTrunkUnconfirmed Task Description

The following issue occurs on all devices across all OpenWRT versions as it is partly a problem derived from the Linux Kernel.

It is explained in detail here: https://forum.openwrt.org/t/wifi-regulatory-country-database/35775

Prerequisites:

1) You need to have set up a working Wireless access point.
2) The set country has to not be one of the ones patched out here: https://pastebin.com/M2qTQFT5

Steps to reproduce:

1) Type ‘iw reg get’ in the terminal. This will give you a list of all available channels in the regulatory zone (country).
2) Change country to one of the patched out ones: https://pastebin.com/M2qTQFT5 (Eg. Angola, Antarctica)
3) [opt - Disregard this step if you used the WebUI] Type ‘/etc/init.d/network restart’ 4) Type ‘iw reg get’ in the terminal. You will notice that it has not changed.

Problem:

You can, unknown to you, set up a channel which is prohibited in your country. This is very hard to *check* because there is no way to pre-query whether you can set such a country or not.

More detailed explanation and argumentation can be found here: https://forum.openwrt.org/t/wifi-regulatory-country-database/35775


29.05.20192298PackagesBug ReportVery LowLowigmpproxy should restart on WAN ifup instead of using a...openwrt-18.06Unconfirmed Task Description

I’m using igmpproxy for IPTV on openwrt-18.06.2-ar71xx-generic-tl-wr1043nd-v1-squashfs-sysupgrade.bin

In the past I’ve been bitten by a version of this bug:

https://dev.archive.openwrt.org/ticket/20443#

Basically igmpproxy will not always start or continue to work when the wan network does ifup/ifdown.

I solved it with the solution listed there:

““” /etc/hotplug.d/iface/40-igmpproxy with this content

#!/bin/sh
[ “$INTERFACE” = wan ] && [ “$ACTION” = ifup ] && /etc/init.d/igmpproxy restart

and run

/etc/init.d/igmpproxy disable
““”

That seems like a better default, maybe even restarting on any ifup and not just wan, to make it fullproof against weirder setups with interfaces named differently.

14.06.20192319PackagesBug ReportVery LowHighusbmode bug which is fixed in usb-modeswitch...openwrt-18.06Unconfirmed Task Description

I wrote a bug report but then the bug report said wrong token and I lost the report... :(

Now again but shorter version. The usb-modeswitch (which seems to be an openwrt project, a rewrite of original usb_modeswitch https://git.openwrt.org/project/usbmode.git ) needs to set some devices to config 0 before switching to config 3.

BTW this is fixed in usb-modeswitch... Here is the link to discussion about this:
http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=4&t=2710&start=22

Some devices need to be set to config 0 first to be able to switch to config 3. Otherwise they hang...

Here a working example:

root@OpenWrt:~# echo 0 > /sys/bus/usb/devices/1-2/bConfigurationValue
root@OpenWrt:~# echo 3 > /sys/bus/usb/devices/1-2/bConfigurationValue
root@OpenWrt:~# umbim -d /dev/cdc-wdm0 caps

devicetype: 0001 - embedded
cellularclass: 0001
voiceclass: 0001 - no-voice
simclass: 0002
dataclass: 8000003F
smscaps: 0003
controlcaps: 0001
maxsessions: 0003
deviceid: 867377023108313
firmwareinfo: 11.617.06.00.00
hardwareinfo: RM1ME909ASM

root@OpenWrt:~#

A non-working example (after reboot):

root@OpenWrt:~# echo 3 > /sys/bus/usb/devices/1-2/bConfigurationValue
root@OpenWrt:~# umbim -d /dev/cdc-wdm0 caps
ERROR: mbim message timeout
root@OpenWrt:~#

At least one other person in OpenWRT bug tracker confirms this:
https://bugs.openwrt.org/index.php?do=details&task_id=1424

Although he has another problem with looping messages (probably unrelated to this bug)
https://forum.openwrt.org/t/usbmode-sits-in-loop-after-install/12624

19.06.20192330PackagesBug ReportVery LowHighSamba - smb.conf templating allows arbitrary injections...AllUnconfirmed Task Description

First, I have to say I’m not 100% sure it is something to be addressed within samba package itself, so forgive me if this is something you have already evaluated as not being an issue.

In short, something like that works:

 […]
    option workgroup 'WORKGROUP\
    security = share\
    guest account = root\
    interfaces = lo br-lan\
\
[ohnonotagain]'

I’m not sure this works in plain openwrt images, but there exists a widely deployed commercial fork of openwrt which is definitely vulnerable to some exploit chain involving this one in the middle.
You could argue that the right of modifying uci config already gives an equivalent authorization level, or this should have been sanitized at user interface. So, is this something you consider safe?

10.07.20192372PackagesBug ReportVery LowLow[netifd] error code language semantics misleadsAllUnconfirmed Task Description

I would have preferred to submit a patch but my coding skills are not up to speed/standard...

Trying to debug a PPPoE issue it was not possible to utilize –verbose with ifup || ifdown since it would appear not being implemented. Thus started to look at what LuCI has on display when stopping || starting the WAN iface via LuCI:

Unknown error (USER_REQUEST)

Whilst USER_REQUEST would seem logical as being manually initiated by the user the Unknown error however led me down the garden path until having traced its source

https://openwrt-devel.openwrt.narkive.com/piBGMKkc/patch-ppp-detailed-last-error-support

To my understanding

https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/network/services/ppp/files/ppp.sh;h=b553effd889e7662f366793665c789ed0d0c0ff2;hb=refs/heads/openwrt-master#l64

*) echo "UNKNOWN_ERROR" ;;

gets tagged to any of the potential error codes (1 - 21), even to

0) echo "OK" ;;

Which could introduce some sort of confusion to a simple minded user (being me).

0) echo "OK" ;;
5) echo "USER_REQUEST" ;;

would not appear to warrant an error tag at all. And the remainder, except 21, would appear to be rather specific than to be labelled as Unknown error.

Perhaps

*) echo "UNKNOWN_ERROR" ;;

is meant to be anything else that is not covered by codes 1 - 21 but that is not how it turns out on (LuCI) display.

I would thus humbly suggest to sort non-errors from actual errors and not tag the Unknown error to any of the specific error codes. It may help others that find themselves in a similar situation.


Whilst not being part of the topic but in a way related perhaps implementing

--verbose

for ifup || ifdown might go a long way in debugging connectivity issues.

Showing tasks 51 - 100 of 1064 Page 2 of 22 - 1 - 2 - 3 - 4 - 5 - Last >>

Available keyboard shortcuts

Tasklist

Task Details

Task Editing