net/hostapd: Update to 2.10

The long awaited hostapd 2.10 is finally here.
This commit is contained in:
Cy Schubert
2022-01-17 08:15:43 -08:00
parent d3564c5610
commit f5e549a9f4
5 changed files with 28 additions and 87 deletions

View File

@@ -1,16 +1,10 @@
# Created by: Craig Leres <leres@FreeBSD.org>
PORTNAME= hostapd
PORTVERSION= 2.9
PORTREVISION= 4
PORTVERSION= 2.10
CATEGORIES= net
MASTER_SITES= https://w1.fi/releases/
PATCH_SITES= https://w1.fi/security/2020-1/
PATCHFILES= 0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch:-p1 \
0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch:-p1 \
0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch:-p1
MAINTAINER= cy@FreeBSD.org
COMMENT= IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator

View File

@@ -1,9 +1,3 @@
TIMESTAMP = 1591652140
SHA256 (hostapd-2.9.tar.gz) = 881d7d6a90b2428479288d64233151448f8990ab4958e0ecaca7eeb3c9db2bd7
SIZE (hostapd-2.9.tar.gz) = 2244312
SHA256 (0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch) = 2d9a5b9d616f1b4aa4a22b967cee866e2f69b798b0b46803a7928c8559842bd7
SIZE (0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch) = 5909
SHA256 (0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch) = 49feb35a5276279b465f6836d6fa2c6b34d94dc979e8b840d1918865c04260de
SIZE (0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch) = 2284
SHA256 (0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch) = a8212a2d89a5bab2824d22b6047e7740553df163114fcec94832bfa9c5c5d78a
SIZE (0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch) = 1553
TIMESTAMP = 1642436112
SHA256 (hostapd-2.10.tar.gz) = 206e7c799b678572c2e3d12030238784bc4a9f82323b0156b4c9466f1498915d
SIZE (hostapd-2.10.tar.gz) = 2440435

View File

@@ -1,42 +1,6 @@
--- src/drivers/driver_bsd.c.orig 2019-08-07 06:25:25.000000000 -0700
+++ src/drivers/driver_bsd.c 2021-06-13 23:10:12.570253000 -0700
@@ -649,7 +649,7 @@
len = 2048;
}
- return len;
+ return (len == 0) ? 2048 : len;
}
#ifdef HOSTAPD
@@ -665,7 +665,11 @@
static int bsd_sta_deauth(void *priv, const u8 *own_addr, const u8 *addr,
u16 reason_code);
+#ifdef __DragonFly__
+const char *
+#else
static const char *
+#endif
ether_sprintf(const u8 *addr)
{
static char buf[sizeof(MACSTR)];
@@ -1080,7 +1084,14 @@
mode = 0 /* STA */;
break;
case IEEE80211_MODE_IBSS:
+ /*
+ * Ref bin/203086 - FreeBSD's net80211 currently uses
+ * IFM_IEEE80211_ADHOC.
+ */
+#if 0
mode = IFM_IEEE80211_IBSS;
+#endif
+ mode = IFM_IEEE80211_ADHOC;
break;
case IEEE80211_MODE_AP:
mode = IFM_IEEE80211_HOSTAP;
@@ -1336,14 +1347,18 @@
--- src/drivers/driver_bsd.c.orig 2021-06-02 14:11:18.000000000 -0700
+++ src/drivers/driver_bsd.c 2021-06-13 23:11:15.089256000 -0700
@@ -853,14 +853,18 @@
drv = bsd_get_drvindex(global, ifm->ifm_index);
if (drv == NULL)
return;
@@ -58,3 +22,18 @@
wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' UP",
drv->ifname);
wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_ENABLED,
@@ -1220,7 +1224,14 @@
mode = 0 /* STA */;
break;
case IEEE80211_MODE_IBSS:
+ /*
+ * Ref bin/203086 - FreeBSD's net80211 currently uses
+ * IFM_IEEE80211_ADHOC.
+ */
+#if 0
mode = IFM_IEEE80211_IBSS;
+#endif
+ mode = IFM_IEEE80211_ADHOC;
break;
case IEEE80211_MODE_AP:
mode = IFM_IEEE80211_HOSTAP;

View File

@@ -1,18 +0,0 @@
--- src/utils/os_unix.c.orig 2015-09-27 19:02:05 UTC
+++ src/utils/os_unix.c
@@ -442,6 +442,7 @@ int os_file_exists(const char *fname)
}
+#if !defined __FreeBSD__ && !defined __DragonFly__
int os_fdatasync(FILE *stream)
{
if (!fflush(stream)) {
@@ -459,6 +460,7 @@ int os_fdatasync(FILE *stream)
return -1;
}
+#endif
#ifndef WPA_TRACE

View File

@@ -1,20 +1,12 @@
--- src/wps/wps_upnp.c.orig 2015-03-15 17:30:39 UTC
+++ src/wps/wps_upnp.c
@@ -837,7 +837,7 @@ fail:
}
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
#include <sys/sysctl.h>
#include <net/route.h>
#include <net/if_dl.h>
@@ -924,7 +924,7 @@ int get_netif_info(const char *net_if, u
--- src/wps/wps_upnp.c.orig 2021-03-16 13:50:10.000000000 -0700
+++ src/wps/wps_upnp.c 2021-03-18 12:49:19.537874000 -0700
@@ -963,7 +963,8 @@
goto fail;
}
os_memcpy(mac, req.ifr_addr.sa_data, 6);
-#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
-#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) \
+ || defined(__DragonFly__)
if (eth_get(net_if, mac) < 0) {
wpa_printf(MSG_ERROR, "WPS UPnP: Failed to get MAC address");
goto fail;