2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2009-11-30 15:45:35 +01:00
|
|
|
#
|
|
|
|
# hostapd
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2009-11-30 15:45:35 +01:00
|
|
|
|
2019-08-25 21:28:42 +02:00
|
|
|
HOSTAPD_VERSION = 2.9
|
2017-09-14 17:11:14 +02:00
|
|
|
HOSTAPD_SITE = http://w1.fi/releases
|
2009-11-30 15:45:35 +01:00
|
|
|
HOSTAPD_SUBDIR = hostapd
|
|
|
|
HOSTAPD_CONFIG = $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR)/.config
|
2020-08-24 12:46:15 +02:00
|
|
|
HOSTAPD_PATCH = \
|
|
|
|
https://w1.fi/security/2020-1/0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch \
|
|
|
|
https://w1.fi/security/2020-1/0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch \
|
|
|
|
https://w1.fi/security/2020-1/0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch
|
2017-12-30 16:57:36 +01:00
|
|
|
HOSTAPD_DEPENDENCIES = host-pkgconf
|
|
|
|
HOSTAPD_CFLAGS = $(TARGET_CFLAGS)
|
2017-03-30 15:43:38 +02:00
|
|
|
HOSTAPD_LICENSE = BSD-3-Clause
|
2012-12-03 05:46:08 +01:00
|
|
|
HOSTAPD_LICENSE_FILES = README
|
2020-03-30 23:54:25 +02:00
|
|
|
|
|
|
|
# 0001-AP-Silently-ignore-management-frame-from-unexpected-.patch
|
|
|
|
HOSTAPD_IGNORE_CVES += CVE-2019-16275
|
|
|
|
|
2020-08-24 12:46:15 +02:00
|
|
|
# 0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch
|
|
|
|
HOSTAPD_IGNORE_CVES += CVE-2020-12695
|
|
|
|
|
2020-12-04 16:46:01 +01:00
|
|
|
HOSTAPD_CPE_ID_VENDOR = w1.fi
|
2014-02-27 21:47:11 +01:00
|
|
|
HOSTAPD_CONFIG_SET =
|
|
|
|
|
2019-07-08 22:07:54 +02:00
|
|
|
HOSTAPD_CONFIG_ENABLE = \
|
|
|
|
CONFIG_INTERNAL_LIBTOMMATH \
|
|
|
|
CONFIG_DEBUG_FILE \
|
|
|
|
CONFIG_DEBUG_SYSLOG
|
2014-02-27 21:47:11 +01:00
|
|
|
|
|
|
|
HOSTAPD_CONFIG_DISABLE =
|
2011-07-25 16:26:40 +02:00
|
|
|
|
2012-12-28 10:47:18 +01:00
|
|
|
# Try to use openssl if it's already available
|
2017-10-21 18:45:36 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBOPENSSL),y)
|
2019-04-13 10:37:24 +02:00
|
|
|
HOSTAPD_DEPENDENCIES += host-pkgconf libopenssl
|
|
|
|
HOSTAPD_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs openssl`
|
2015-03-31 09:21:57 +02:00
|
|
|
HOSTAPD_CONFIG_EDITS += 's/\#\(CONFIG_TLS=openssl\)/\1/'
|
2010-10-06 19:31:33 +02:00
|
|
|
else
|
2019-09-28 19:36:31 +02:00
|
|
|
HOSTAPD_CONFIG_DISABLE += CONFIG_EAP_PWD CONFIG_EAP_TEAP
|
2015-03-31 09:21:57 +02:00
|
|
|
HOSTAPD_CONFIG_EDITS += 's/\#\(CONFIG_TLS=\).*/\1internal/'
|
2009-11-30 15:45:35 +01:00
|
|
|
endif
|
2010-09-01 23:44:24 +02:00
|
|
|
|
2017-12-30 16:57:34 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_DRIVER_HOSTAP),)
|
|
|
|
HOSTAPD_CONFIG_DISABLE += CONFIG_DRIVER_HOSTAP
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_DRIVER_NL80211),)
|
|
|
|
HOSTAPD_CONFIG_DISABLE += CONFIG_DRIVER_NL80211
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_DRIVER_WIRED),y)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_DRIVER_WIRED
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_DRIVER_NONE),y)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_DRIVER_NONE
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Add options for wireless drivers
|
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_HAS_WIFI_DRIVERS),y)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += \
|
|
|
|
CONFIG_HS20 \
|
|
|
|
CONFIG_IEEE80211AC \
|
|
|
|
CONFIG_IEEE80211N \
|
|
|
|
CONFIG_IEEE80211R \
|
|
|
|
CONFIG_INTERWORKING
|
|
|
|
endif
|
|
|
|
|
2015-12-03 17:40:38 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_ACS),y)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_ACS
|
|
|
|
endif
|
|
|
|
|
2010-10-06 19:31:33 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_EAP),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
HOSTAPD_CONFIG_ENABLE += \
|
|
|
|
CONFIG_EAP \
|
2017-04-05 00:50:14 +02:00
|
|
|
CONFIG_RADIUS_SERVER
|
2014-06-05 16:24:19 +02:00
|
|
|
|
2015-03-31 09:21:57 +02:00
|
|
|
# Enable both TLS v1.1 (CONFIG_TLSV11) and v1.2 (CONFIG_TLSV12)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_TLSV1
|
2010-10-06 19:31:33 +02:00
|
|
|
else
|
2015-03-31 09:21:57 +02:00
|
|
|
HOSTAPD_CONFIG_DISABLE += CONFIG_EAP
|
|
|
|
HOSTAPD_CONFIG_ENABLE += \
|
|
|
|
CONFIG_NO_ACCOUNTING \
|
|
|
|
CONFIG_NO_RADIUS
|
2009-11-30 15:45:35 +01:00
|
|
|
endif
|
2010-09-01 23:44:24 +02:00
|
|
|
|
2009-11-30 15:45:35 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_WPS),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_WPS
|
2009-11-30 15:45:35 +01:00
|
|
|
endif
|
2010-09-01 23:44:24 +02:00
|
|
|
|
2019-09-09 22:20:33 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_WPA3),y)
|
|
|
|
HOSTAPD_CONFIG_SET += \
|
|
|
|
CONFIG_DPP \
|
|
|
|
CONFIG_SAE
|
|
|
|
HOSTAPD_CONFIG_ENABLE += \
|
|
|
|
CONFIG_OWE
|
|
|
|
else
|
|
|
|
HOSTAPD_CONFIG_DISABLE += \
|
|
|
|
CONFIG_OWE
|
|
|
|
endif
|
|
|
|
|
2017-12-23 20:06:14 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_VLAN),)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_NO_VLAN
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_VLAN_DYNAMIC),y)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_FULL_DYNAMIC_VLAN
|
2019-09-28 19:36:30 +02:00
|
|
|
HOSTAPD_CONFIG_SET += NEED_LINUX_IOCTL
|
2017-12-23 20:06:14 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_VLAN_NETLINK),y)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_VLAN_NETLINK
|
|
|
|
endif
|
|
|
|
|
2017-12-30 16:57:36 +01:00
|
|
|
# Options for building with libnl
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBNL),y)
|
|
|
|
HOSTAPD_DEPENDENCIES += libnl
|
|
|
|
HOSTAPD_CFLAGS += -I$(STAGING_DIR)/usr/include/libnl3/
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_LIBNL32
|
|
|
|
# libnl-3 needs -lm (for rint) and -lpthread if linking statically
|
|
|
|
# And library order matters hence stick -lnl-3 first since it's appended
|
|
|
|
# in the hostapd Makefiles as in LIBS+=-lnl-3 ... thus failing
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
|
|
HOSTAPD_LIBS += -lnl-3 -lm -lpthread
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2010-09-01 23:44:24 +02:00
|
|
|
define HOSTAPD_CONFIGURE_CMDS
|
2012-05-14 04:29:59 +02:00
|
|
|
cp $(@D)/hostapd/defconfig $(HOSTAPD_CONFIG)
|
2014-02-27 21:47:11 +01:00
|
|
|
sed -i $(patsubst %,-e 's/^#\(%\)/\1/',$(HOSTAPD_CONFIG_ENABLE)) \
|
|
|
|
$(patsubst %,-e 's/^\(%\)/#\1/',$(HOSTAPD_CONFIG_DISABLE)) \
|
|
|
|
$(patsubst %,-e '1i%=y',$(HOSTAPD_CONFIG_SET)) \
|
|
|
|
$(patsubst %,-e %,$(HOSTAPD_CONFIG_EDITS)) \
|
|
|
|
$(HOSTAPD_CONFIG)
|
2010-09-01 23:44:24 +02:00
|
|
|
endef
|
2009-11-30 15:45:35 +01:00
|
|
|
|
2012-05-14 04:29:59 +02:00
|
|
|
define HOSTAPD_BUILD_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) CFLAGS="$(HOSTAPD_CFLAGS)" \
|
2013-11-29 15:25:43 +01:00
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" LIBS="$(HOSTAPD_LIBS)" \
|
2012-05-14 04:29:59 +02:00
|
|
|
$(MAKE) CC="$(TARGET_CC)" -C $(@D)/$(HOSTAPD_SUBDIR)
|
|
|
|
endef
|
|
|
|
|
2010-09-01 23:44:24 +02:00
|
|
|
define HOSTAPD_INSTALL_TARGET_CMDS
|
2010-12-09 10:55:01 +01:00
|
|
|
$(INSTALL) -m 0755 -D $(@D)/$(HOSTAPD_SUBDIR)/hostapd \
|
|
|
|
$(TARGET_DIR)/usr/sbin/hostapd
|
|
|
|
$(INSTALL) -m 0755 -D $(@D)/$(HOSTAPD_SUBDIR)/hostapd_cli \
|
|
|
|
$(TARGET_DIR)/usr/bin/hostapd_cli
|
2016-07-07 08:12:26 +02:00
|
|
|
$(INSTALL) -m 0644 -D $(@D)/$(HOSTAPD_SUBDIR)/hostapd.conf \
|
|
|
|
$(TARGET_DIR)/etc/hostapd.conf
|
2010-09-01 23:44:24 +02:00
|
|
|
endef
|
2009-11-30 15:45:35 +01:00
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|