Optimized build for the D-Link DIR-860L

@Bartvz No Sysupgrade file for r16855 in the drive folder?

Should be fixed now!

Be cautious upgrading if you're using WPA2 Enterprise, there's regression due to the hostapd upgrading which would render WPA2 Enterprise not be able get authenticated from Radius server.

[Should]( hostapd: fix radius problem due to invalid attributes · openwrt/openwrt@96e9c81 (github.com) be fixed now. Will upload a build containing that commit later today.

1 Like

And here it is, r16681.

This build is also untested as I don't have the time to switch my networking setup. So please know how to restore your device to a working state if something goes wrong.

1 Like

Guys, I have encountered a crash with snapshot build, here.

Is it similar to what you've encountered?

I have encountered them on the OpenWrt master branch. They still happen now and and then but not as much as before. Router also seems unaffected. However, just to be sure, I did always reboot my router afterwards.

Please don't block this post, I think this thread may be the closest to DIR-860L related topics around OpenWRT.

I wonder if @Bartvz has any trouble building all the packages with today's master version? I was trying to remove wpad-basic-wolfssl and install wpad packages for my 801.x usage, but opkg said wpad package is missing.

root@OpenWrt:~# opkg install wpad
Unknown package 'wpad'.
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency libubus20210603 for wpad
 * pkg_hash_fetch_best_installation_candidate: Packages for wpad found, but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package wpad.

The crash in airtime.c seems has something to do with Rekeying.

Tue Jul  6 22:55:06 2021 kern.warn kernel: [ 7370.531854] Rekeying PTK for STA ee:13:5a:ad:d4:38 but driver can't safely do that.
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.358179] ------------[ cut here ]------------
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.382854] WARNING: CPU: 1 PID: 989 at backports-5.10.42-1/net/mac80211/airtime.c:457 ieee80211_ocb_leave+0x564/0x644 [mac80211]
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.406075] Modules linked in: pppoe ppp_async iptable_nat xt_state xt_nat xt_conntrack xt_REDIRECT xt_MASQUERADE xt_FLOWOFFLOAD xt_CT pppox ppp_generic nf_nat nf_flow_table_hw nf_flow_table nf_conntrack mt76x2e mt76x2_common mt76x02_lib mt76 mac80211 ipt_REJECT cfg80211 xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG slhc nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter ip_tables crc_ccitt compat ledtrig_usbport nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 sha256_generic libsha256 seqiv jitterentropy_rng drbg hmac ghash_generic gf128mul gcm ctr cmac ccm leds_gpio xhci_plat_hcd xhci_pci xhci_mtk xhci_hcd gpio_button_hotplug usbcore nls_base usb_common
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.544107] CPU: 1 PID: 989 Comm: mt76-tx phy1 Not tainted 5.4.128 #0
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.556915] Stack : 00000000 8007ddb0 80740000 8073bc38 807a0000 8073bc00 8073ab68 86f3fc94
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.573540]         808e0000 87e2c188 80788d63 806c9c48 00000001 00000001 86f3fc38 567e7392
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.590165]         00000000 00000000 80920000 00000000 30232038 00000134 65746e69 2e352064
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.606794]         00000000 000004ca 00000000 00084d6b 00000000 807a0000 00000000 86a57cd0
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.623423]         00000009 00000014 00000004 00000002 00000000 8038e07c 00000004 808e0004
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.640051]         ...
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.644915] Call Trace:
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.649797] [<8000b64c>] show_stack+0x30/0x100
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.658650] [<80605f88>] dump_stack+0xa4/0xdc
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.667326] [<8002c130>] __warn+0xc0/0x10c
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.675487] [<8002c1d8>] warn_slowpath_fmt+0x5c/0xac
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.685519] [<86a57cd0>] ieee80211_ocb_leave+0x564/0x644 [mac80211]
Tue Jul  6 22:55:06 2021 kern.warn kernel: [24659.698150] ---[ end trace ba4dbfebe96053f1 ]---

The crash message always follows a Rekeying warning. It won't appear if rekeying disabled by adding

option eap_reauth_period '0'

in wireless configurations.

Compiled a new build yesterday, which I will test this weekend. My build is using the full version of wpad and it did compile without any trouble.

2 Likes

And a lot of stuff happened, interesting commits to mac80211, like this one and updates to mt76 which does not contain anything special for our hardware.

So, new build is compiling and going into testing today.

Also, went on the hunt as to why the 1 GHz patch did not work anymore and it seems to be related to this commit. Looking into other ways to patch the cpu clock since simply reverting it is not a clean solution with the kernel always moving forwards.

1 Like

I am not sure if I should try if the crash will appear without the wireless setting change I memtioned earlier, after these airtime improvements.

Rekeying caused something in airtime.c to cause a stacktrace, if I read the stack trace correctly it should be this line:

  	 (status->encoding == RX_ENC_HE && streams > 8)))

Which has something to do with data rates for which there are fixes in latest mt76. Could not hurt to try since you can always revert back to a previous build which works fine for you. Disabling rekeying is not recommended for security reasons.
Does it happen on rekeying for an Apple device?

Exactly it happened with Apple devices.

And you are using WPA3? And the Apple device is a MacBook?

It's just WPA2 Enterprise with iPhone.

I am pretty sure disabling rekeying posses less security risks with 801.x.

Hmm, that should work just fine. Could you try using 86400 seconds for the rekeying interval?

Disabling rekeying poses less of security risk but nonetheless it is a security risk. In theory an attacker could more easily crack the wireless encryption.

It's a security risk in the sense of once hacker or whoever cracked the wpa encryption, internet trafic in a longer period is cracked, without rekeying.

With 801.x each device can have it's own key, thus hackers cracked one does not mean they get data from other devices cracked.

Edit: I will report back if the crash appears.

The crash is still there:

[24379.963238] ------------[ cut here ]------------
[24379.972683] WARNING: CPU: 1 PID: 1000 at backports-5.10.42-1/net/mac80211/airtime.c:457 ieee80211_ocb_leave+0x564/0x644 [mac80211]
[24379.996118] Modules linked in: pppoe ppp_async iptable_nat xt_state xt_nat xt_conntrack xt_REDIRECT xt_MASQUERADE xt_FLOWOFFLOAD xt_CT pppox ppp_generic nf_nat nf_flow_table_hw nf_flow_table nf_conntrack mt76x2e mt76x2_common mt76x02_lib mt76 mac80211 ipt_REJECT cfg80211 xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG slhc nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter ip_tables crc_ccitt compat ledtrig_usbport nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 sha256_generic libsha256 seqiv jitterentropy_rng drbg hmac ghash_generic gf128mul gcm ctr cmac ccm leds_gpio xhci_plat_hcd xhci_pci xhci_mtk xhci_hcd gpio_button_hotplug usbcore nls_base usb_common
[24380.134117] CPU: 1 PID: 1000 Comm: mt76-tx phy1 Not tainted 5.4.132 #0
[24380.147096] Stack : 00000000 8007de24 80740000 8073bd04 807a0000 8073bccc 8073ab68 86b2fc94
[24380.163720]         808e0000 87f368e8 80788d63 806c9ca4 00000001 00000001 86b2fc38 b3edbead
[24380.180347]         00000000 00000000 80920000 00000000 00000030 00000138 746e6961 35206465
[24380.196972]         00000000 000004bc 00000000 00020be5 00000000 807a0000 00000000 86a58b60
[24380.213598]         00000009 00000014 00000004 00000002 00000001 8038e0f8 00000004 808e0004
[24380.230219]         ...
[24380.235074] Call Trace:
[24380.239955] [<8000b64c>] show_stack+0x30/0x100
[24380.248811] [<806063e0>] dump_stack+0xa4/0xdc
[24380.257481] [<8002c130>] __warn+0xc0/0x10c
[24380.265639] [<8002c1d8>] warn_slowpath_fmt+0x5c/0xac
[24380.275644] [<86a58b60>] ieee80211_ocb_leave+0x564/0x644 [mac80211]
[24380.288380] ---[ end trace e6a46e2a94c2d942 ]---

Any chance to get some update on this optimized build? The stable version of the 21.02.0 out there. Maybe there are some advantages of the new version.

1 Like