Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hostapd: Update hostapd src to 2021-04-25 #4114

Closed
wants to merge 3 commits into from

Conversation

mgiganto
Copy link

Update package, removed patches already integrated in src and update
patches to the new src.

Signed-off-by: Manuel Giganto mgigantoregistros@gmail.com

@@ -7,13 +7,13 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=hostapd
PKG_RELEASE:=32
PKG_RELEASE:=33
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As PKG_SOURCE_DATE is bumped you should reset PKG_RELEASE to 1 or (preferably) use $(AUTORELEASE)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @dangowrt!
PKG_RELEASE:=$(AUTORELEASE) it is!
This is changed now.
Let me know if you see something else.

@hauke
Copy link
Member

hauke commented Apr 26, 2021

I also looked into this and I had to backport this patch in addition:
https://git.kernel.org/linus/9f0ffa418483938d25a15f6ad3891389f333bc59
Without this patch NL80211_ATTR_RECONNECT_REQUESTED had the wrong offset and failed when called from hostapd

@mgiganto
Copy link
Author

I also looked into this and I had to backport this patch in addition:
https://git.kernel.org/linus/9f0ffa418483938d25a15f6ad3891389f333bc59
Without this patch NL80211_ATTR_RECONNECT_REQUESTED had the wrong offset and failed when called from hostapd
Thank you @hauke, how do you suggest to incorporate that patch to the kernel?
Include the kernel patch in this PR to both kernels?

@hauke
Copy link
Member

hauke commented Apr 27, 2021

I pushed my work in progress patches for hostapd here:
https://git.openwrt.org/?p=openwrt/staging/hauke.git;a=shortlog;h=refs/heads/hostapd

@mgiganto
Copy link
Author

@hauke I have included your mac80211 patch to this PR

@huaracheguarache
Copy link
Contributor

I've been running a build with this PR for almost 12 hours now without any issues. In my setup I have a FT-SAE network on 5 GHz, and WPA3/WPA2-mixed network on 2.4 GHz.

@mgiganto
Copy link
Author

mgiganto commented May 1, 2021

I have detected some sort of problem for some devices like galaxy s7 when conneting using EAP.
I am investigating, but it seems related with
`
67efd19e0a6019c11fd83a47f68a3573da1db520
From: Markus Theil markus.theil@tu-ilmenau.de
Date: Wed, 10 Jun 2020 10:32:58 +0200
Subject: [PATCH 071/871] nl80211: Use control port TX (status) in AP mode if
possible

Check if nl80211 control port TX status is available in the kernel and
enable control port TX if so. With this feature, nl80211 control path is
able to provide the same feature set as nl80211 (management) + AF_PACKET
socket (control) before.
`
I am investigating the issue

@mgiganto
Copy link
Author

mgiganto commented May 2, 2021

I have created a new patch that prevent the activation of control_port_ap from 67efd19e0a6019c11fd83a47f68a3573da1db520 this prevents the EAP timeout until the issue is resolved:

IEEE 802.1X: Sending EAP Packet (identifier 113)
WPA: sending 1/4 msg of 4-Way Handshake
WPA: received EAPOL-Key frame (2/4 Pairwise)
WPA: sending 3/4 msg of 4-Way Handshake
WPA: EAPOL-Key timeout
WPA: sending 3/4 msg of 4-Way Handshake
WPA: EAPOL-Key timeout
WPA: sending 3/4 msg of 4-Way Handshake
WPA: EAPOL-Key timeout
WPA: sending 3/4 msg of 4-Way Handshake
WPA: EAPOL-Key timeout
WPA: PTKINITNEGOTIATING: Retry limit 4 reached

Config example to reproduce on WRT32X:

config wifi-iface 'wifinet7'
option device 'radio0'
option mode 'ap'
option ssid 'OpenWrt21'
option ifname 'wiOpenWrt21'
option encryption 'wpa2+ccmp'
option auth_server '127.0.0.1'
option auth_secret 'radiuspassword'
option wpa_pair_rekey '0'
option eap_reauth_period '0'
option network 'lan'
option isolate '0'

@mgiganto
Copy link
Author

mgiganto commented May 4, 2021

Removed the 300 and 500 patch from @hauke's mac80211: Fix patch, it is now part of master.

@ynezz ynezz added the core packages pull request/issue for core (in-tree) packages label May 9, 2021
@huaracheguarache
Copy link
Contributor

Applying this PR locally causes a build failure with the latest master:

Applying ./patches/subsys/300-cfg80211-support-immediate-reconnect-request-hint.patch using plaintext: 
patching file include/net/cfg80211.h
Hunk #1 succeeded at 6419 (offset 9 lines).
patching file include/uapi/linux/nl80211.h
Hunk #1 succeeded at 2532 with fuzz 2 (offset 5 lines).
Hunk #2 succeeded at 3027 with fuzz 2 (offset 7 lines).
patching file net/mac80211/mlme.c
patching file net/wireless/mlme.c
patching file net/wireless/nl80211.c
Hunk #1 FAILED at 736.
Hunk #2 succeeded at 15912 (offset 9 lines).
Hunk #3 succeeded at 15934 (offset 9 lines).
Hunk #4 succeeded at 15965 (offset 9 lines).
Hunk #5 succeeded at 15976 (offset 9 lines).
Hunk #6 succeeded at 16025 (offset 9 lines).
1 out of 6 hunks FAILED -- saving rejects to file net/wireless/nl80211.c.rej
patching file net/wireless/nl80211.h
patching file net/wireless/trace.h
Patch failed!  Please fix ./patches/subsys/300-cfg80211-support-immediate-reconnect-request-hint.patch!
make[3]: *** [Makefile:564: /home/michael/src/router_stuff/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/backports-5.10.34-1/.prepared_5df45007d65f0c8578747107fe09aa8f_6664517399ebbbc92a37c5bb081b5c53] Error 1
make[3]: Leaving directory '/home/michael/src/router_stuff/openwrt/package/kernel/mac80211'
time: package/kernel/mac80211/compile#1.08#0.76#1.48
    ERROR: package/kernel/mac80211 failed to build.
make[2]: *** [package/Makefile:114: package/kernel/mac80211/compile] Error 1
make[2]: Leaving directory '/home/michael/src/router_stuff/openwrt'
make[1]: *** [package/Makefile:108: /home/michael/src/router_stuff/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/michael/src/router_stuff/openwrt'
make: *** [/home/michael/src/router_stuff/openwrt/include/toplevel.mk:230: world] Error 2

Manuel Giganto and others added 3 commits May 12, 2021 21:07
Update package, removed patches already integrated in src and update
patches to the new src.
Changed old patches to git format-patch to make easier the integration
in future updates.

The inclusion of commit 67efd19e0a6019c11fd83a47f68a3573da1db520 may
cause some problems using EAP with some devices due to the usage of
CONTROL_PORT.

Signed-off-by: Manuel Giganto <mgigantoregistros@gmail.com>
After the update 67efd19e0a6019c11fd83a47f68a3573da1db520 in hostapd
project, control_port_ap is enabled when the kernel support it.

Control_port_ap causes connection problems to some devices when using EAP
Right now there seems to be no way to disable or avoid control_port_ap
This patch prevents the activation by default while a better way let us
a manual control.

Signed-off-by: Manuel Giganto <mgigantoregistros@gmail.com>
@mgiganto
Copy link
Author

Patch updated. It compiles again on master (6713fe0)
@huaracheguarache please try again with the updated version

@huaracheguarache
Copy link
Contributor

huaracheguarache commented May 13, 2021

I can confirm that master builds successfully with this PR now, and a quick test on my R7800 didn't reveal any immediate issues. Nice work! =)

@mgiganto
Copy link
Author

@felix Fietkau has commit an updated version (2021-05-21) here https://git.openwrt.org/?p=openwrt/staging/nbd.git;a=commit;h=efee3bc92cce1ccc3bf24f8b3fdb9137054dc908
I am closing this PR

@mgiganto mgiganto closed this May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core packages pull request/issue for core (in-tree) packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants