[PATCH v2 1/3] hostapd: add wpad-basic-wolfssl variant

mail at adrianschmutzler.de mail at adrianschmutzler.de
Fri Jul 31 05:51:11 EDT 2020


Hi Petr,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Petr Štetiar
> Sent: Montag, 27. Juli 2020 11:57
> To: openwrt-devel at lists.openwrt.org
> Cc: Petr Štetiar <ynezz at true.cz>
> Subject: [PATCH v2 1/3] hostapd: add wpad-basic-wolfssl variant
> 
> Add package which provides size optimized wpad with support for just WPA-
> PSK, SAE (WPA3-Personal), 802.11r and 802.11w.

a few comments below.

> 
> Signed-off-by: Petr Štetiar <ynezz at true.cz>
> ---
> 
> changed in v2: no changes
> 
>  include/target.mk                          |  2 +-
>  package/network/services/hostapd/Config.in |  2 ++
> package/network/services/hostapd/Makefile  | 20
> ++++++++++++++++++++
>  3 files changed, 23 insertions(+), 1 deletion(-)
> 
> diff --git a/include/target.mk b/include/target.mk index
> aba477e83b8b..6ed6565bdaa2 100644
> --- a/include/target.mk
> +++ b/include/target.mk
> @@ -56,7 +56,7 @@ endif
>  DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE))
> 
>  filter_packages = $(filter-out -% $(patsubst -%,%,$(filter -%,$(1))),$(1)) -
> extra_packages = $(if $(filter wpad-mini wpad-basic wpad nas,$(1)),iwinfo)
> +extra_packages = $(if $(filter wpad-mini wpad-basic wpad-basic-wolfssl
> +wpad nas,$(1)),iwinfo)
> 
>  define ProfileDefault
>    NAME:=
> diff --git a/package/network/services/hostapd/Config.in
> b/package/network/services/hostapd/Config.in
> index 81a374c6525a..aa2a4bc41b5b 100644
> --- a/package/network/services/hostapd/Config.in
> +++ b/package/network/services/hostapd/Config.in
> @@ -13,6 +13,7 @@ config WPA_RFKILL_SUPPORT
>  		   PACKAGE_wpad-openssl || \
>  		   PACKAGE_wpad-wolfssl || \
>  		   PACKAGE_wpad-basic || \
> +		   PACKAGE_wpad-basic-wolfssl || \
>  		   PACKAGE_wpad-mini || \
>  		   PACKAGE_wpad-mesh-openssl || \
>  		   PACKAGE_wpad-mesh-wolfssl
> @@ -32,6 +33,7 @@ config WPA_MSG_MIN_PRIORITY
>  		   PACKAGE_wpad-openssl || \
>  		   PACKAGE_wpad-wolfssl || \
>  		   PACKAGE_wpad-basic || \
> +		   PACKAGE_wpad-basic-wolfssl || \
>  		   PACKAGE_wpad-mini || \
>  		   PACKAGE_wpad-mesh-openssl || \
>  		   PACKAGE_wpad-mesh-wolfssl

I think the package also needs to be added to "WPA_WOLFSSL" in the same file?

> diff --git a/package/network/services/hostapd/Makefile
> b/package/network/services/hostapd/Makefile
> index d754f19857ea..df1a80d3dabb 100644
> --- a/package/network/services/hostapd/Makefile
> +++ b/package/network/services/hostapd/Makefile
> @@ -109,6 +109,13 @@ ifeq ($(LOCAL_VARIANT),full)
>    endif
>  endif
> 
> +ifeq ($(LOCAL_VARIANT),basic)
> +  ifeq ($(SSL_VARIANT),wolfssl)
> +    DRIVER_MAKEOPTS += CONFIG_TLS=wolfssl CONFIG_SAE=y
> +    TARGET_LDFLAGS += -lwolfssl
> +  endif
> +endif

I've just pushed my patch to rearrange this setup. You can just drop this added "block" entirely now, as your case should be covered by the existing conditions.

> +
>  ifneq ($(LOCAL_TYPE),hostapd)
>    ifeq ($(LOCAL_VARIANT),mesh)
>      ifeq ($(SSL_VARIANT),openssl)
> @@ -248,6 +255,17 @@ define Package/wpad-basic/description
>   This package contains a basic IEEE 802.1x/WPA Authenticator and Supplicant
> with WPA-PSK, 802.11r and 802.11w support.
>  endef
> 
> +define Package/wpad-basic-wolfssl
> +$(call Package/wpad/Default,$(1))
> +  TITLE+= (WPA3-Personal, 11r and 11w)

I'd use the shorter (wolfSSL, 11r, 11w) or similar now to stay in line with updated TITLE variables.

Despite, we didn't refer to WPA3 as such anywhere else in the file.

I'd also like the wpad-basic-wolfssl variant backported to 19.07 (optional, of course). Do you have an opinion about that?

Best

Adrian

> +  VARIANT:=wpad-basic-wolfssl
> +  DEPENDS+=+libwolfssl
> +endef
> +
> +define Package/wpad-basic-wolfssl/description
> + This package contains a basic IEEE 802.1x/WPA Authenticator and
> Supplicant with WPA-PSK, SAE (WPA3-Personal), 802.11r and 802.11w
> support.
> +endef
> +
>  define Package/wpad-mini
>  $(call Package/wpad/Default,$(1))
>    TITLE+= (WPA-PSK only)
> @@ -567,6 +585,7 @@ define Package/wpad/install
>  	$(LN) wpad $(1)/usr/sbin/wpa_supplicant  endef  Package/wpad-
> basic/install = $(Package/wpad/install)
> +Package/wpad-basic-wolfssl/install = $(Package/wpad/install)
>  Package/wpad-mini/install = $(Package/wpad/install)  Package/wpad-
> openssl/install = $(Package/wpad/install)  Package/wpad-wolfssl/install =
> $(Package/wpad/install) @@ -622,6 +641,7 @@ $(eval $(call
> BuildPackage,wpad))  $(eval $(call BuildPackage,wpad-mesh-openssl))  $(eval
> $(call BuildPackage,wpad-mesh-wolfssl))  $(eval $(call BuildPackage,wpad-
> basic))
> +$(eval $(call BuildPackage,wpad-basic-wolfssl))
>  $(eval $(call BuildPackage,wpad-mini))
>  $(eval $(call BuildPackage,wpad-openssl))  $(eval $(call BuildPackage,wpad-
> wolfssl))
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20200731/0cf69e65/attachment.sig>


More information about the openwrt-devel mailing list