--- security/wpa_supplicant/Makefile (revision 532404) +++ security/wpa_supplicant/Makefile (working copy) @@ -2,7 +2,7 @@ PORTNAME= wpa_supplicant PORTVERSION= 2.9 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= security net MASTER_SITES= https://w1.fi/releases/ @@ -39,7 +39,7 @@ HT_OVERRIDES VHT_OVERRIDES TLSV12 IEEE80211W \ IEEE80211R DEBUG_FILE DEBUG_SYSLOG PRIVSEP \ DELAYED_MIC IEEE80211N IEEE80211AC INTERWORKING \ - IEEE8021X_EAPOL \ + IEEE8021X_EAPOL EAPOL_TEST \ HS20 NO_ROAMING P2P TDLS DBUS DOCS OPTIONS_DEFAULT= BSD WIRED NDIS \ TLS PEAP TTLS MD5 MSCHAPV2 GTC LEAP OTP PSK \ @@ -63,6 +63,7 @@ IEEE80211R_DESC= Fast BSS Transition (IEEE 802.11r-2008) IEEE80211W_DESC= Management Frame Protection (IEEE 802.11w) IEEE8021X_EAPOL_DESC= EAP over LAN support +EAPOL_TEST_DESC= Development testing DEBUG_FILE_DESC= Support for writing debug log to a file DEBUG_SYSLOG_DESC= Send debug messages to syslog instead of stdout PRIVSEP_DESC= Privilege separation @@ -148,7 +149,7 @@ .endif .for simple in WPS WPS_ER WPS_NFC WPS_UPNP PKCS12 SMARTCARD HT_OVERRIDES \ VHT_OVERRIDES TLSV12 IEEE80211AC IEEE80211N IEEE80211R IEEE80211W \ - IEEE8021X_EAPOL \ + IEEE8021X_EAPOL EAPOL_TEST \ INTERWORKING DEBUG_FILE DEBUG_SYSLOG HS20 NO_ROAMING PRIVSEP P2P TDLS . if ${PORT_OPTIONS:M${simple}} @${ECHO_CMD} CONFIG_${simple}=y >> ${CFG} @@ -180,6 +181,15 @@ @${ECHO_CMD} CONFIG_L2_PACKET=freebsd >> ${CFG} @${ECHO_CMD} CONFIG_TLS=openssl >> ${CFG} +.if ${PORT_OPTIONS:MEAPOL_TEST} +PLIST_SUB+= EAPOL_TEST="" +.else +PLIST_SUB+= EAPOL_TEST="@comment " +.endif + +post-build-EAPOL_TEST-on: + cd ${BUILD_WRKSRC} && ${GMAKE} eapol_test + do-install: (cd ${BUILD_WRKSRC} && ${INSTALL_PROGRAM} wpa_supplicant wpa_cli \ wpa_passphrase ${STAGEDIR}${PREFIX}/sbin) @@ -186,6 +196,9 @@ ${INSTALL_DATA} ${BUILD_WRKSRC}/wpa_supplicant.conf \ ${STAGEDIR}${PREFIX}/etc/wpa_supplicant.conf.sample +do-install-EAPOL_TEST-on: + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/eapol_test ${STAGEDIR}${PREFIX}/sbin + do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${BUILD_WRKSRC} && \ --- security/wpa_supplicant/files/Packet32.c (revision 532404) +++ security/wpa_supplicant/files/Packet32.c (working copy) @@ -114,7 +114,6 @@ { struct adapter *a; int s; - int ifflags; struct ifreq ifr; struct ieee80211req ireq; @@ -245,7 +244,7 @@ char *buf, *lim, *next; char *plist; int spc; - int i, ifcnt = 0; + int ifcnt = 0; plist = namelist; spc = 0; --- security/wpa_supplicant/files/ntddndis.h (revision 532404) +++ security/wpa_supplicant/files/ntddndis.h (working copy) @@ -11,7 +11,11 @@ #define UCHAR uint8_t #define LONG int32_t #define SHORT int16_t +#if __FreeBSD__ +#define CHAR char +#else #define CHAR int8_t +#endif #define ULONGLONG uint64_t #define LONGLONG int64_t #define BOOLEAN uint8_t --- security/wpa_supplicant/files/patch-src_drivers_driver__ndis.c (revision 532404) +++ security/wpa_supplicant/files/patch-src_drivers_driver__ndis.c (working copy) @@ -1,6 +1,67 @@ ---- src/drivers/driver_ndis.c.orig 2015-03-15 17:30:39 UTC +--- src/drivers/driver_ndis.c.orig 2019-08-07 13:25:25 UTC +++ src/drivers/driver_ndis.c -@@ -2110,7 +2110,11 @@ static int wpa_driver_ndis_get_names(str +@@ -504,13 +504,13 @@ static int ndis_get_oid(struct wpa_drive + o->Length = len; + + if (!PacketRequest(drv->adapter, FALSE, o)) { +- wpa_printf(MSG_DEBUG, "%s: oid=0x%x len (%d) failed", ++ wpa_printf(MSG_DEBUG, "%s: oid=0x%x len (%lu) failed", + __func__, oid, len); + os_free(buf); + return -1; + } + if (o->Length > len) { +- wpa_printf(MSG_DEBUG, "%s: oid=0x%x Length (%d) > len (%d)", ++ wpa_printf(MSG_DEBUG, "%s: oid=0x%x Length (%d) > len (%lu)", + __func__, oid, (unsigned int) o->Length, len); + os_free(buf); + return -1; +@@ -573,7 +573,7 @@ static int ndis_set_oid(struct wpa_drive + os_memcpy(o->Data, data, len); + + if (!PacketRequest(drv->adapter, TRUE, o)) { +- wpa_printf(MSG_DEBUG, "%s: oid=0x%x len (%d) failed", ++ wpa_printf(MSG_DEBUG, "%s: oid=0x%x len (%lu) failed", + __func__, oid, len); + os_free(buf); + return -1; +@@ -1531,7 +1531,7 @@ static void wpa_driver_ndis_event_auth(s + + if (data_len < sizeof(*req)) { + wpa_printf(MSG_DEBUG, "NDIS: Too short Authentication Request " +- "Event (len=%d)", data_len); ++ "Event (len=%lu)", data_len); + return; + } + req = (NDIS_802_11_AUTHENTICATION_REQUEST *) data; +@@ -1565,7 +1565,7 @@ static void wpa_driver_ndis_event_pmkid( + + if (data_len < 8) { + wpa_printf(MSG_DEBUG, "NDIS: Too short PMKID Candidate List " +- "Event (len=%d)", data_len); ++ "Event (len=%lu)", data_len); + return; + } + pmkid = (NDIS_802_11_PMKID_CANDIDATE_LIST *) data; +@@ -1587,7 +1587,7 @@ static void wpa_driver_ndis_event_pmkid( + os_memset(&event, 0, sizeof(event)); + for (i = 0; i < pmkid->NumCandidates; i++) { + PMKID_CANDIDATE *p = &pmkid->CandidateList[i]; +- wpa_printf(MSG_DEBUG, "NDIS: %d: " MACSTR " Flags 0x%x", ++ wpa_printf(MSG_DEBUG, "NDIS: %lu: " MACSTR " Flags 0x%x", + i, MAC2STR(p->BSSID), (int) p->Flags); + os_memcpy(event.pmkid_candidate.bssid, p->BSSID, ETH_ALEN); + event.pmkid_candidate.index = i; +@@ -1778,7 +1778,7 @@ static void wpa_driver_ndis_get_capabili + "overflow"); + break; + } +- wpa_printf(MSG_MSGDUMP, "NDIS: %d - auth %d encr %d", ++ wpa_printf(MSG_MSGDUMP, "NDIS: %lu - auth %d encr %d", + i, (int) ae->AuthModeSupported, + (int) ae->EncryptStatusSupported); + switch (ae->AuthModeSupported) { +@@ -2106,7 +2106,11 @@ static int wpa_driver_ndis_get_names(str dlen = dpos - desc; else dlen = os_strlen(desc); @@ -13,7 +74,7 @@ os_free(b); if (drv->adapter_desc == NULL) return -1; -@@ -2278,7 +2282,11 @@ static int wpa_driver_ndis_get_names(str +@@ -2274,7 +2278,11 @@ static int wpa_driver_ndis_get_names(str } else { dlen = os_strlen(desc[i]); } --- security/wpa_supplicant/pkg-plist (revision 532404) +++ security/wpa_supplicant/pkg-plist (working copy) @@ -1,3 +1,4 @@ +%%EAPOL_TEST%%sbin/eapol_test sbin/wpa_supplicant sbin/wpa_passphrase sbin/wpa_cli