summaryrefslogtreecommitdiff
path: root/net/hostapd/files
diff options
context:
space:
mode:
Diffstat (limited to 'net/hostapd/files')
-rw-r--r--net/hostapd/files/patch-src_drivers_driver__bsd.c57
-rw-r--r--net/hostapd/files/patch-src_utils_os__unix.c18
-rw-r--r--net/hostapd/files/patch-src_wps_wps__upnp.c20
3 files changed, 24 insertions, 71 deletions
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,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;
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 <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;