Commit graph

198 commits

Author SHA1 Message Date
Warner Losh b144e70a33 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit fa9896e082)
2023-08-23 11:43:31 -06:00
Warner Losh 023fc80ee3 Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit d0b2dbfa0e)
2023-08-23 11:43:30 -06:00
Warner Losh 3d497e17eb Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in main:
(cherry picked from commit 1d386b48a5)
2023-08-23 11:43:26 -06:00
Warner Losh 34041aac83 Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit 42b388439b)
2023-08-23 11:43:22 -06:00
Warner Losh 17da660ad5 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit b3e7694832)
2023-08-23 11:43:21 -06:00
Dimitry Andric 40450c3acb WPA_DISTDIR does not need to end in a slash
Since all uses of the macro also append a slash, this leads to double
slashes.

MFC after:	3 days

(cherry picked from commit 9917049b60)
2022-07-19 20:00:56 +02:00
Cy Schubert e80d2b5448 wpa: Enable WEP by default
As of hostap 2.10, WEP is disabled by default. This of course is not a
bad thing but requires some planning and an announcment to remove WEP
support by default. A possible src.conf knob or letting users know they
should use the port instead might different options.

(cherry picked from commit 7999a7f2a8)
2022-07-05 17:31:32 -07:00
Cy Schubert 0fe8af4b2a wpa: Disable P2P in WPS
Disable P2P in WPS as it is not supported by FreeBSD. Also, it is not
enabled in wpa_supplicant so the WPS P2P code is redundant.

PR:		264238
Reported by:	adrian

(cherry picked from commit 3e8eb5c7f4)
2022-06-25 17:44:47 -07:00
Ed Maste dca1590eb5 wpa_supplicant.conf.5: add note about scan_ssid=1 eavesdropping
When scan_ssid=1 the list of configured SSIDs is available to
eavesdroppers.  Note this in the man page.

PR:		194122
Reviewed by:	debdrup, Pau Amma
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34576

(cherry picked from commit 4f75af31a8)
2022-04-10 22:46:54 -04:00
Cy Schubert ec9a2f80fc wpa: Fix WITHOUT_WPA_SUPPLICANT_EAPOL build
Reported by:	FreeBSD Build Option Survey
		https://callfortesting.org/results/bos-2021-11-04/
Fixes:		c1d255d3ff

(cherry picked from commit c9516b83c1)
2021-11-20 17:30:49 -08:00
Cy Schubert c2ab6e36ec wpa: Fix WITHOUT_OPENSSL build
PR:		259517
Reported by:	emaste, FreeBSD Build Option Survey
		https://callfortesting.org/results/bos-2021-11-04/
Fixes:		c1d255d3ff

(cherry picked from commit ba5de3c2b3)
2021-11-20 17:30:49 -08:00
Cy Schubert 9ed6f73bfb Revert "wpa: Fix WITHOUT_CRYPT build"
This reverts commit a30e8044aa.
WITHOUT_OPENSSL build is a subset of WITHOUT_CRYPT build. It was
incorrect to label this patch as fixing WITHOUT_CRYPT when in fact
it fixes WITHOUT_OPENSSL. The build failure will be addressed in a
fix for WITHOUT_OPENSSL build.

(cherry picked from commit 96e2ac9c48)
2021-11-20 17:30:49 -08:00
Cy Schubert de0af64420 wpa: Remove duplicate options definitions
Global options are defined in usr.sbin/wpa/Makefile.inc. Those in
usr.sbin/wpa/src/crypto/Makefile are duplicates of those found above.
Remove them.

(cherry picked from commit 3332f1b444)
2021-11-20 17:30:49 -08:00
Cy Schubert ef1134110e wpa: Fix WITHOUT_CRYPT build
PASN requires CRYPT and when built WITHOUT_CRYPT buildworld
fails. Only enable PASN when MK_CRYPT is enabled (default).

PR:		259517
Reported by:	emaste
Fixes:		c1d255d3ff

(cherry picked from commit a30e8044aa)
2021-11-04 11:30:25 -07:00
Cy Schubert 580c04df4d wpa: Enable RSN Preauthentication
RSN Preauthentication allows a station autnetnicate to an AP that
it is not associated with yet while associated with a different AP.
This allows athentication to multiple APs simulteneously.

Tested by:	philip

(cherry picked from commit bd452dcbed)
2021-11-04 11:30:24 -07:00
Cy Schubert 3f3676a712 wpa: Enable MBO
Enable WiFi 6 MBO (Multi Band Operation). MBO is a prereq to 802.11ax.

MBO allows the efficient use of multiple frequency bands (channels).

To facilitate MBO, WNM (Wireless Network Monitoring) is a prerequisite.
It is required to build.

Tested by:	philip

(cherry picked from commit 3968b47cd9)
2021-11-04 11:30:24 -07:00
Cy Schubert 0a6760a1de wpa: Import wpa_supplicant/hostapd commits up to b4f7506ff
Merge vendor commits 40c7ff83e7,
efec822389, and
2f6c3ea960.

Tested by:	philip

(cherry picked from commit c1d255d3ff)
2021-11-04 11:30:24 -07:00
Cy Schubert 2d81ecfcbb wpa: Reconnect ndis_events build
ndis_events build was disconnected by the MFC of
25ecdc7d52.
Reconnect it.

This is a direct commit to stable/13.

Reported by:	Scott Allendorf <scott-allendorf@uiowa.edu>
Fixes:		13f32ff71e
2021-10-25 06:29:45 -07:00
Cy Schubert 0ab6ecd1dd wpa: Fix EAP/PEAP MSCHAPv2 authentication SIGSEGV
25ecdc7d52 (MFCed by
13f32ff71e) introduced a link error
causing a SIGSEGV when using EAP/PEAP MSCHAPv2 authentication. It was
subsequently addressed by c1d255d3ff,
discovered by build time link errors not experienced during testing of
25ecdc7d52. This commit MFCs a portion
of c1d255d3ff addressing only the
SIGSEGV. The rest of c1d255d3ff will
be MFCed in November 2021.

This is a direct commit to stable/13.

PR:		258527
Reported by:	Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
Tested by:	Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
2021-10-05 15:12:38 -07:00
Cy Schubert 4ca38a4c36 wpa: Include all wpa include file search directories
Though not all include file search directories are presently needed,
add them to the search list. This is required for the next update to
wpa.

No functional change intended.

(cherry picked from commit 81b521d2c0)
2021-09-04 07:23:02 -07:00
Cy Schubert 4631803334 wpa: Correctly build the hostapd BSD driver
driver.bsd.c initializes itself differently when built for
hostapd than it does when built for wpa_supplicant.

(cherry picked from commit a0f2aa9318)
2021-09-04 07:22:39 -07:00
Cy Schubert 3003edd28a wpa: The ap library is not needed by wpa_supplicant or wpa_cli
The ap library is not needed by wpa_supplicant or wpa_cli. It is only
used by hostapd.

(cherry picked from commit dc9d54b5c1)
2021-08-20 08:24:55 -07:00
Cy Schubert 6f3564a52c wpa: Fix GCC 6 build
GCC 6 searches serially to resolve external references.

(cherry picked from commit 6815008894)
2021-08-20 08:24:54 -07:00
Cy Schubert 0a4379136f wpa: Fix a SIGBUS error in wpa_sm_set_rekey_offload
Incorrectly linked built-in wpa functions resulted in overwriting
sm->ctx->set_rekey_offload with garbage. It was initialized correctly
however it changed after wpa_supplicant became a daemon.

No SIGBUS violations reported by dhw@ were experienced during testing
of the original commit by msyelf or philip@.

Reported by:	dhw
Tested by:	dhw
X-MFC with:	25ecdc7d52

(cherry picked from commit 9a0f822853)
2021-08-20 08:24:54 -07:00
Cy Schubert 13f32ff71e wpa: Restructure wpa build
The current WPA build assumes a flat namespace. However the latest sources
from w1.fi now have a duplicate config.c, in two separate subdirectories.
The flat namespace will overwrite config.o with the output from the most
recently modified config.c, of which there are two of them.

This commit resolves this problem by building each component in
wpa's src subdirectory tree into its own .a archive, just as the w1.fi
upstream build as used by the port does. The advantages of this approach
are:

1. Duplicate source file names, i.e. config.c in the wpa_supplicant
   direcory and another config.c in src/utils in the next wpa
   will result in both compiles writing to the same .o file.

2. This restructure simplifies maintanence. A develper needs only to add
   new files as identified by git status in the vendor branch to the
   appropriate Makefile within the usr.sbin/wpa tree. This also reduces
   time required to prepare a new import and should reduce error.

3. The new wpa build structure more closely represents the build as
   performed by the upstream tarball.

This is in preparation for the next wpa update from w1.fi.

Reviewed by:	philip
Tested by:	philip
Differential Revision:	https://reviews.freebsd.org/D30372

(cherry picked from commit 25ecdc7d52)
2021-08-20 08:24:54 -07:00
Adrian Chadd 7c5a624afa [wpa] Add support for hostapd/wpa_supplicant when WITHOUT_CRYPT=YES
is enabled.

This builds wpa_supplicant / hostpad using internal encryption routines
rather than using libcrypt.

This has been supported in wpa for years now, however since we use
local makefiles for this, we bitrotted dependencies and configuration
options.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D27958
2021-01-12 16:43:19 -08:00
Gordon Bergling d84134ba1c hostapd.conf(5): Add missing 'l'
In r367901 I accidentally deleted the 'l' while fixing a few
mandoc erros.

Spotted by: Yuri Pankov
2020-11-20 17:13:13 +00:00
Gordon Bergling 7424766d75 hostapd.conf(5): Fix a mandoc warning
- new sentence, new line
2020-11-20 16:57:06 +00:00
Kyle Evans fe815331bb build: provide a default WARNS for all in-tree builds
The current default is provided in various Makefile.inc in some top-level
directories and covers a good portion of the tree, but doesn't cover parts
of the build a little deeper (e.g. libcasper).

Provide a default in src.sys.mk and set WARNS to it in bsd.sys.mk if that
variable is defined. This lets us relatively cleanly provide a default WARNS
no matter where you're building in the src tree without breaking things
outside of the tree.

Crunchgen has been updated as a bootstrap tool to work on this change
because it needs r365605 at a minimum to succeed. The cleanup necessary to
successfully walk over this change on WITHOUT_CLEAN builds has been added.

There is a supplemental project to this to list all of the warnings that are
encountered when the environment has WARNS=6 NO_WERROR=yes:
https://warns.kevans.dev -- this project will hopefully eventually go away
in favor of CI doing a much better job than it.

Reviewed by:	emaste, brooks, ngie (all earlier version)
Reviewed by:	emaste, arichardson (depend-cleanup.sh change)
Differential Revision:	https://reviews.freebsd.org/D26455
2020-09-18 17:17:46 +00:00
Cy Schubert f329ac7dfb Enable support for IEEE 802.11N, 802.11W, 802.11AC and 802.11.AX to
hostapd and wpa_supplicant.

Submitted by:	bz
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	Rubicon Communications, LLC (d/b/a "Netgate")
2020-07-09 23:01:36 +00:00
Cy Schubert 1264cc08ff Add MATCH option for CONFIG_MATCH_IFACE.
If the interfaces on which wpa_supplicant is to run are not known or do
not exist, wpa_supplicant can match an interface when it arrives. Each
matched interface is separated with -M argument and the -i argument now
allows for pattern matching.

As an example, the following command would start wpa_supplicant for a
specific wired interface called lan0, any interface starting with wlan
and lastly any other interface. Each match has its own configuration
file, and for the wired interface a specific driver has also been given.

wpa_supplicant \
	-M -c wpa_wired.conf -ilan0 -D wired \
	-M -c wpa1.conf -iwlan* \
	-M -c wpa2.conf

PR:		247177
Reported by:	greg@unrelenting.technology
MFC after:	1 month
Related to:	ports r540412
2020-06-26 14:18:08 +00:00
Cy Schubert 5a00480bb9 Fix build when WITHOUT_WPA_SUPPLICANT_EAPOL option used.
The build failure was discoved by Michael Dexter's recent Build Options
Survey run, at https://callfortesting.org/results/bos-2020-01-16/\
WITHOUT_WPA_SUPPLICANT_EAPOL-small.txt.

Reported by:	Michael Dexter <editor@callfortesting.org> via emaste
MFC after:	2 weeks
2020-01-21 20:21:52 +00:00
Simon J. Gerraty 5ab1c5846f Add Makefile.depend.options
Leaf directories that have dependencies impacted
by options need a Makefile.depend.options file
to avoid churn in Makefile.depend

DIRDEPS for cases such as OPENSSL, TCP_WRAPPERS etc
can be set in local.dirdeps-options.mk
which can add to those set in Makefile.depend.options

See share/mk/dirdeps-options.mk

Reviewed by:	 bdrewery
MFC after:	1 week
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22469
2019-12-11 17:37:37 +00:00
Emmanuel Vadot 1ba153e085 pkgbase: Add a FreeBSD-hostapd package
Move the hostapd related files from FreeBSD-runtime to a new package n
FreeBSD-hostapd
The FreeBSD runtime is only intended to have everything for a working
FreeBSD installation and hostapd isn't needed for that.

Reviewed by:	bapt, gjb
Differential Revision:	https://reviews.freebsd.org/D20958
2019-07-19 15:09:00 +00:00
Emmanuel Vadot d4335dcc83 pkgbase: Add a FreeBSD-wpa package
Move the wpa related files from FreeBSD-runtime to a new package named
FreeBSD-wpa
The FreeBSD runtime is only intended to have everything for a working
FreeBSD installation and wpa isn't needed for that.

Reviewed by:    bapt, gjb
Differential Revision:  https://reviews.freebsd.org/D20957
2019-07-19 15:07:30 +00:00
Warner Losh 91f5df38c9 MK_OPENSSL makes RELEASE_CRUNCH redundant here
Since these things are more completely controlled by the MK_OPENSSL knob, remove
RELEASE_CRUNCH here. It's no longer needed for the release and other users can
use the more proper knob if they so desire.
2019-07-15 07:39:28 +00:00
Cy Schubert 4bc523382c MFV r346563:
Update wpa_supplicant/hostapd 2.7 --> 2.8

Upstream documents the following advisories:

- https://w1.fi/security/2019-1/sae-side-channel-attacks.txt
- https://w1.fi/security/2019-2/eap-pwd-side-channel-attack.txt
- https://w1.fi/security/2019-3/sae-confirm-missing-state-validation.txt
- https://w1.fi/security/2019-4/eap-pwd-missing-commit-validation.txt
- https://w1.fi/security/2019-5/eap-pwd-message-reassembly-issue-\
  with-unexpected-fragment.txt

Relnotes:	yes
MFC after:	1 week (or less)
Security:	CVE-2019-9494, VU#871675, CVE-2019-9495, CVE-2019-9496,
		CVE-2019-9497, CVE-2019-9498, CVE-2019-9499
2019-04-23 03:52:43 +00:00
Cy Schubert b2d7ecdd54 Set default ciphers.
Submitted by:	jkim@
2018-12-12 05:18:53 +00:00
Cy Schubert 85732ac8bc MFV r341618:
Update wpa 2.6 --> 2.7.
2018-12-09 06:45:49 +00:00
Conrad Meyer 522867c218 wpa_supplicant.8: Remove removed option
Our base version of wpa_supplicant does not support the -u option, so remove
it.

PR:		230102
Submitted by:	D Green <dfrg AT xsmail.com>
2018-07-28 23:59:36 +00:00
Cy Schubert 780fb4a2fa MFV r324714:
Update wpa 2.5 --> 2.6.

MFC after:	1 month
2018-07-11 18:53:18 +00:00
Conrad Meyer 811d25e014 wpa_supplicant.conf.5: Document minimal eduroam configuration
PR:		226939
Submitted by:	Mateusz Piotrowski (0mp@)
Sponsored by:	Dell EMC Isilon
2018-03-26 22:10:20 +00:00
Pedro F. Giffuni df57947f08 spdx: initial adoption of licensing ID tags.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.

Initially, only tag files that use BSD 4-Clause "Original" license.

RelNotes:	yes
Differential Revision:	https://reviews.freebsd.org/D13133
2017-11-18 14:26:50 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Enji Cooper 0023765382 Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This simplifies pathing in make/displayed output.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-03-02 05:04:45 +00:00
Sevan Janiyan 4d0e06e6e6 Extend manual to cover more commands and options.
PR:		203406
Submitted by:	Fehmi Noyan Isi (fnoyanisi AT yahoo DOT com)
Approved by:	wblock (mentor)
MFC after:	5 days
Differential Revision:	 https://reviews.freebsd.org/D8691
2017-01-24 08:56:54 +00:00
Rui Paulo 325151a32e Update hostapd/wpa_supplicant to version 2.5.
Tested by several people on current@/wireless@.

Relnotes:	yes
2015-10-18 21:38:25 +00:00
Bryan Drewery 595fe15108 Add more SUBDIR_PARALLEL.
MFC after:	3 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-09-26 14:13:51 +00:00
Jung-uk Kim 1db13cd689 Revert r287578. This patch requires more review.
Requested by:	adrian
2015-09-08 23:17:02 +00:00
Jung-uk Kim 6c2f0c65c8 Enable 802.11n support.
PR:		164102
2015-09-08 21:04:33 +00:00