[PATCH] FILS: Fix compilation with CONFIG_FILS=y

Masashi Honma masashi.honma at gmail.com
Mon Sep 28 05:45:32 EDT 2015


Compilation of the hostapd with CONFIG_FILS=y fails with messages below.

../src/common/wpa_common.o: In function `fils_key_auth_sk':
/home/honma/hostap/hostapd/../src/common/wpa_common.c:352: undefined reference to `hmac_sha384_vector'
/home/honma/hostap/hostapd/../src/common/wpa_common.c:323: undefined reference to `hmac_sha384_vector'
../src/common/wpa_common.o: In function `fils_pmk_to_ptk':
/home/honma/hostap/hostapd/../src/common/wpa_common.c:257: undefined reference to `sha384_prf'
collect2: ld returned 1 exit status
make: *** [hostapd] Error 1

In addition, wpa_supplicant compilation fails also.

../src/common/wpa_common.o: In function `fils_key_auth_sk':
/home/honma/hostap/wpa_supplicant/../src/common/wpa_common.c:352: undefined reference to `hmac_sha384_vector'
/home/honma/hostap/wpa_supplicant/../src/common/wpa_common.c:323: undefined reference to `hmac_sha384_vector'
../src/common/wpa_common.o: In function `fils_pmk_to_ptk':
/home/honma/hostap/wpa_supplicant/../src/common/wpa_common.c:257: undefined reference to `sha384_prf'
../src/common/wpa_common.o: In function `fils_domain_name_hash':
/home/honma/hostap/wpa_supplicant/../src/common/wpa_common.c:1870: undefined reference to `crc32'
collect2: ld returned 1 exit status
make: *** [wpa_supplicant] Error 1

This patch fixes these issues.

Signed-off-by: Masashi Honma <masashi.honma at gmail.com>
---
 hostapd/Makefile        | 1 +
 wpa_supplicant/Makefile | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/hostapd/Makefile b/hostapd/Makefile
index b062735..31a5d95 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -243,6 +243,7 @@ ifdef CONFIG_FILS
 CFLAGS += -DCONFIG_FILS
 NEED_CRC32=y
 NEED_AES_GCM=y
+NEED_SHA384=y
 endif
 
 ifdef CONFIG_WNM
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 7efd7e0..68afae7 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -247,7 +247,9 @@ endif
 
 ifdef CONFIG_FILS
 CFLAGS += -DCONFIG_FILS
+NEED_CRC32=y
 NEED_AES_GCM=y
+NEED_SHA384=y
 endif
 
 ifdef CONFIG_WNM
@@ -1324,6 +1326,10 @@ ifdef NEED_ECC
 CFLAGS += -DCONFIG_ECC
 endif
 
+ifdef NEED_CRC32
+OBJS += ../src/utils/crc32.o
+endif
+
 ifdef CONFIG_NO_RANDOM_POOL
 CFLAGS += -DCONFIG_NO_RANDOM_POOL
 else
-- 
1.9.1



More information about the HostAP mailing list