security/wpa_supplicant: Upgrade version 2.3 => 2.4

See http://w1.fi/cgit/hostap/plain/wpa_supplicant/ChangeLog for list
of changes since version 2.3.
This commit is contained in:
John Marino 2015-03-16 20:45:16 +00:00
parent 41eefa365b
commit 248bca32f4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=381444
14 changed files with 40 additions and 85 deletions

View file

@ -1,8 +1,7 @@
# $FreeBSD$
PORTNAME= wpa_supplicant
PORTVERSION= 2.3
PORTREVISION= 3
PORTVERSION= 2.4
CATEGORIES= security net
MASTER_SITES= http://w1.fi/releases/
@ -17,10 +16,6 @@ CFLAGS+= ${CPPFLAGS} # USES=readline only augments CPPFLAGS and LDFLAGS
LDFLAGS= -lutil
SUB_FILES= pkg-message
PLIST_FILES= sbin/wpa_supplicant \
sbin/wpa_passphrase \
sbin/wpa_cli \
"@sample etc/wpa_supplicant.conf.sample"
PORTDOCS= README ChangeLog
CFG= ${BUILD_WRKSRC}/.config

View file

@ -1,2 +1,2 @@
SHA256 (wpa_supplicant-2.3.tar.gz) = eaaa5bf3055270e521b2dff64f2d203ec8040f71958b8588269a82c00c9d7b6a
SIZE (wpa_supplicant-2.3.tar.gz) = 2398722
SHA256 (wpa_supplicant-2.4.tar.gz) = 058dc832c096139a059e6df814080f50251a8d313c21b13364c54a1e70109122
SIZE (wpa_supplicant-2.4.tar.gz) = 2525648

View file

@ -1,4 +1,4 @@
--- src/l2_packet/l2_packet_freebsd.c.orig 2014-06-04 13:26:14 UTC
--- src/l2_packet/l2_packet_freebsd.c.orig 2015-03-15 17:30:39 UTC
+++ src/l2_packet/l2_packet_freebsd.c
@@ -8,7 +8,10 @@
*/

View file

@ -1,16 +0,0 @@
--- src/drivers/driver_bsd.c.orig 2014-10-09 14:41:31 UTC
+++ src/drivers/driver_bsd.c
@@ -1334,7 +1334,13 @@ wpa_driver_bsd_add_scan_entry(struct wpa
*pos++ = 1;
*pos++ = sr->isr_erp;
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
+ || defined(__DragonFly__)
+ os_memcpy(pos, (u8 *)(sr + 1) + sr->isr_ssid_len + sr->isr_meshid_len,
+ sr->isr_ie_len);
+#else
os_memcpy(pos, (u8 *)(sr + 1) + sr->isr_ssid_len, sr->isr_ie_len);
+#endif
pos += sr->isr_ie_len;
result->ie_len = pos - (u8 *)(result + 1);

View file

@ -1,4 +1,4 @@
--- src/drivers/driver_ndis.c.orig 2014-10-09 14:41:31 UTC
--- src/drivers/driver_ndis.c.orig 2015-03-15 17:30:39 UTC
+++ src/drivers/driver_ndis.c
@@ -2110,7 +2110,11 @@ static int wpa_driver_ndis_get_names(str
dlen = dpos - desc;

View file

@ -1,20 +0,0 @@
--- src/drivers/driver_privsep.c.orig 2014-10-09 14:41:31 UTC
+++ src/drivers/driver_privsep.c
@@ -228,7 +228,7 @@ static int wpa_driver_privsep_associate(
wpa_printf(MSG_DEBUG, "%s: priv=%p freq=%d pairwise_suite=%d "
"group_suite=%d key_mgmt_suite=%d auth_alg=%d mode=%d",
- __func__, priv, params->freq, params->pairwise_suite,
+ __func__, priv, params->freq.freq, params->pairwise_suite,
params->group_suite, params->key_mgmt_suite,
params->auth_alg, params->mode);
@@ -241,7 +241,7 @@ static int wpa_driver_privsep_associate(
os_memcpy(data->bssid, params->bssid, ETH_ALEN);
os_memcpy(data->ssid, params->ssid, params->ssid_len);
data->ssid_len = params->ssid_len;
- data->freq = params->freq;
+ data->freq = params->freq.freq;
data->pairwise_suite = params->pairwise_suite;
data->group_suite = params->group_suite;
data->key_mgmt_suite = params->key_mgmt_suite;

View file

@ -1,4 +1,4 @@
--- src/utils/os_unix.c.orig 2014-10-09 14:41:31 UTC
--- src/utils/os_unix.c.orig 2015-03-15 17:30:39 UTC
+++ src/utils/os_unix.c
@@ -190,17 +190,42 @@ static int os_daemon(int nochdir, int no
#define os_daemon daemon
@ -51,7 +51,7 @@
return -0;
#endif /* defined(__uClinux__) || defined(__sun__) */
@@ -360,7 +386,7 @@ int os_setenv(const char *name, const ch
@@ -357,7 +383,7 @@ int os_setenv(const char *name, const ch
int os_unsetenv(const char *name)
{

View file

@ -1,6 +1,6 @@
--- src/wps/wps_upnp.c.orig 2014-10-09 14:41:31 UTC
--- src/wps/wps_upnp.c.orig 2015-03-15 17:30:39 UTC
+++ src/wps/wps_upnp.c
@@ -829,7 +829,8 @@ fail:
@@ -837,7 +837,8 @@ fail:
}
@ -10,7 +10,7 @@
#include <sys/sysctl.h>
#include <net/route.h>
#include <net/if_dl.h>
@@ -916,7 +917,8 @@ int get_netif_info(const char *net_if, u
@@ -924,7 +925,8 @@ int get_netif_info(const char *net_if, u
goto fail;
}
os_memcpy(mac, req.ifr_addr.sa_data, 6);

View file

@ -1,6 +1,6 @@
--- wpa_supplicant/Makefile.orig 2014-10-09 14:41:31 UTC
--- wpa_supplicant/Makefile.orig 2015-03-15 17:30:39 UTC
+++ wpa_supplicant/Makefile
@@ -97,6 +97,14 @@ OBJS += ../src/utils/os_$(CONFIG_OS).o
@@ -99,6 +99,14 @@ OBJS += ../src/utils/os_$(CONFIG_OS).o
OBJS_p += ../src/utils/os_$(CONFIG_OS).o
OBJS_c += ../src/utils/os_$(CONFIG_OS).o

View file

@ -1,4 +1,4 @@
--- wpa_supplicant/main.c.orig 2014-10-09 14:41:31 UTC
--- wpa_supplicant/main.c.orig 2015-03-15 17:30:39 UTC
+++ wpa_supplicant/main.c
@@ -173,6 +173,11 @@ int main(int argc, char *argv[])

View file

@ -1,31 +1,32 @@
--- wpa_supplicant/scan.c.orig 2014-10-09 14:41:31 UTC
--- wpa_supplicant/scan.c.orig 2015-03-15 17:30:39 UTC
+++ wpa_supplicant/scan.c
@@ -1548,7 +1548,7 @@ struct wpabuf * wpa_scan_get_vendor_ie_m
@@ -1621,7 +1621,7 @@ struct wpabuf * wpa_scan_get_vendor_ie_m
* better. */
static int wpa_scan_result_compar(const void *a, const void *b)
{
#define IS_5GHZ(n) (n > 4000)
-#define MIN(a,b) a < b ? a : b
+#define MINAB(a,b) a < b ? a : b
struct wpa_scan_res **_wa = (void *) a;
struct wpa_scan_res **_wb = (void *) b;
struct wpa_scan_res *wa = *_wa;
@@ -1577,8 +1577,8 @@ static int wpa_scan_result_compar(const
@@ -1650,9 +1650,9 @@ static int wpa_scan_result_compar(const
if ((wa->flags & wb->flags & WPA_SCAN_LEVEL_DBM) &&
!((wa->flags | wb->flags) & WPA_SCAN_NOISE_INVALID)) {
- snr_a = MIN(wa->level - wa->noise, GREAT_SNR);
- snr_b = MIN(wb->level - wb->noise, GREAT_SNR);
+ snr_a = MINAB(wa->level - wa->noise, GREAT_SNR);
+ snr_b = MINAB(wb->level - wb->noise, GREAT_SNR);
if (wa->flags & wb->flags & WPA_SCAN_LEVEL_DBM) {
snr_a_full = wa->snr;
- snr_a = MIN(wa->snr, GREAT_SNR);
+ snr_a = MINAB(wa->snr, GREAT_SNR);
snr_b_full = wb->snr;
- snr_b = MIN(wa->snr, GREAT_SNR);
+ snr_b = MINAB(wa->snr, GREAT_SNR);
} else {
/* Not suitable information to calculate SNR, so use level */
snr_a = wa->level;
@@ -1604,7 +1604,7 @@ static int wpa_scan_result_compar(const
if (snr_b == snr_a)
/* Level is not in dBm, so we can't calculate
* SNR. Just use raw level (units unknown). */
@@ -1675,7 +1675,7 @@ static int wpa_scan_result_compar(const
if (snr_b_full == snr_a_full)
return wb->qual - wa->qual;
return snr_b - snr_a;
return snr_b_full - snr_a_full;
-#undef MIN
+#undef MINAB
#undef IS_5GHZ
}

View file

@ -1,15 +1,6 @@
--- wpa_supplicant/wpa_priv.c.orig 2014-10-09 14:41:31 UTC
--- wpa_supplicant/wpa_priv.c.orig 2015-03-15 17:30:39 UTC
+++ wpa_supplicant/wpa_priv.c
@@ -202,7 +202,7 @@ static void wpa_priv_cmd_associate(struc
if (assoc->ssid_len > 32)
return;
params.ssid_len = assoc->ssid_len;
- params.freq = assoc->freq;
+ params.freq.freq = assoc->freq;
if (assoc->wpa_ie_len) {
params.wpa_ie = (u8 *) (assoc + 1);
params.wpa_ie_len = assoc->wpa_ie_len;
@@ -947,6 +947,7 @@ static void usage(void)
@@ -952,6 +952,7 @@ static void usage(void)
int main(int argc, char *argv[])
{
int c, i;
@ -17,7 +8,7 @@
int ret = -1;
char *pid_file = NULL;
int daemonize = 0;
@@ -992,6 +993,7 @@ int main(int argc, char *argv[])
@@ -997,6 +998,7 @@ int main(int argc, char *argv[])
wpa_printf(MSG_ERROR, "Failed to initialize event loop");
goto out;
}
@ -25,7 +16,7 @@
for (i = optind; i < argc; i++) {
wpa_printf(MSG_DEBUG, "Adding driver:interface %s", argv[i]);
@@ -1018,7 +1020,8 @@ out:
@@ -1023,7 +1025,8 @@ out:
wpa_priv_interface_deinit(prev);
}

View file

@ -1,6 +1,6 @@
--- wpa_supplicant/wpa_supplicant.c.orig 2014-10-09 14:41:31 UTC
--- wpa_supplicant/wpa_supplicant.c.orig 2015-03-15 17:30:39 UTC
+++ wpa_supplicant/wpa_supplicant.c
@@ -4098,7 +4098,7 @@ struct wpa_global * wpa_supplicant_init(
@@ -4506,7 +4506,7 @@ struct wpa_global * wpa_supplicant_init(
if (params == NULL)
return NULL;

View file

@ -0,0 +1,4 @@
sbin/wpa_supplicant
sbin/wpa_passphrase
sbin/wpa_cli
@sample etc/wpa_supplicant.conf.sample