Skip to content

Commit

Permalink
hostapd: enable FILS support in the full config and add build feature…
Browse files Browse the repository at this point in the history
… discovery

Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Dec 10, 2021
1 parent 8261b85 commit 5b66dfa
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package/network/services/hostapd/files/hostapd-full.config
Expand Up @@ -60,7 +60,7 @@ CONFIG_RSN_PREAUTH=y
CONFIG_EAP=y

# EAP Re-authentication Protocol (ERP) in integrated EAP server
#CONFIG_ERP=y
CONFIG_ERP=y

# EAP-MD5 for the integrated EAP server
CONFIG_EAP_MD5=y
Expand Down
Expand Up @@ -578,7 +578,7 @@ CONFIG_HS20=y
#CONFIG_MBO=y

# Fast Initial Link Setup (FILS) (IEEE 802.11ai)
#CONFIG_FILS=y
CONFIG_FILS=y
# FILS shared key authentication with PFS
#CONFIG_FILS_SK_PFS=y

Expand Down
Expand Up @@ -578,7 +578,7 @@ CONFIG_P2P=y
#CONFIG_MBO=y

# Fast Initial Link Setup (FILS) (IEEE 802.11ai)
#CONFIG_FILS=y
CONFIG_FILS=y
# FILS shared key authentication with PFS
#CONFIG_FILS_SK_PFS=y

Expand Down
20 changes: 20 additions & 0 deletions package/network/services/hostapd/patches/050-build_fix.patch
@@ -0,0 +1,20 @@
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -323,6 +323,7 @@ ifdef CONFIG_FILS
CFLAGS += -DCONFIG_FILS
OBJS += ../src/ap/fils_hlp.o
NEED_SHA384=y
+NEED_HMAC_SHA384_KDF=y
NEED_AES_SIV=y
ifdef CONFIG_FILS_SK_PFS
CFLAGS += -DCONFIG_FILS_SK_PFS
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -309,6 +309,7 @@ endif
ifdef CONFIG_FILS
CFLAGS += -DCONFIG_FILS
NEED_SHA384=y
+NEED_HMAC_SHA384_KDF=y
NEED_AES_SIV=y
ifdef CONFIG_FILS_SK_PFS
CFLAGS += -DCONFIG_FILS_SK_PFS
20 changes: 10 additions & 10 deletions package/network/services/hostapd/patches/200-multicall.patch
Expand Up @@ -18,7 +18,7 @@
OBJS += ../src/ap/vlan_init.o
OBJS += ../src/ap/vlan_ifconfig.o
OBJS += ../src/ap/vlan.o
@@ -349,10 +351,14 @@ CFLAGS += -DCONFIG_MBO
@@ -350,10 +352,14 @@ CFLAGS += -DCONFIG_MBO
OBJS += ../src/ap/mbo_ap.o
endif

Expand All @@ -36,7 +36,7 @@
LIBS += $(DRV_AP_LIBS)

ifdef CONFIG_L2_PACKET
@@ -1277,6 +1283,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
@@ -1278,6 +1284,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
_OBJS_VAR := OBJS
include ../src/objs.mk

Expand All @@ -49,7 +49,7 @@
hostapd: $(OBJS)
$(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
@$(E) " LD " $@
@@ -1351,6 +1363,12 @@ include ../src/objs.mk
@@ -1352,6 +1364,12 @@ include ../src/objs.mk
_OBJS_VAR := SOBJS
include ../src/objs.mk

Expand All @@ -72,7 +72,7 @@
include ../src/build.rules

ifdef LIBS
@@ -359,7 +360,9 @@ endif
@@ -360,7 +361,9 @@ endif
ifdef CONFIG_IBSS_RSN
NEED_RSN_AUTHENTICATOR=y
CFLAGS += -DCONFIG_IBSS_RSN
Expand All @@ -82,7 +82,7 @@
OBJS += ibss_rsn.o
endif

@@ -897,6 +900,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
@@ -898,6 +901,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
LIBS += -ldl -rdynamic
endif
Expand All @@ -93,7 +93,7 @@
endif

ifdef CONFIG_AP
@@ -904,9 +911,11 @@ NEED_EAP_COMMON=y
@@ -905,9 +912,11 @@ NEED_EAP_COMMON=y
NEED_RSN_AUTHENTICATOR=y
CFLAGS += -DCONFIG_AP
OBJS += ap.o
Expand All @@ -105,7 +105,7 @@
OBJS += ../src/ap/hostapd.o
OBJS += ../src/ap/wpa_auth_glue.o
OBJS += ../src/ap/utils.o
@@ -986,6 +995,12 @@ endif
@@ -987,6 +996,12 @@ endif
ifdef CONFIG_HS20
OBJS += ../src/ap/hs20.o
endif
Expand All @@ -118,7 +118,7 @@
endif

ifdef CONFIG_MBO
@@ -994,7 +1009,9 @@ CFLAGS += -DCONFIG_MBO
@@ -995,7 +1010,9 @@ CFLAGS += -DCONFIG_MBO
endif

ifdef NEED_RSN_AUTHENTICATOR
Expand All @@ -128,7 +128,7 @@
NEED_AES_WRAP=y
OBJS += ../src/ap/wpa_auth.o
OBJS += ../src/ap/wpa_auth_ie.o
@@ -1889,6 +1906,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
@@ -1890,6 +1907,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)

_OBJS_VAR := OBJS
include ../src/objs.mk
Expand All @@ -141,7 +141,7 @@
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
@$(E) " LD " $@
@@ -2021,6 +2044,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK)
@@ -2022,6 +2045,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK)
$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
@$(E) " sed" $<

Expand Down
Expand Up @@ -30,7 +30,7 @@
reply_len = -1;
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -955,6 +955,9 @@ ifdef CONFIG_FILS
@@ -956,6 +956,9 @@ ifdef CONFIG_FILS
OBJS += ../src/ap/fils_hlp.o
endif
ifdef CONFIG_CTRL_IFACE
Expand Down
@@ -1,6 +1,6 @@
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -1293,7 +1293,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
@@ -1294,7 +1294,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
@$(AR) cr $@ hostapd_multi.o $(OBJS)

hostapd: $(OBJS)
Expand All @@ -9,7 +9,7 @@
@$(E) " LD " $@

ifdef CONFIG_WPA_TRACE
@@ -1304,7 +1304,7 @@ _OBJS_VAR := OBJS_c
@@ -1305,7 +1305,7 @@ _OBJS_VAR := OBJS_c
include ../src/objs.mk

hostapd_cli: $(OBJS_c)
Expand All @@ -20,7 +20,7 @@
NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS)
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1918,31 +1918,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
@@ -1919,31 +1919,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
@$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)

wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
Expand Down
Expand Up @@ -283,7 +283,7 @@
ifdef CONFIG_CODE_COVERAGE
CFLAGS += -O0 -fprofile-arcs -ftest-coverage
LIBS += -lgcov
@@ -959,6 +965,9 @@ ifdef CONFIG_CTRL_IFACE_MIB
@@ -960,6 +966,9 @@ ifdef CONFIG_CTRL_IFACE_MIB
CFLAGS += -DCONFIG_CTRL_IFACE_MIB
endif
OBJS += ../src/ap/ctrl_iface_ap.o
Expand Down
Expand Up @@ -50,6 +50,10 @@ static inline int has_feature(const char *feat)
#ifdef CONFIG_WPS
if (!strcmp(feat, "wps"))
return 1;
#endif
#ifdef CONFIG_FILS
if (!strcmp(feat, "fils"))
return 1;
#endif
return 0;
}
Expand Down

0 comments on commit 5b66dfa

Please sign in to comment.