Flyspray:: Flyspray::OpenWrt/LEDE Project: Recently opened tasks https://bugs.openwrt.org/ 2019-03-25T13:11:57Z FS#2204: odhcpd: dhcpv6 preffered lifetime halved on renew of static lease 2019-03-25T13:11:57Z 2019-03-25T11:20:28Z

Model Linksys WRT1900ACS
Architecture ARMv7 Processor rev 1 (v7l)
Firmware Version Lede SNAPSHOT r9506-42f2e07ba0 / LuCI Master (git-19.061.64392-718fb97)
Kernel Version 4.14.103
odhcpd 2019-02-27-16c5b6c9-3

When using systemd-networkd to request a static ipv6 address from from an openwrt router. I run into the problem illustrated by the following trace. The address to follow is IA_ADDR 2001:8b0:1418:4c2f::9 pltime:2372 vltime:2372

34 dhcp6 renew (xid=1c3ff1 (server-ID hwaddr type 1 c25627d4a752) (IA_NA IAID:9 T1:1186 T2:1897 (IA_ADDR fda0:4d7f:afbb:4c2f::9 pltime:4294967295 vltime:4294967295) (IA_ADDR 2001:8b0:1418:4c2f::9 pltime:2372 vltime:2372)) (option-request DNS-server DNS-search-list NTP-server SNTP-servers) (client-ID hwaddr/time type 1 time 558114890 b827eb719903) (elapsed-time 0))
35 dhcp6 reply (xid=1c3ff1 (server-ID hwaddr type 1 c25627d4a752) (client-ID hwaddr/time type 1 time 558114890 b827eb719903) (opt_82) (DNS-server fda0:4d7f:afbb:4c2f::1) (IA_NA IAID:9 T1:580 T2:928 (IA_ADDR 2001:8b0:1418:4c2f::9 pltime:1161 vltime:1161) (IA_ADDR fda0:4d7f:afbb:4c2f::9 pltime:4294967295 vltime:4294967295)))

Note that the pltime has been halved in the routers reply!

42 dhcp6 renew (xid=973c61 (server-ID hwaddr type 1 c25627d4a752) (IA_NA IAID:9 T1:580 T2:928 (IA_ADDR fda0:4d7f:afbb:4c2f::9 pltime:4294967295 vltime:4294967295) (IA_ADDR 2001:8b0:1418:4c2f::9 pltime:1161 vltime:1161)) (option-request DNS-server DNS-search-list NTP-server SNTP-servers) (client-ID hwaddr/time type 1 time 558114890 b827eb719903) (elapsed-time 0))
43 dhcp6 reply (xid=973c61 (server-ID hwaddr type 1 c25627d4a752) (client-ID hwaddr/time type 1 time 558114890 b827eb719903) (opt_82) (DNS-server fda0:4d7f:afbb:4c2f::1) (IA_NA IAID:9 T1:285 T2:456 (IA_ADDR 2001:8b0:1418:4c2f::9 pltime:571 vltime:571) (IA_ADDR fda0:4d7f:afbb:4c2f::9 pltime:4294967295 vltime:4294967295)))

52 dhcp6 renew (xid=4f072e (server-ID hwaddr type 1 c25627d4a752) (IA_NA IAID:9 T1:285 T2:456 (IA_ADDR fda0:4d7f:afbb:4c2f::9 pltime:4294967295 vltime:4294967295) (IA_ADDR 2001:8b0:1418:4c2f::9 pltime:571 vltime:571)) (option-request DNS-server DNS-search-list NTP-server SNTP-servers) (client-ID hwaddr/time type 1 time 558114890 b827eb719903) (elapsed-time 0))
53 dhcp6 reply (xid=4f072e (server-ID hwaddr type 1 c25627d4a752) (client-ID hwaddr/time type 1 time 558114890 b827eb719903) (opt_82) (DNS-server fda0:4d7f:afbb:4c2f::1) (IA_NA IAID:9 T1:130 T2:208 (IA_ADDR 2001:8b0:1418:4c2f::9 pltime:261 vltime:261) (IA_ADDR fda0:4d7f:afbb:4c2f::9 pltime:4294967295 vltime:4294967295)))

and so on until

274: 106 01:45:01.745699 c2:56:27:d4:a7:52 > b8:27:eb:d4:eb:54, ethertype IPv6 (0x86dd), length 198: (flowlabel 0xc541e, hlim 64, next-header UDP (17) payload length: 144) fe80::c056:27ff:fed4:a752.547 > fe80::ba27:ebff:fed4:eb54.546: [udp sum ok] dhcp6 reply (xid=3eeea5 (server-ID hwaddr type 1 c25627d4a752) (client-ID hwaddr/time type 1 time 558114890 b827eb719903) (opt_82) (DNS-server fda0:4d7f:afbb:4c2f::1) (IA_NA IAID:9 T1:4294967295 T2:4294967295 (IA_ADDR fda0:4d7f:afbb:4c2f::9 pltime:4294967295 vltime:4294967295) (IA_ADDR 2001:8b0:1418:4c2f::9 pltime:0 vltime:0)

At which point the client gives up and removes the address from the interface and does not attempt to reaccquire it.

I can get round this by having the client request an infinite lease. But I would prefer not to.

This does not look like the correct behaviour to me. Leasetime half life is a matter for the client not the server.

Steps to reproduce

1. Configure a network to request a static ipv6 lease.

:/etc/systemd/network $ cat 10-peglegpete.network
[Match]
Name=peglegpete

[Network]
DHCP=yes
IPv6AcceptRA=yes

[Address]
Address=2001:1111:2222:3333::9/64

[DHCP]
DUIDType=link-layer-time
DUIDRawData=00:01:21:44:28:4a:b8:27:eb:71:99:03
IAID=9

2. Set up a static lease in odhcpd using matching DUID and IAID data. Remember to prefix the DUID with the DUID-LLT type code 0001.

rogerjames99 https://bugs.openwrt.org/:2204
FS#2203: mtk_eth_soc: cannot build without nf_conntrack 2019-03-25T09:53:19Z 2019-03-25T09:53:19Z
  CC      drivers/net/ethernet/mediatek/mtk_eth_soc.o
In file included from drivers/net/ethernet/mediatek/mtk_eth_soc.c:34:0:
./include/net/netfilter/nf_flow_table.h:19:2: error: unknown type name 'nf_hookfn'
  nf_hookfn   *hook;
  ^~~~~~~~~
./include/net/netfilter/nf_flow_table.h:149:23: warning: 'struct nf_hook_state' declared inside parameter list will not be visible outside of this definition or declaration
          const struct nf_hook_state *state);
                       ^~~~~~~~~~~~~
./include/net/netfilter/nf_flow_table.h:151:25: warning: 'struct nf_hook_state' declared inside parameter list will not be visible outside of this definition or declaration
            const struct nf_hook_state *state);
                         ^~~~~~~~~~~~~
scripts/Makefile.build:326: recipe for target 'drivers/net/ethernet/mediatek/mtk_eth_soc.o' failed
LGA1150 https://bugs.openwrt.org/:2203
FS#2202: brcm63xx: Hg556a: kernel boot stuck at "random: crng init done" 2019-03-23T10:51:00Z 2019-03-23T10:51:00Z

The kernel 4.14.107 is unable to boot on the Hg556a (BCM6358).

Steps to reproduce:

  Intall the latest trunk version kernel 4.14.107

Sympthoms:

  No Boot
  It stucks at “random: fast init done”, and apparently no more kernel messages
  But after a minute it spits the last message random: crng init done

Boot Log:

*** Press any key to stop auto run (1 seconds) ***
Auto run second count down: 0
boot kernel from be020100
Code Address: 0x80A00000, Entry Address: 0x80a00000
Decompression OK!
Entry at 0x80a00000
Closing network.
Starting program at 0x80a00000
[    0.000000] Linux version 4.14.107 (hg556a@localhost.localdomain) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r9015-34696ce25e)) #0 Thu Mar 10 15:47:43 2019
[    0.000000] Detected Broadcom 0x6358 CPU revision a1
[    0.000000] CPU frequency is 300 MHz
[    0.000000] 64MB of RAM installed
[    0.000000] board_bcm963xx: Boot address 0xbe000000
[    0.000000] board_bcm963xx: CFE version: d081.5003
[    0.000000] bcm63xx_nvram: nvram checksum failed, contents may be invalid (expected 33313330, got 3c502ae7)
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0002a010 (Broadcom BMIPS4350)
[    0.000000] board: board name: HW556_B
[    0.000000] MIPS: machine is Huawei EchoLife HG556a (version B)
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 16kB, VIPT, 2-way, linesize 16 bytes.
[    0.000000] Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x80/0x488 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 54392K/65536K available (6369K kernel code, 343K rwdata, 2132K rodata, 1324K init, 256K bss, 11144K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 12741736309 ns
[    0.000026] sched_clock: 32 bits at 150MHz, resolution 6ns, wraps every 14316557820ns
[    1.034043] random: fast init done
[   53.820705] random: crng init done


Israel https://bugs.openwrt.org/:2202
FS#2201: kernel error: do_page_fault(): sending SIGSEGV to reader#1 for invalid read access from 77a87d90 2019-03-22T21:05:36Z 2019-03-22T21:05:36Z

current trunk from 22.3.2019
git-19.079.18950-11e64f8) / OpenWrt SNAPSHOT r9672-d78e229903

i see in the logs that having more often kernel error:

Fri Mar 22 15:14:27 2019 kern.info kernel: [11750.766284] do_page_fault(): sending SIGSEGV to reader#1 for invalid read access from 77a87d90
Fri Mar 22 15:14:27 2019 kern.info kernel: [11750.774984] epc = 77f55944 in libc.so[77edb000+94000]
Fri Mar 22 15:14:27 2019 kern.info kernel: [11750.780320] ra = 77f558e0 in libc.so[77edb000+94000]

any idea about what can be the reason for it ? or how i can give you more infos ?

camel https://bugs.openwrt.org/:2201
FS#2200: Luci doesn't accept multiple IPv6 prefixes 2019-03-22T14:25:45Z 2019-03-22T14:25:45Z

Under Luci → Network → Interfaces → interface-id you can define the routed IPv6 prefixes on an interface, but Luci only accepts one prefix in the “IPv6 routed prefix” field. This field should accept a space-separated list.

You can still define multiple prefixes directly in the configuration at /etc/config/network, e.g.:
option ip6prefix ‘prefix1::/64 prefix2::/64’ Doing that will lead to Luci showing both prefixes on the configuration page, but deny changes due to the wrong format of this field.

Trey Sis https://bugs.openwrt.org/:2200
FS#2199: Bananapi R2, Kernel command line problem 2019-03-22T08:07:23Z 2019-03-22T08:07:23Z

Can not configure root variable in kernel command line with U-Boot. Please clean
CONFIG_CMDLINE for linux kernel.

thanks.

 


Ivan https://bugs.openwrt.org/:2199
FS#2198: Tow entangled problems involving boost and package integration. 2019-03-21T23:03:14Z 2019-03-21T23:03:14Z

This involves an x86 generic full build of 18.02.
This seems less to be a problem directly involving packages, and more a
problem involving the integration of packages.

The builds were finishing up to this point.
In make menuconfig, I added in a few packages to replace the weaker
binutils version of these utilities, e.g., the less package, because I
wanted the search capability.
Apparently these additions got tangled up with boost, which was not at
this point selected:

cp -fpR -v /home/stuff/code/openwrt/repo/build_dir/target-i386_pentium4_musl/boost_1_68_0/ipkg-install/lib/*.{a,so*} /home/stuff/code/openwrt/repo/tmp/stage-boost/usr/lib/
‘/home/stuff/code/openwrt/repo/build_dir/target-i386_pentium4_musl/boost_1_68_0/ipkg-install/lib/libboost_exception.a’ → ‘/home/stuff/code/openwrt/repo/tmp/stage-boost/usr/lib/libboost_exception.a’ cp: cannot stat ‘/home/stuff/code/openwrt/repo/build_dir/target-i386_pentium4_musl/boost_1_68_0/ipkg-install/lib/*.so*’: No such file or directory

I searched for the unusual string {a,so*} and found it in feeds/packages/libs/boost/Makefile
line 473.
Apparently boost was being pulled in, but not creating any .so* files, even though boost was not yet selected.

So I went into make menuconfig and selected boost. Same problem.

Then I split line 473 to this form:

$(CP) -v $(PKG_INSTALL_DIR)/lib/*.a $(1)/usr/lib/
-$(CP) -v $(PKG_INSTALL_DIR)/lib/*.so* $(1)/usr/lib/

(It had been {a,so*}).
This (I think) will execute the same if boost is creating any .so files,
but will otherwise get past this step if no .so files are being created.

It seemed to work at first. But then (using make -j1) I started getting
complaints about the newly selected packages overwriting busybox versions of
files.
If you look more closely you will see that these errors wrote in the middle
of the string “Configuring boost.”
CoCollected errors:
* check_data_file_clashes: Package logger wants to install file /home/stuff/code/openwrt/repo/build_dir/target-i386_pentium4_musl/root-x86/usr/bin/logger

      But that file is already provided by package  * busybox

* opkg_install_cmd: Cannot install package logger.
* check_data_file_clashes: Package findutils-find wants to install file /home/stuff/code/openwrt/repo/build_dir/target-i386_pentium4_musl/root-x86/usr/bin/find

      But that file is already provided by package  * busybox

* opkg_install_cmd: Cannot install package findutils-find.
* check_data_file_clashes: Package findutils-xargs wants to install file /home/stuff/code/openwrt/repo/build_dir/target-i386_pentium4_musl/root-x86/usr/bin/xargs

      But that file is already provided by package  * busybox

* opkg_install_cmd: Cannot install package findutils-xargs.
* check_data_file_clashes: Package less-wide wants to install file /home/stuff/code/openwrt/repo/build_dir/target-i386_pentium4_musl/root-x86/bin/less

      But that file is already provided by package  * less

* opkg_install_cmd: Cannot install package less-wide.
nfiguring boost.

Note that busybox doesn’t like having logger, find, and xargs overwritten,
but I also selected find and less, which should have overwritten busybox
versions of the files. But that didn’t generate any complaints.

Here is where my memory gets a little hazy... I found out about this time that
menuconfig/boost was set to not install any libraries, so I selected ‘all
libraries’, and that may have gotten rid of the boost .so problem, because the
boost build was now creating .so files.

But I was still getting the file overwrite problem, so I yanked out the
offending package selections. At that point the make process completed.

Anyway, that’s what happened.

 


reallyohwell https://bugs.openwrt.org/:2198
FS#2197: default kernel option CONFIG_BPF_JIT=y breaking bpf filtering on 802.11 monitor mode traffic 2019-03-21T16:59:05Z 2019-03-21T16:59:05Z

Between 18.06.2 and the Trunk the kernel option CONFIG_BPF_JIT=y was added.

With JIT enabled, a simple beacon filter shows no traffic.
With JIT disabled, the filter works normally.

Device: ar71xx generic device (gl-mifi):

Test:
put the radio card in monitor mode:
iw wlan0 set type monitor
ifconfig wlan0 up
iw wlan0 set channel 1 # some channel with an AP

tcpdump -i wlan0
see lots of traffic and beacons

tcpdump -i wlan0 wlan type mgt subtype beacon
no traffic

Fix:
echo 0 > /proc/sys/net/core/bpf_jit_enable

tcpdump -i wlan0 wlan type mgt subtype beacon
see lots of beacons

More detail:
Testing on my side, with JIT enabled, it seems to be computing the offset to the start of the wlan packet incorrectly. In my case, the offset was off by +16 bytes. A filter of “wlan[0] == 0×80” should show beacons, because the type/subtype field is the first byte of the wlan packet. With JIT enabled, wlan[0] was equal to the first byte of the addr3/bssid field (the first byte of my AP’s MAC address), which is 16 bytes later in the packet.


Tyler Gray https://bugs.openwrt.org/:2197
FS#2196: block info confuses mount points 2019-03-21T14:32:21Z 2019-03-21T14:32:21Z

I’ve encountered a bug in /sbin/block.

If multiple block devices paths share the same prefix e.g. /dev/mmcblk0p1 and /dev/mmcblk0p10 the commands block info confuses them.
In my case /dev/mmcblk0p1 is a boot partition and /dev/mmcblk0p10 is a data partition.
There are a bunch of other partitions, which I’ll omit for the sake clarity in the following example.

/etc/config/fstab:

config 'global'
        option  anon_swap       '0'
        option  anon_mount      '0'
        option  auto_swap       '1'
        option  auto_mount      '1'
        option  delay_root      '5'
        option  check_fs        '0'

config 'mount'
        option  target  '/data'
        option  device  '/dev/mmcblk0p10'
        option  fstype  'ext4'
        option  enabled '1'

config 'mount'
        option  device  '/dev/mmcblk0p1'
        option  target  '/uboot'
        option  fstype  'vfat'
        option  options 'rw,sync'
        option  enabled '1'
...

After boot the output of mount looks like this:

root@foobar:~# mount
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/mmcblk0p10 on /data type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p1 on /uboot type vfat (rw,sync,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
...

At least everything is mounted in the right place.
If I do a block info I get:

root@foobar:~# block info
/dev/mmcblk0p1: UUID="0037-0032" LABEL="" VERSION="FAT16" MOUNT="/data" TYPE="vfat"
/dev/mmcblk0p10: UUID="d8dff841-edc4-4094-ae68-f6f0596c2277" VERSION="1.0" MOUNT="/data" TYPE="ext4"
...

Which is a little bit odd, as /dev/mmcblk0p1 is clearly not mounted under /data.

I did some digging in the sources and found the culprit in block.c:find_mount_point.
In line 646 in block.c:

*pos = '\0';
devname = tmp;
if (!strncmp(block, devname, len)) { // <- problem
	point = strdup(cpoint);
	break;
}

block is the parameter passed to find_mount_point, len is the string length of block and devname is a block device name read from /proc/self/mountinfo.
If the string in block is a prefix of the string in devname, !strncmp will always be true as, therefore the mount point in this line will be returned to caller.
In my case the line for /dev/mmcblk0p10 is encountered first, therefore /data is returned as mountpoint for both /dev/mmcblk0p10 and /dev/mmcblk0p1.

Since the idea here is to look for an exactly equal string I would suggest to compare the string length as well as calling strncmp.
See the attached patch for my temporary solution.

As a last remark: I could not determine if this affects other functionalities of /sbin/block as well,
but since find_mount_point is also called during umounting this might be more than just a display bug.

Sebastian https://bugs.openwrt.org/:2196
FS#2195: x86_64 multiple packages broken 2019-03-20T15:12:01Z 2019-03-19T21:00:13Z

x86_64 version of current OpenWRT 18.06.2 has issues.

Atleast freeradius3 and apse’s charon is broken.

Freeradius3 turns into zombie process (cannot kill, debug output does not tell anything useful) and charon starter process turns into zombie as well. Without any visible reason. Possibly issue happens with other software as well.

Oskari Rauta https://bugs.openwrt.org/:2195