diff mbox

Commits 86bd36f0d5b3d359075c356d68977b4d2e7c9f71 and dc152f32b4fd8af8ec055e3d551523e62792a585 caused breakage

Message ID 20141010110806.GA11072@t420.my.domain
State Superseded
Headers show

Commit Message

David Coppa Oct. 10, 2014, 11:08 a.m. UTC
Hi all!

I'm the maintainer of wpa_supplicant on OpenBSD.

Code added by commits 86bd36f0d5b3d359075c356d68977b4d2e7c9f71 (Add
generic mechanism for adding vendor elements into frames) and
dc152f32b4fd8af8ec055e3d551523e62792a585 (wpa_supplicant: Enable
HT for IBSS) makes use of functions from src/common/ieee802_11_common.c,
i.e. ieee802_11_parse_elems() and ieee80211_freq_to_chan().

Those commits broke builds configured without CONFIG_DRIVER_NL80211,
CONFIG_IEEE80211R, CONFIG_P2P, CONFIG_WPS, CONFIG_AP, CONFIG_SME
(just like our port for OpenBSD) because NEED_80211_COMMON is never
defined:

cc  -o wpa_supplicant config.o notify.o bss.o eap_register.o ../src/utils/common.o ../src/utils/wpa_debug.o ../src/utils/wpabuf.o ../src/utils/os_unix.o ../src/utils/eloop.o config_file.o ../src/rsn_supp/wpa.o ../src/rsn_supp/preauth.o ../src/rsn_supp/pmksa_cache.o ../src/rsn_supp/peerkey.o ../src/rsn_supp/wpa_ie.o ../src/common/wpa_common.o ../src/eap_peer/eap_tls.o ../src/eap_peer/eap_peap.o ../src/eap_common/eap_peap_common.o ../src/eap_peer/eap_ttls.o ../src/eap_peer/eap_md5.o ../src/eap_peer/eap_mschapv2.o ../src/eap_peer/mschapv2.o ../src/eap_peer/eap_gtc.o ../src/eap_peer/eap_otp.o ../src/eap_peer/eap_sim.o ../src/eap_peer/eap_leap.o ../src/eap_peer/eap_psk.o ../src/eap_common/eap_psk_common.o ../src/eap_peer/eap_aka.o ../src/eap_common/eap_sim_common.o ../src/eap_peer/eap_fast.o ../src/eap_peer/eap_fast_pac.o ../src/eap_common/eap_fast_common.o ../src/eap_peer/eap_pax.o ../src/eap_common/eap_pax_common.o ../src/eap_peer/eap_sake.o ../src/eap_common/eap_sake_common.o .
 ./src/eap_peer/eap_gpsk.o ../src/eap_common/eap_gpsk_common.o ../src/eap_peer/eap_ikev2.o ../src/eap_peer/ikev2.o ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.o ../src/eapol_supp/eapol_supp_sm.o ../src/eap_peer/eap.o ../src/eap_peer/eap_methods.o ../src/utils/pcsc_funcs.o ../src/crypto/ms_funcs.o ../src/eap_common/chap.o ../src/eap_peer/eap_tls_common.o ../src/crypto/tls_openssl.o ../src/crypto/crypto_openssl.o ../src/crypto/fips_prf_openssl.o  ../src/crypto/aes-unwrap.o ../src/crypto/aes-eax.o ../src/crypto/aes-ctr.o ../src/crypto/aes-encblock.o ../src/crypto/aes-omac1.o ../src/crypto/aes-cbc.o ../src/crypto/md5.o  ../src/crypto/sha256-prf.o ../src/crypto/dh_groups.o ../src/crypto/random.o ctrl_iface.o ctrl_iface_unix.o  ../src/utils/base64.o ../src/eap_common/eap_common.o ../src/crypto/sha1-prf.o ../src/crypto/sha1-tprf.o ../src/crypto/sha1-tlsprf.o  ../src/drivers/driver_common.o wpa_supplicant.o events.o blacklist.o wpas_glue.o scan.o main.o   ../s
 rc/drivers/driver_wired.o ../src/drivers/driver_openbsd.o ../src/drivers/drivers.o ../src/l2_packet/l2_packet_freebsd.o -L/usr/local/lib   -lpcap -lpcsclite -lpthread -lssl -lcrypto  
ctrl_iface.o: In function `wpas_ctrl_vendor_elem_add':
ctrl_iface.c:(.text+0x3e5d): undefined reference to `ieee802_11_parse_elems'
ctrl_iface.o: In function `wpas_ctrl_vendor_elem_remove':
ctrl_iface.c:(.text+0x4085): undefined reference to `ieee802_11_parse_elems'
wpa_supplicant.o: In function `wpas_start_assoc_cb':
wpa_supplicant.c:(.text+0x6ac5): undefined reference to `ieee80211_freq_to_chan'
collect2: ld returned 1 exit status
Makefile:1598: recipe for target 'wpa_supplicant' failed
make: *** [wpa_supplicant] Error 1

Here's OpenBSD port's config file:

---8<---

# $OpenBSD: config,v 1.3 2013/02/06 17:27:13 sthen Exp $
# see defconfig and README for notes

CFLAGS += -I${LOCALBASE}/include/PCSC
LIBS += -L${LOCALBASE}/lib

CONFIG_BACKEND=file
CONFIG_CTRL_IFACE=y
CONFIG_DRIVER_WIRED=y
CONFIG_DRIVER_OPENBSD=y
CONFIG_IEEE8021X_EAPOL=y
CONFIG_PEERKEY=y
CONFIG_PKCS12=y

CONFIG_EAP_MD5=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_TLS=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_TTLS=y
CONFIG_EAP_FAST=y
CONFIG_EAP_GTC=y
CONFIG_EAP_OTP=y
CONFIG_EAP_PSK=y
CONFIG_EAP_SAKE=y
CONFIG_EAP_GPSK=y
CONFIG_EAP_PAX=y
CONFIG_EAP_LEAP=y
CONFIG_EAP_IKEV2=y

CONFIG_EAP_AKA=y
CONFIG_EAP_SIM=y
CONFIG_PCSC=y
CONFIG_SMARTCARD=y

---8<---

And, indeed, the simple workaround below allows me to successfully
build wpa_supplicant-2.3 on OpenBSD:



Best Regards,
David

Comments

Jouni Malinen Oct. 12, 2014, 2:07 p.m. UTC | #1
On Fri, Oct 10, 2014 at 01:08:06PM +0200, David Coppa wrote:
> Code added by commits 86bd36f0d5b3d359075c356d68977b4d2e7c9f71 (Add
> generic mechanism for adding vendor elements into frames) and
> dc152f32b4fd8af8ec055e3d551523e62792a585 (wpa_supplicant: Enable
> HT for IBSS) makes use of functions from src/common/ieee802_11_common.c,
> i.e. ieee802_11_parse_elems() and ieee80211_freq_to_chan().
> 
> Those commits broke builds configured without CONFIG_DRIVER_NL80211,
> CONFIG_IEEE80211R, CONFIG_P2P, CONFIG_WPS, CONFIG_AP, CONFIG_SME
> (just like our port for OpenBSD) because NEED_80211_COMMON is never
> defined:
...

> And, indeed, the simple workaround below allows me to successfully
> build wpa_supplicant-2.3 on OpenBSD:
> @@ -1391,9 +1391,7 @@ OBJS += sme.o
> -ifdef NEED_80211_COMMON
>  OBJS += ../src/common/ieee802_11_common.o
> -endif

Thanks for reporting this. Functionality from that file is needed in so
many different cases that I think it is time for the NEED_80211_COMMON
complexity to disappear and get ieee802_11_common.c included
unconditionally into wpa_supplicant builds.
David Coppa Oct. 12, 2014, 5:50 p.m. UTC | #2
On Sun, Oct 12, 2014 at 4:07 PM, Jouni Malinen <j@w1.fi> wrote:
> On Fri, Oct 10, 2014 at 01:08:06PM +0200, David Coppa wrote:
>> Code added by commits 86bd36f0d5b3d359075c356d68977b4d2e7c9f71 (Add
>> generic mechanism for adding vendor elements into frames) and
>> dc152f32b4fd8af8ec055e3d551523e62792a585 (wpa_supplicant: Enable
>> HT for IBSS) makes use of functions from src/common/ieee802_11_common.c,
>> i.e. ieee802_11_parse_elems() and ieee80211_freq_to_chan().
>>
>> Those commits broke builds configured without CONFIG_DRIVER_NL80211,
>> CONFIG_IEEE80211R, CONFIG_P2P, CONFIG_WPS, CONFIG_AP, CONFIG_SME
>> (just like our port for OpenBSD) because NEED_80211_COMMON is never
>> defined:
> ...
>
>> And, indeed, the simple workaround below allows me to successfully
>> build wpa_supplicant-2.3 on OpenBSD:
>> @@ -1391,9 +1391,7 @@ OBJS += sme.o
>> -ifdef NEED_80211_COMMON
>>  OBJS += ../src/common/ieee802_11_common.o
>> -endif
>
> Thanks for reporting this. Functionality from that file is needed in so
> many different cases that I think it is time for the NEED_80211_COMMON
> complexity to disappear and get ieee802_11_common.c included
> unconditionally into wpa_supplicant builds.

This is exactly what I'd suggest.

Ciao!
David
diff mbox

Patch

--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1391,9 +1391,7 @@  OBJS += sme.o
 CFLAGS += -DCONFIG_SME
 endif
 
-ifdef NEED_80211_COMMON
 OBJS += ../src/common/ieee802_11_common.o
-endif
 
 ifdef NEED_EAP_COMMON
 OBJS += ../src/eap_common/eap_common.o