diff mbox series

hostapd: add a hostapd-basic-openssl variant

Message ID 20201029111005.128590-1-rsalvaterra@gmail.com
State Superseded
Headers show
Series hostapd: add a hostapd-basic-openssl variant | expand

Commit Message

Rui Salvaterra Oct. 29, 2020, 11:10 a.m. UTC
Add an OpenSSL-linked basic variant (which provides WPA-PSK only, 802.11r and
802.11w). For people who don't need the full hostapd but are stuck with
libopenssl for other reasons, this saves quite a bit of space.

Sizes of hostapd on ath79 (74Kc -O2):
  811781 bytes (hostapd-full)
  531573 bytes (hostapd-basic-openssl)

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
---
 package/network/services/hostapd/Makefile | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Daniel Golle Oct. 29, 2020, 4:16 p.m. UTC | #1
On Thu, Oct 29, 2020 at 11:10:05AM +0000, Rui Salvaterra wrote:
> Add an OpenSSL-linked basic variant (which provides WPA-PSK only, 802.11r and
> 802.11w). For people who don't need the full hostapd but are stuck with
> libopenssl for other reasons, this saves quite a bit of space.

Please do the same for wpad-basic as well, just to be consistent.

> 
> Sizes of hostapd on ath79 (74Kc -O2):
>   811781 bytes (hostapd-full)
>   531573 bytes (hostapd-basic-openssl)

It doesn't really make sense to compare those.
Better compare hostapd-basic vs. hostapd-basic-wolfssl vs.
hostapd-basic-openssl.


> 
> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
> ---
>  package/network/services/hostapd/Makefile | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
> index bb20b7bcd9..b42818fa95 100644
> --- a/package/network/services/hostapd/Makefile
> +++ b/package/network/services/hostapd/Makefile
> @@ -203,6 +203,17 @@ define Package/hostapd-basic/description
>   This package contains a basic IEEE 802.1x/WPA Authenticator with WPA-PSK, 802.11r and 802.11w support.
>  endef
>  
> +define Package/hostapd-basic-openssl
> +$(call Package/hostapd/Default,$(1))
> +  TITLE+= (WPA-PSK, 11r and 11w)
> +  VARIANT:=basic-openssl
> +  DEPENDS+=+libopenssl
> +endef
> +
> +define Package/hostapd-basic-openssl/description
> + This package contains a basic IEEE 802.1x/WPA Authenticator with WPA-PSK, 802.11r and 802.11w support.
> +endef
> +
>  define Package/hostapd-mini
>  $(call Package/hostapd/Default,$(1))
>    TITLE+= (WPA-PSK only)
> @@ -585,6 +596,7 @@ define Package/hostapd/install
>  	$(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd $(1)/usr/sbin/
>  endef
>  Package/hostapd-basic/install = $(Package/hostapd/install)
> +Package/hostapd-basic-openssl/install = $(Package/hostapd/install)
>  Package/hostapd-hs20/install = $(Package/hostapd/install)
>  Package/hostapd-mini/install = $(Package/hostapd/install)
>  Package/hostapd-openssl/install = $(Package/hostapd/install)
> @@ -654,6 +666,7 @@ endif
>  
>  $(eval $(call BuildPackage,hostapd))
>  $(eval $(call BuildPackage,hostapd-basic))
> +$(eval $(call BuildPackage,hostapd-basic-openssl))
>  $(eval $(call BuildPackage,hostapd-hs20))
>  $(eval $(call BuildPackage,hostapd-mini))
>  $(eval $(call BuildPackage,hostapd-openssl))
> -- 
> 2.29.1
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Rui Salvaterra Oct. 29, 2020, 5:33 p.m. UTC | #2
Hi, Daniel,

On Thu, 29 Oct 2020 at 16:16, Daniel Golle <daniel@makrotopia.org> wrote:
>
> Please do the same for wpad-basic as well, just to be consistent.

Sure thing, I had even suggested it on IRC. :) Do you prefer a
follow-up patch, or a new series with both patches?

> > Sizes of hostapd on ath79 (74Kc -O2):
> >   811781 bytes (hostapd-full)
> >   531573 bytes (hostapd-basic-openssl)
>
> It doesn't really make sense to compare those.
> Better compare hostapd-basic vs. hostapd-basic-wolfssl vs.
> hostapd-basic-openssl.

Absolutely true, in the general sense. However, and very specifically,
the point I'm trying to convey is that if you have to depend on
OpenSSL, for some reason (e.g. a package which only supports OpenSSL),
you're also stuck with {hostapd,wpad}-full, even if you don't need the
complete functionality, as all the basic variants depend on wolfSSL
(unless you'd be willing to pay the price of having two SSL libraries
installed).

Thanks,
Rui
Daniel Golle Oct. 29, 2020, 5:40 p.m. UTC | #3
On Thu, Oct 29, 2020 at 05:33:44PM +0000, Rui Salvaterra wrote:
> Hi, Daniel,
> 
> On Thu, 29 Oct 2020 at 16:16, Daniel Golle <daniel@makrotopia.org> wrote:
> >
> > Please do the same for wpad-basic as well, just to be consistent.
> 
> Sure thing, I had even suggested it on IRC. :) Do you prefer a
> follow-up patch, or a new series with both patches?

It can even be both in one patch (I'd prefer that).

> 
> > > Sizes of hostapd on ath79 (74Kc -O2):
> > >   811781 bytes (hostapd-full)
> > >   531573 bytes (hostapd-basic-openssl)
> >
> > It doesn't really make sense to compare those.
> > Better compare hostapd-basic vs. hostapd-basic-wolfssl vs.
> > hostapd-basic-openssl.
> 
> Absolutely true, in the general sense. However, and very specifically,
> the point I'm trying to convey is that if you have to depend on
> OpenSSL, for some reason (e.g. a package which only supports OpenSSL),
> you're also stuck with {hostapd,wpad}-full, even if you don't need the
> complete functionality, as all the basic variants depend on wolfSSL
> (unless you'd be willing to pay the price of having two SSL libraries
> installed).

...or just use hostapd's built-in crypto instead...


> 
> Thanks,
> Rui
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Rui Salvaterra Oct. 29, 2020, 5:52 p.m. UTC | #4
Hi, again,

On Thu, 29 Oct 2020 at 17:40, Daniel Golle <daniel@makrotopia.org> wrote:
>
> It can even be both in one patch (I'd prefer that).

Alright, will do!

> ...or just use hostapd's built-in crypto instead...

In that case, I'd have a much larger hostapd with full functionality,
even though I only required the basics. Still a less than ideal
solution. :)

Thanks,
Rui
diff mbox series

Patch

diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index bb20b7bcd9..b42818fa95 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -203,6 +203,17 @@  define Package/hostapd-basic/description
  This package contains a basic IEEE 802.1x/WPA Authenticator with WPA-PSK, 802.11r and 802.11w support.
 endef
 
+define Package/hostapd-basic-openssl
+$(call Package/hostapd/Default,$(1))
+  TITLE+= (WPA-PSK, 11r and 11w)
+  VARIANT:=basic-openssl
+  DEPENDS+=+libopenssl
+endef
+
+define Package/hostapd-basic-openssl/description
+ This package contains a basic IEEE 802.1x/WPA Authenticator with WPA-PSK, 802.11r and 802.11w support.
+endef
+
 define Package/hostapd-mini
 $(call Package/hostapd/Default,$(1))
   TITLE+= (WPA-PSK only)
@@ -585,6 +596,7 @@  define Package/hostapd/install
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd $(1)/usr/sbin/
 endef
 Package/hostapd-basic/install = $(Package/hostapd/install)
+Package/hostapd-basic-openssl/install = $(Package/hostapd/install)
 Package/hostapd-hs20/install = $(Package/hostapd/install)
 Package/hostapd-mini/install = $(Package/hostapd/install)
 Package/hostapd-openssl/install = $(Package/hostapd/install)
@@ -654,6 +666,7 @@  endif
 
 $(eval $(call BuildPackage,hostapd))
 $(eval $(call BuildPackage,hostapd-basic))
+$(eval $(call BuildPackage,hostapd-basic-openssl))
 $(eval $(call BuildPackage,hostapd-hs20))
 $(eval $(call BuildPackage,hostapd-mini))
 $(eval $(call BuildPackage,hostapd-openssl))