Skip to contentSkip to conversation

Fix hostapd v2.9 build issues

PATCH New Sergey Matyukevich 3 participants 10 messages Sep 28, 2019 – Oct 12, 2019

lore
Share & tools
lore
#0 lore raw

cover Fix hostapd v2.9 build issues

Hi Thomas, Matt, and all

This patch set is aimed at fixing the remaining hostapd build failures for new hostapd v2.9. The first commit is supposed to fix the following build failures:

http://autobuild.buildroot.net/results/36e6e2662f89024defa83749d102d093b1f0a637/
http://autobuild.buildroot.net/results/f39a45e1e6ddcd5b3438f52e14ee78872775823b/
http://autobuild.buildroot.net/results/f5dff2e7321568f0555ee3b975ff83bb9536fedf/

The second patch fixes possible build issue that has not yet been spotted by the autobuild system.

Sergey Matyukevich (3):
package/hostapd: enable Linux ioctls for VLANs package/hostapd: disable TEAP for internal TLS implementation
DEVELOPERS: add Sergey Matyukevich for hostapd/wpa_supplicant

 DEVELOPERS                 | 2 ++
 package/hostapd/hostapd.mk | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
2.23.0
#1 lore raw

PATCH 1/3 package/hostapd: enable Linux ioctls for VLANs

Hostapd v2.9 follows the approach taken by bridge-utils and attempts to use new bridge ioctls whenever possible. New bridge calls are enabled in hostapd build using NEED_LINUX_IOCTL configuration option. That switch is enabled for all the practical configurations excluding wired driver. However it is required to support dynamic VLANs in any configuration.

Enable NEED_LINUX_IOCTL hostapd configuration option whenever dynamic VLANs support is requested in buildroot.

---
 package/hostapd/hostapd.mk | 1 +
 1 file changed, 1 insertion(+)
package/hostapd/hostapd.mk +1 -0
index 4a493cb9b2..0e5e5b2962 100644
@@ -96,6 +96,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_HOSTAPD_VLAN_DYNAMIC),y)
 HOSTAPD_CONFIG_ENABLE += CONFIG_FULL_DYNAMIC_VLAN
+HOSTAPD_CONFIG_SET += NEED_LINUX_IOCTL
 endif
 
 ifeq ($(BR2_PACKAGE_HOSTAPD_VLAN_NETLINK),y)
Signature · 1 line
2.23.0
#2 lore raw

PATCH 1/3 package/hostapd: enable Linux ioctls for VLANs

Sergey,

Quoted 21 lines · Sergey Matyukevich

Hostapd v2.9 follows the approach taken by bridge-utils and attempts to use new bridge ioctls whenever possible. New bridge calls are enabled in hostapd build using NEED_LINUX_IOCTL configuration option. That switch is enabled for all the practical configurations excluding wired driver. However it is required to support dynamic VLANs in any configuration.

Enable NEED_LINUX_IOCTL hostapd configuration option whenever dynamic VLANs support is requested in buildroot.

---
 package/hostapd/hostapd.mk | 1 +
 1 file changed, 1 insertion(+)
package/hostapd/hostapd.mk +0 -0
index 4a493cb9b2..0e5e5b2962 100644

package/hostapd/hostapd.mk endif · line 99

Quoted 4 lines
package/hostapd/hostapd.mk +1 -0
@@ -96,6 +96,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_HOSTAPD_VLAN_DYNAMIC),y)
 HOSTAPD_CONFIG_ENABLE += CONFIG_FULL_DYNAMIC_VLAN
+HOSTAPD_CONFIG_SET += NEED_LINUX_IOCTL

It seems interesting that CONFIG_FULL_DYNAMIC_VLAN doesn't set this withing the Makefile of hostapd

Quoted 6 lines
package/hostapd/hostapd.mk +0 -1
 endif
 
 ifeq ($(BR2_PACKAGE_HOSTAPD_VLAN_NETLINK),y)
--

2.23.0

Signature · 23 lines
Matthew Weber | Associate Director Software Engineer | Commercial Avionics

COLLINS AEROSPACE

400 Collins Road NE, Cedar Rapids, Iowa 52498, USA

Tel: +1 319 295 7349 | FAX: +1 319 263 6099

matthew.weber at collins.com | collinsaerospace.com



CONFIDENTIALITY WARNING: This message may contain proprietary and/or
privileged information of Collins Aerospace and its affiliated
companies. If you are not the intended recipient, please 1) Do not
disclose, copy, distribute or use this message or its contents. 2)
Advise the sender by return email. 3) Delete all copies (including all
attachments) from your computer. Your cooperation is greatly
appreciated.


Any export restricted material should be shared using my
matthew.weber at corp.rockwellcollins.com address.
#3 lore raw

PATCH 1/3 package/hostapd: enable Linux ioctls for VLANs

Hello Matt,

Quoted 25 lines

Sergey,

Quoted 22 lines · Sergey Matyukevich

Hostapd v2.9 follows the approach taken by bridge-utils and attempts to use new bridge ioctls whenever possible. New bridge calls are enabled in hostapd build using NEED_LINUX_IOCTL configuration option. That switch is enabled for all the practical configurations excluding wired driver. However it is required to support dynamic VLANs in any configuration.

Enable NEED_LINUX_IOCTL hostapd configuration option whenever dynamic VLANs support is requested in buildroot.

---
 package/hostapd/hostapd.mk | 1 +
 1 file changed, 1 insertion(+)
package/hostapd/hostapd.mk +0 -0
index 4a493cb9b2..0e5e5b2962 100644
@@ -96,6 +96,7 @@ endif
 
Quoted 6 lines

package/hostapd/hostapd.mk endif · line 99

Quoted 3 lines
package/hostapd/hostapd.mk +1 -0
 ifeq ($(BR2_PACKAGE_HOSTAPD_VLAN_DYNAMIC),y)
 HOSTAPD_CONFIG_ENABLE += CONFIG_FULL_DYNAMIC_VLAN
+HOSTAPD_CONFIG_SET += NEED_LINUX_IOCTL

It seems interesting that CONFIG_FULL_DYNAMIC_VLAN doesn't set this withing the Makefile of hostapd

The NEED_LINUX_IOCTL option is set in driver make files, e.g. see src/drivers/drivers.mk.
I assume it is done so in order to enable this option only for Linux drivers. For instance, this
option is not set for wired hostapd driver which is platform agnostic. In the case of Buildroot,
only Linux matters, so it is ok to set NEED_LINUX_IOCTL whenever we need to support
dynamic VLANs.

But your remark is a good one anyway. Unless I am missing something, support of dynamic
VLANs in hostapd is Linux only anyway. So it would make sense to enable NEED_LINUX_IOCTL
in src/drivers/drivers.mk whenever CONFIG_FULL_DYNAMIC_VLAN is selected in hostapd config.

Regards,
Sergey

#4 lore raw

PATCH 1/3 package/hostapd: enable Linux ioctls for VLANs

+ buildroot

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

Hostapd v2.9 follows the approach taken by bridge-utils and attempts to use new bridge ioctls whenever possible. New bridge calls are enabled in hostapd build using NEED_LINUX_IOCTL configuration option. That switch is enabled for all the practical configurations excluding wired driver. However it is required to support dynamic VLANs in any configuration.

Enable NEED_LINUX_IOCTL hostapd configuration option whenever dynamic VLANs support is requested in buildroot.

...

Quoted 20 lines
Quoted 13 lines
Quoted 2 lines

It seems interesting that CONFIG_FULL_DYNAMIC_VLAN doesn't set this withing the Makefile of hostapd

The NEED_LINUX_IOCTL option is set in driver make files, e.g. see src/drivers/drivers.mk.
I assume it is done so in order to enable this option only for Linux drivers. For instance, this
option is not set for wired hostapd driver which is platform agnostic. In the case of Buildroot,
only Linux matters, so it is ok to set NEED_LINUX_IOCTL whenever we need to support
dynamic VLANs.

Quoted 6 lines

But your remark is a good one anyway. Unless I am missing something, support of dynamic
VLANs in hostapd is Linux only anyway. So it would make sense to enable NEED_LINUX_IOCTL
in src/drivers/drivers.mk whenever CONFIG_FULL_DYNAMIC_VLAN is selected in hostapd config.

Quoted 2 lines

Indeed, since vlan_full.c includes linux_ioctl, it makes sense to enable that
in drivers.mk. Could you send a patch doing that upstream?

Sure, will do. But hostapd upstreaming is going to take some time. As for Buildroot, I have two options for this patch then:
- to keep this fix until next hostapd version update
- drop this fix and add hostapd patch to packages/hostapd directory

Any preferences ?

Regards,
Sergey

#5 lore raw

PATCH 1/3 package/hostapd: enable Linux ioctls for VLANs

Quoted 34 lines · Sergey Matyukevich

+ buildroot

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

Hostapd v2.9 follows the approach taken by bridge-utils and attempts to use new bridge ioctls whenever possible. New bridge calls are enabled in hostapd build using NEED_LINUX_IOCTL configuration option. That switch is enabled for all the practical configurations excluding wired driver. However it is required to support dynamic VLANs in any configuration.

Enable NEED_LINUX_IOCTL hostapd configuration option whenever dynamic VLANs support is requested in buildroot.

...

Quoted 20 lines
Quoted 19 lines
Quoted 2 lines

It seems interesting that CONFIG_FULL_DYNAMIC_VLAN doesn't set this withing the Makefile of hostapd

The NEED_LINUX_IOCTL option is set in driver make files, e.g. see src/drivers/drivers.mk.
I assume it is done so in order to enable this option only for Linux drivers. For instance, this
option is not set for wired hostapd driver which is platform agnostic. In the case of Buildroot,
only Linux matters, so it is ok to set NEED_LINUX_IOCTL whenever we need to support
dynamic VLANs.

But your remark is a good one anyway. Unless I am missing something, support of dynamic
VLANs in hostapd is Linux only anyway. So it would make sense to enable NEED_LINUX_IOCTL
in src/drivers/drivers.mk whenever CONFIG_FULL_DYNAMIC_VLAN is selected in hostapd config.

Quoted 7 lines
Quoted 2 lines

Indeed, since vlan_full.c includes linux_ioctl, it makes sense to enable that
in drivers.mk. Could you send a patch doing that upstream?

Sure, will do. But hostapd upstreaming is going to take some time. As for Buildroot, I have two options for this patch then:
- to keep this fix until next hostapd version update
- drop this fix and add hostapd patch to packages/hostapd directory

I mulled over this for some time before finally applying the patch as is.

Please do send a proper fix to upstream hostapd. When the version is bumped we
can remove the current fix again. And if we forget, it's not the end of the world.

Regards,
Arnout

Quoted 6 lines

Any preferences ?

Regards,
Sergey

#6 lore raw

PATCH 1/3 package/hostapd: enable Linux ioctls for VLANs

....

Quoted 8 lines
Quoted 7 lines
Quoted 2 lines

Indeed, since vlan_full.c includes linux_ioctl, it makes sense to enable that
in drivers.mk. Could you send a patch doing that upstream?

Sure, will do. But hostapd upstreaming is going to take some time. As for Buildroot, I have two options for this patch then:
- to keep this fix until next hostapd version update
- drop this fix and add hostapd patch to packages/hostapd directory

Quoted 4 lines

I mulled over this for some time before finally applying the patch as is.

Please do send a proper fix to upstream hostapd. When the version is bumped we
can remove the current fix again. And if we forget, it's not the end of the world.

Patch has been already sent to hostapd mailing list. When it is accepted, I will replace current solution in hostapd package makefile with a separate patch for hostapd. In this caseuild failure will not let us to forget about it when we bump hostapd version next time.

Regards,
Sergey

#7 lore raw

PATCH 2/3 package/hostapd: disable TEAP for internal TLS implementation

In reply to Sergey Matyukevich

Hostapd TEAP support fails to build when internal TLS implementation is selected. TEAP is still an experimental feature that is not recommmended for production use. Currently it should not be used for anything else than experimentation and interoperability testing.

Disable TEAP when internal TLS implementation is selected. Those who needs experimenting with TEAP are encouraged to enable openssl in their buildroot configuration.

---
 package/hostapd/hostapd.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/hostapd/hostapd.mk +1 -1
index 0e5e5b2962..f8c144c236 100644
@@ -27,7 +27,7 @@ HOSTAPD_DEPENDENCIES += host-pkgconf libopenssl
 HOSTAPD_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs openssl`
 HOSTAPD_CONFIG_EDITS += 's/\#\(CONFIG_TLS=openssl\)/\1/'
 else
-HOSTAPD_CONFIG_DISABLE += CONFIG_EAP_PWD
+HOSTAPD_CONFIG_DISABLE += CONFIG_EAP_PWD CONFIG_EAP_TEAP
 HOSTAPD_CONFIG_EDITS += 's/\#\(CONFIG_TLS=\).*/\1internal/'
 endif
 
Signature · 1 line
2.23.0
#8 lore raw

PATCH 3/3 DEVELOPERS: add Sergey Matyukevich for hostapd/wpa_supplicant

In reply to Sergey Matyukevich
---
 DEVELOPERS | 2 ++
 1 file changed, 2 insertions(+)
DEVELOPERS +2 -0
index 69d2ed6272..0f940cdef4 100644
@@ -2105,7 +2105,9 @@ F:	configs/orangepi_zero_defconfig
 F:	configs/solidrun_macchiatobin_mainline_defconfig
 F:	configs/solidrun_macchiatobin_marvell_defconfig
 F:	package/armbian-firmware/
+F:	package/hostapd/
 F:	package/rtl8189fs/
+F:	package/wpa_supplicant/
 F:	package/xr819-xradio/
 
 N:	Sergio Prado <[email protected]>
Signature · 1 line
2.23.0
#9 lore raw

cover Fix hostapd v2.9 build issues

In reply to Sergey Matyukevich
Quoted 9 lines · Sergey Matyukevich

Hi Thomas, Matt, and all

This patch set is aimed at fixing the remaining hostapd build failures for new hostapd v2.9. The first commit is supposed to fix the following build failures:

http://autobuild.buildroot.net/results/36e6e2662f89024defa83749d102d093b1f0a637/
http://autobuild.buildroot.net/results/f39a45e1e6ddcd5b3438f52e14ee78872775823b/
http://autobuild.buildroot.net/results/f5dff2e7321568f0555ee3b975ff83bb9536fedf/

This should have been part of the commit message of the first commit.

Quoted 3 lines

The second patch fixes possible build issue that has not yet been spotted by the autobuild system.

Now there have been such failures, so I've added one to the commit message of
the second commit.

Series applied with those changes.

Regards,
Arnout

Quoted 10 lines

Sergey Matyukevich (3):
package/hostapd: enable Linux ioctls for VLANs package/hostapd: disable TEAP for internal TLS implementation
DEVELOPERS: add Sergey Matyukevich for hostapd/wpa_supplicant

 DEVELOPERS                 | 2 ++
 package/hostapd/hostapd.mk | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)