diff --git a/security/wpa_supplicant/Makefile b/security/wpa_supplicant/Makefile index ffdc0c6c7842..408dac74b8a8 100644 --- a/security/wpa_supplicant/Makefile +++ b/security/wpa_supplicant/Makefile @@ -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 diff --git a/security/wpa_supplicant/distinfo b/security/wpa_supplicant/distinfo index 0da8b57d35df..fd0369c09348 100644 --- a/security/wpa_supplicant/distinfo +++ b/security/wpa_supplicant/distinfo @@ -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 diff --git a/security/wpa_supplicant/files/patch-src-l2_packet-l2_packet_freebsd.c b/security/wpa_supplicant/files/patch-src-l2_packet-l2_packet_freebsd.c index 8b34e0fbdd89..c09efb89401b 100644 --- a/security/wpa_supplicant/files/patch-src-l2_packet-l2_packet_freebsd.c +++ b/security/wpa_supplicant/files/patch-src-l2_packet-l2_packet_freebsd.c @@ -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 @@ */ diff --git a/security/wpa_supplicant/files/patch-src_drivers_driver__bsd.c b/security/wpa_supplicant/files/patch-src_drivers_driver__bsd.c deleted file mode 100644 index 1d4447cc96bf..000000000000 --- a/security/wpa_supplicant/files/patch-src_drivers_driver__bsd.c +++ /dev/null @@ -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); diff --git a/security/wpa_supplicant/files/patch-src_drivers_driver__ndis.c b/security/wpa_supplicant/files/patch-src_drivers_driver__ndis.c index 5c9ffe9e60d4..56348691d494 100644 --- a/security/wpa_supplicant/files/patch-src_drivers_driver__ndis.c +++ b/security/wpa_supplicant/files/patch-src_drivers_driver__ndis.c @@ -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; diff --git a/security/wpa_supplicant/files/patch-src_drivers_driver__privsep.c b/security/wpa_supplicant/files/patch-src_drivers_driver__privsep.c deleted file mode 100644 index e712ea305728..000000000000 --- a/security/wpa_supplicant/files/patch-src_drivers_driver__privsep.c +++ /dev/null @@ -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; diff --git a/security/wpa_supplicant/files/patch-src_utils_os__unix.c b/security/wpa_supplicant/files/patch-src_utils_os__unix.c index 2ddeeb3ceacf..a789722b0e50 100644 --- a/security/wpa_supplicant/files/patch-src_utils_os__unix.c +++ b/security/wpa_supplicant/files/patch-src_utils_os__unix.c @@ -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) { diff --git a/security/wpa_supplicant/files/patch-src_wps_wps__upnp.c b/security/wpa_supplicant/files/patch-src_wps_wps__upnp.c index c8e6ed1eed27..00eab87b6ac2 100644 --- a/security/wpa_supplicant/files/patch-src_wps_wps__upnp.c +++ b/security/wpa_supplicant/files/patch-src_wps_wps__upnp.c @@ -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 #include #include -@@ -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); diff --git a/security/wpa_supplicant/files/patch-wpa__supplicant_Makefile b/security/wpa_supplicant/files/patch-wpa__supplicant_Makefile index cff0ed1d16fe..9f1393fb85da 100644 --- a/security/wpa_supplicant/files/patch-wpa__supplicant_Makefile +++ b/security/wpa_supplicant/files/patch-wpa__supplicant_Makefile @@ -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 diff --git a/security/wpa_supplicant/files/patch-wpa__supplicant_main.c b/security/wpa_supplicant/files/patch-wpa__supplicant_main.c index 7ddc41de535d..3605a93a72e2 100644 --- a/security/wpa_supplicant/files/patch-wpa__supplicant_main.c +++ b/security/wpa_supplicant/files/patch-wpa__supplicant_main.c @@ -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[]) diff --git a/security/wpa_supplicant/files/patch-wpa__supplicant_scan.c b/security/wpa_supplicant/files/patch-wpa__supplicant_scan.c index 45f7272eddab..9ef6eefbf409 100644 --- a/security/wpa_supplicant/files/patch-wpa__supplicant_scan.c +++ b/security/wpa_supplicant/files/patch-wpa__supplicant_scan.c @@ -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 } + diff --git a/security/wpa_supplicant/files/patch-wpa__supplicant_wpa__priv.c b/security/wpa_supplicant/files/patch-wpa__supplicant_wpa__priv.c index 17b78d4fac3d..3fb38135c859 100644 --- a/security/wpa_supplicant/files/patch-wpa__supplicant_wpa__priv.c +++ b/security/wpa_supplicant/files/patch-wpa__supplicant_wpa__priv.c @@ -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); } diff --git a/security/wpa_supplicant/files/patch-wpa__supplicant_wpa__supplicant.c b/security/wpa_supplicant/files/patch-wpa__supplicant_wpa__supplicant.c index 36f894fd193a..cd1b6b947ada 100644 --- a/security/wpa_supplicant/files/patch-wpa__supplicant_wpa__supplicant.c +++ b/security/wpa_supplicant/files/patch-wpa__supplicant_wpa__supplicant.c @@ -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; diff --git a/security/wpa_supplicant/pkg-plist b/security/wpa_supplicant/pkg-plist new file mode 100644 index 000000000000..df25d0ff16da --- /dev/null +++ b/security/wpa_supplicant/pkg-plist @@ -0,0 +1,4 @@ +sbin/wpa_supplicant +sbin/wpa_passphrase +sbin/wpa_cli +@sample etc/wpa_supplicant.conf.sample