diff -r ./src/drivers/driver_bsd.c /usr/src/contrib/wpa/src/drivers/driver_bsd.c 79d78 < 729c728 < static int --- > static int 1082a1082,1086 > /* > * Ref bin/203086 - FreeBSD's net80211 currently uses > * IFM_IEEE80211_ADHOC. > */ > #if 0 1083a1088,1089 > #endif > mode = IFM_IEEE80211_ADHOC; 1129a1136,1142 > /* > * NB: interface must be marked UP for association > * or scanning (ap_scan=2) > */ > if (bsd_ctrl_iface(drv, 1) < 0) > return -1; > 1492a1506,1516 > #ifdef __FreeBSD__ > drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 | > WPA_DRIVER_CAPA_ENC_WEP104 | > WPA_DRIVER_CAPA_ENC_TKIP | > WPA_DRIVER_CAPA_ENC_CCMP; > #else > /* > * XXX > * FreeBSD exports hardware cryptocaps. These have no meaning for wpa > * since net80211 performs software crypto. > */ 1499a1524 > #endif 1551a1577,1578 > if (ifmr.ifm_current & IFM_IEEE80211_IBSS) > return IEEE80211_M_IBSS; diff -r ./src/drivers/driver_ndis.c /usr/src/contrib/wpa/src/drivers/driver_ndis.c 60a61 > #define OID_802_3_MULTICAST_LIST 0x01010103 2101,2105c2102 < drv->adapter_desc = os_malloc(dlen + 1); < if (drv->adapter_desc) { < os_memcpy(drv->adapter_desc, desc, dlen); < drv->adapter_desc[dlen] = '\0'; < } --- > drv->adapter_desc = dup_binstr(desc, dlen); 2273,2277c2270 < drv->adapter_desc = os_malloc(dlen + 1); < if (drv->adapter_desc) { < os_memcpy(drv->adapter_desc, desc[i], dlen); < drv->adapter_desc[dlen] = '\0'; < } --- > drv->adapter_desc = dup_binstr(desc[i], dlen); diff -r ./src/l2_packet/l2_packet_freebsd.c /usr/src/contrib/wpa/src/l2_packet/l2_packet_freebsd.c 11,14c11 < #if defined(__FreeBSD__) \ < || defined(__DragonFly__) \ < || defined(__APPLE__) \ < || defined(__GLIBC__) --- > #if defined(__APPLE__) || defined(__GLIBC__) diff -r ./src/utils/os_unix.c /usr/src/contrib/wpa/src/utils/os_unix.c 217a218,223 > #ifdef __FreeBSD__ > #include > #include > #include > #endif /* __FreeBSD__ */ > 222a229,242 > #ifdef __FreeBSD__ > pid_t otherpid; > struct pidfh *pfh; > > pfh = pidfile_open(pid_file, 0600, &otherpid); > if (pfh == NULL) { > if (errno == EEXIST) { > errx(1, "Daemon already running, pid: %jd.", > (intmax_t)otherpid); > } > warn("Cannot open or create pidfile."); > } > #endif /* __FreeBSD__ */ > 224a245,247 > #ifdef __FreeBSD__ > pidfile_remove(pfh); > #endif /* __FreeBSD__ */ 227a251 > #ifndef __FreeBSD__ 234a259,261 > #else /* __FreeBSD__ */ > pidfile_write(pfh); > #endif /* __FreeBSD__ */ Only in ./src/wps: Makefile diff -r ./src/wps/wps_upnp.c /usr/src/contrib/wpa/src/wps/wps_upnp.c 843,844c843 < #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \ < || defined(__DragonFly__) --- > #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) 931,932c930 < #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \ < || defined(__DragonFly__) --- > #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) diff -r ./wpa_supplicant/main.c /usr/src/contrib/wpa/wpa_supplicant/main.c 69c69 < " -D = driver name (can be multiple drivers: bsd,wired)\n" --- > " -D = driver name (can be multiple drivers: nl80211,wext)\n" 108c108,109 < " wpa_supplicant -Dbsd -iwlan0 -c/etc/wpa_supplicant.conf\n"); --- > " wpa_supplicant -D%s -iwlan0 -c/etc/wpa_supplicant.conf\n", > wpa_drivers[0] ? wpa_drivers[0]->name : "nl80211"); 200,204d200 < < #ifdef CONFIG_DRIVER_NDIS < void driver_ndis_init_ops(void); < driver_ndis_init_ops(); < #endif /* CONFIG_DRIVER_NDIS */ diff -r ./wpa_supplicant/scan.c /usr/src/contrib/wpa/wpa_supplicant/scan.c 1749c1749 < #define MINAB(a,b) a < b ? a : b --- > #define MIN(a,b) a < b ? a : b 1778c1778 < snr_a = MINAB(wa->snr, GREAT_SNR); --- > snr_a = MIN(wa->snr, GREAT_SNR); 1780c1780 < snr_b = MINAB(wb->snr, GREAT_SNR); --- > snr_b = MIN(wb->snr, GREAT_SNR); 1803c1803 < #undef MINAB --- > #undef MIN diff -r ./wpa_supplicant/wpa_priv.c /usr/src/contrib/wpa/wpa_supplicant/wpa_priv.c 1115d1114 < int eloop_initialized = 0; 1158d1156 < else eloop_initialized = 1; 1192,1193c1190 < if (eloop_initialized) < eloop_destroy(); --- > eloop_destroy(); diff -r ./wpa_supplicant/wpa_supplicant.c /usr/src/contrib/wpa/wpa_supplicant/wpa_supplicant.c 5391c5391 < #ifdef XXXCONFIG_DRIVER_NDIS --- > #ifdef CONFIG_DRIVER_NDIS diff -r ./wpa_supplicant/wpa_supplicant.conf /usr/src/contrib/wpa/wpa_supplicant/wpa_supplicant.conf 2a3,4 > # ***** Please check wpa_supplicant.conf(5) for details on these options ***** > # 62,74d63 < # For UDP connections (default on Windows): The value will be ignored. This < # variable is just used to select that the control interface is to be created. < # The value can be set to, e.g., udp (ctrl_interface=udp) < # < # For Windows Named Pipe: This value can be used to set the security descriptor < # for controlling access to the control interface. Security descriptor can be < # set using Security Descriptor String Format (see http://msdn.microsoft.com/ < # library/default.asp?url=/library/en-us/secauthz/security/ < # security_descriptor_string_format.asp). The descriptor string needs to be < # prefixed with SDDL=. For example, ctrl_interface=SDDL=D: would set an empty < # DACL (which will reject all connections). See README-Windows.txt for more < # information about SDDL string format. < # 111,114c100,102 < # Note: ap_scan=2 should not be used with the nl80211 driver interface (the < # current Linux interface). ap_scan=1 is optimized work working with nl80211. < # For finding networks using hidden SSID, scan_ssid=1 in the network block can < # be used with nl80211. --- > # > # For use in FreeBSD with the wlan module ap_scan must be set to 1. > # 717c705 < # find APs that do not accept broadcast SSID or use multiple SSIDs; --- > # find APs that hide (do not broadcast) SSID or use multiple SSIDs; 733c721 < # networks in the order that used in the configuration file. --- > # networks in the order that they are listed in the configuration file.