diff --git a/net/hostapd/Makefile b/net/hostapd/Makefile index a87a8ed33515..97e774f07b94 100644 --- a/net/hostapd/Makefile +++ b/net/hostapd/Makefile @@ -1,46 +1,40 @@ # Created by: Craig Leres 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 LICENSE= BSD3CLAUSE USES= cpe gmake ssl CPE_VENDOR= w1.fi BUILD_WRKSRC= ${WRKSRC}/hostapd CFLAGS+= -I${OPENSSLINC} LDFLAGS+= -L${OPENSSLLIB} PLIST_FILES= sbin/hostapd sbin/hostapd_cli man/man1/hostapd_cli.1.gz \ man/man8/hostapd.8.gz .if !exists(/etc/rc.d/hostapd) USE_RC_SUBR= hostapd .endif post-patch: @${REINPLACE_CMD} -e 's|@$$(E) " CC " $$<|@$$(E) " $$(CC) " $$<|' \ ${BUILD_WRKSRC}/Makefile @${SED} -e 's|@PREFIX@|${PREFIX}|g' ${FILESDIR}/config \ >> ${WRKSRC}/hostapd/.config do-install: ${INSTALL_PROGRAM} ${WRKSRC}/hostapd/hostapd ${STAGEDIR}${PREFIX}/sbin ${INSTALL_PROGRAM} ${WRKSRC}/hostapd/hostapd_cli \ ${STAGEDIR}${PREFIX}/sbin ${INSTALL_MAN} ${WRKSRC}/hostapd/hostapd_cli.1 \ ${STAGEDIR}${MANPREFIX}/man/man1 ${INSTALL_MAN} ${WRKSRC}/hostapd/hostapd.8 \ ${STAGEDIR}${MANPREFIX}/man/man8 .include diff --git a/net/hostapd/distinfo b/net/hostapd/distinfo index c6fd159e26c4..784e7e6d9238 100644 --- a/net/hostapd/distinfo +++ b/net/hostapd/distinfo @@ -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 diff --git a/net/hostapd/files/patch-src_drivers_driver__bsd.c b/net/hostapd/files/patch-src_drivers_driver__bsd.c index fe3064586710..9a37a1de0174 100644 --- a/net/hostapd/files/patch-src_drivers_driver__bsd.c +++ b/net/hostapd/files/patch-src_drivers_driver__bsd.c @@ -1,60 +1,39 @@ ---- 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; - if ((ifm->ifm_flags & IFF_UP) == 0 && - (drv->flags & IFF_UP) != 0) { + if (((ifm->ifm_flags & IFF_UP) == 0 || + (ifm->ifm_flags & IFF_RUNNING) == 0) && + (drv->flags & IFF_UP) != 0 && + (drv->flags & IFF_RUNNING) != 0) { wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' DOWN", drv->ifname); wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_DISABLED, NULL); } else if ((ifm->ifm_flags & IFF_UP) != 0 && - (drv->flags & IFF_UP) == 0) { + (ifm->ifm_flags & IFF_RUNNING) != 0 && + ((drv->flags & IFF_UP) == 0 || + (drv->flags & IFF_RUNNING) == 0)) { 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; diff --git a/net/hostapd/files/patch-src_utils_os__unix.c b/net/hostapd/files/patch-src_utils_os__unix.c deleted file mode 100644 index c56eee136a44..000000000000 --- a/net/hostapd/files/patch-src_utils_os__unix.c +++ /dev/null @@ -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 diff --git a/net/hostapd/files/patch-src_wps_wps__upnp.c b/net/hostapd/files/patch-src_wps_wps__upnp.c index 1e3651d33162..ee10b79e48aa 100644 --- a/net/hostapd/files/patch-src_wps_wps__upnp.c +++ b/net/hostapd/files/patch-src_wps_wps__upnp.c @@ -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 - #include - #include -@@ -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;