Commit graph

10532 commits

Author SHA1 Message Date
Bjoern A. Zeeb
e47898ee0f net80211/ifconfig: swap IEEE80211_FVHT_USEVHT160 and 80P80
ieee80211_setupcurchan() compares the flags in a greater than manner.
In this case VHT160 should be > VHT80P80 as it is preferable.
Swap the two flags and add a comment to note this.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	adrian
Differential Revision: https://reviews.freebsd.org/D48976

(cherry picked from commit 8f2e5b6ef32304ce340b91057b1eb4b191dbeac1)
2025-02-25 10:34:06 +01:00
Andrey V. Elsukov
fd3d1a7d1e ipfw: make 'ipfw show' output compatible with 'ipfw add' command
If rule was added in compact form and rule body is empty, print
'proto ip' opcode to be compatible with ipfw(8) syntax parser.

  Before:
  $ ipfw add allow proto ip
  000700 allow
  After:
  $ ipfw add allow proto ip
  000700 allow proto ip

(cherry picked from commit 706a03f61bbb6e0cf10e6c3727966495b30d763e)
2025-02-24 10:12:03 +01:00
Kristof Provost
f15f44029f pf: add 'allow-related' to always allow SCTP multihome extra connections
Allow users to choose to allow permitted SCTP connections to set up additional
multihomed connections regardless of the ruleset. That is, allow an already
established connection to set up flows that would otherwise be disallowed.

In case of if-bound connections we initially set the extra associations to
be floating, because we don't know what path they'll be taking when they're
created. Once we see the first traffic we can bind them.

MFC after:	2 weeks
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D48453

(cherry picked from commit e4f2733df8c9d2fd0c5e8fdc8bec002bf39811f3)
2025-02-18 09:56:41 +01:00
Bjoern A. Zeeb
f5d9aedb9e net80211: 11ac: add options to manage VHT STBC
Add IEEE80211_FVHT_STBC_(TX|RX) flags to allow userspace to manage
if STBC will be allowed for VHT RX/TX.
For RX this will only allow us to turn it off but no fine grained
control of the number of supported spatial streams.

Introduce IEEE80211_FVHT_CHANWIDTH_MASK as a helper to make the
spelling out of the IEEE80211_FVHT_MASK more readable.

Update ifconfig to allow setting of these flags.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	adrian
Differential Revision: https://reviews.freebsd.org/D47838

(cherry picked from commit 243f6925bf818a64f3c996c6a89fec6c8a6ff058)
2025-02-18 09:54:48 +01:00
Bjoern A. Zeeb
c88193d77c ifconfig: 802.11: fix indentation of a line
No functional changes.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit cf71349a23f02b55bd3bb4973decac87f7a7d2b8)
2025-02-18 09:54:26 +01:00
Bjoern A. Zeeb
1e8f076a8e ifconfig: remove debug printfs from set80211vhtconf()
Anyone testing VHT options would wonder about these extra two printfs
by now.  Remove them from the tree before I have to do so locally again
in another branch.

Sponsored by:	The FreeBSD Foundation
Fixes:		e9bb7f9aa1
Reviewed by:	adrian, emaste
Differential Revision: https://reviews.freebsd.org/D48319

(cherry picked from commit 91a4107d6d3028acd96df96de33b8a7665d3eb03)
2025-02-18 09:54:25 +01:00
Bjoern A. Zeeb
a8df1e20f1 ifconfig: make -vht work
Also hide the other vht options on -vht and only show vht40/80/160/80p80
when vht is enabled.

While here fix some whitespace and comments.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	adrian, emaste
Differential Revision: https://reviews.freebsd.org/D48326

(cherry picked from commit 42410c6d682c4e00ce6147f99b51a55f6f3fe075)
2025-02-18 09:53:49 +01:00
Kristof Provost
063f4fdfc9 carp: don't unintentionally revert to multicast mode
PR:		284140
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-01-24 11:54:30 +01:00
Leonid Evdokimov
d3d3ef2b33 pfctl: add -T reset to touch pfras_tzero only for non-zero entries
This will make it easier for scripts to detect idle hosts in tables.

PR:		282984
Reviewed by:	kp
MFC after:	2 weeks

(cherry picked from commit 5b59b0c61e29f684a019afdd2848ffe2d5604e0c)
2025-01-08 08:43:50 +01:00
Kristof Provost
744cdf0037 pfctl: clear statistic for specified addresses
The ioctl DIOCRCLRASTATS provides the functionality of clearing stats
not only for the whole table for for addresses stored in that table. The
functionality was missing from pfctl, though. Add it now.

PR:		282877
Obtained from:	OpenBSD, kirill <kirill@openbsd.org>, e496dff3a7
MFC after:	3 weeks

(cherry picked from commit 6463b6b59152fb1695bbe0de78f6e2675c5a765a)
2024-12-16 16:15:44 +01:00
Zhenlei Huang
01f4a503eb ifconfig: Fix wrong indentation for the status of pfsync(4)
The leading tab is always required, regardless of the configuration of
`syncdev` or `syncpeer`, as `maxupd`, `defer` and `version` all require
it.

Reviewed by:	kp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D47112

(cherry picked from commit 1c95ec17cae22fb76d4e93c9eada78e03ca1bca6)
2024-10-31 12:40:16 +08:00
Mark Johnston
4990a7d344 devmatch: Catch truncated linker hints files
PR:		282268
Reviewed by:	christos, imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D47243

(cherry picked from commit 9b2f2fbfcbc51f77e96a41e62b1c06a8ccd4ca15)
2024-10-30 13:21:06 +00:00
Hao-Yu Hou
bbd018d0aa ping(8): Fix typo in ping6.c
Line 703 & 863: kerel -> kernel
Line 2110: resposne -> response

Event:		Advanced UNIX Programming Course (Fall’23) at NTHU.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/967

(cherry picked from commit e9866ce84f41bf8a5122713b027d1af05cbbb5b3)
2024-10-25 23:57:05 +08:00
Hao-Yu Hou
2a0d3dd351 sysctl(8): Fix typo in comment
Line214: combind -> combine

Reviewed by:	zlei
Event:		Advanced UNIX Programming Course (Fall’23) at NTHU
Request:	https://github.com/freebsd/freebsd-src/pull/966

(cherry picked from commit 2e8ad2b698498a1c380d0d6fc5792b2c56926801)
2024-10-25 23:57:04 +08:00
Ed Maste
3958be5c29 fdisk: emit deprecation notice when run
Requested by:	rgrimes
Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D43585

(cherry picked from commit 86e66321bb18ffc242eac61ed2ae0543d71918a0)
2024-10-21 15:08:13 -04:00
Ed Maste
273c500de2 fdisk: add deprecation/removal notice to man page
As of 2015 (commit b8c19fd719) the fdisk man page claimed the command
is obsolete, but had no explicit mention of removal.  Add another note
that follows our current deprecation notice format.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47067

(cherry picked from commit 255d2d9bbc3756c940462c61d3cd6fb7753aab2c)
2024-10-21 15:08:13 -04:00
Kristof Provost
d261971e7d ping tests: fix for scapy-2.6.0
Scapy 2.6.0 now appears to parse the IPOption during construction, and it then
gets confused at a single-byte option. IP Options typically contain at least a 1
byte type and 1 byte length. Avoid this by just returning the raw bytes, rather
than an IPOption object.

MFC after:	1 week
Reviewed by:	Jose Luis Duran <jlduran@gmail.com>
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D47151

(cherry picked from commit 2926c2594249f64fecbbdcb0b0b9a3591931ab04)
2024-10-21 14:51:36 +02:00
Igor Ostapenko
76c656bd97 sysctl.8: fix format typo
Signed-off-by: Igor Ostapenko <pm@igoro.pro>
(cherry picked from commit 380b7eb309478e1aac1609a3dfe1c28436add1c4)
2024-10-15 07:18:07 +02:00
Kirk McKusick
54416c6e13 Ensure that soft updates are not enabled by default when using mdmfs(8)
When soft updates began being enabled by default that change carried
over to mdmfs(8) which does not want or need them. This fix ensures
that they are only enabled in mdmfs(8) when requested with the -U flag.

Reported by: Ivan Rozhuk
Tested by:   Michael Proto
PR:          279308

(cherry picked from commit 5b21d4ad060acb06c72e0458daebec9bcbf0cefd)
2024-10-12 15:30:06 -07:00
Michael Osipov
36c370fa3e dhclient: Ignore vendor-identifying DHCP options defined in RFC 3925
Ignore DHCP options 124 and 125 to shut up the warning messages.
These options are defined in the RFC 3925.

PR:		281361
Reviewed by:	jrm (mentor), otis (mentor), thj
Tested by:	jlduran@gmail.com
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D46760

(cherry picked from commit 38c63b52830c85013f30bc62b2b32f3936d84e65)
2024-10-12 14:11:04 +02:00
Alexander Ziaee
95273f59d0 sysctl.8: mark sysctls as vars per style.mdoc(7)
+ while here, fix alignment and tag SPDX

MFC after:	3 days

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1421

(cherry picked from commit 2a680c5c37ea020467fce545734afea019d3a3ea)
2024-10-11 16:10:23 -06:00
Alexander Ziaee
88dc78cae9 geom.8: minor cleanup (markup, spdx, gsched)
Fixes:		86c06f (Remove GEOM_SCHED class and gsched)
MFC after:	3 days

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1380

(cherry picked from commit a5770eb54f7d13717098b5c34cc2dd51d2772021)
2024-09-22 07:46:36 -06:00
Alexander Ziaee
75f6087bf6 growfs.8: align and alphabetize options
MFC after:	3 days

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1379

(cherry picked from commit 0d8effbd6e45643154c90942f210b7f7a6ecc61d)
2024-09-22 07:45:53 -06:00
Mark Johnston
f47e5a92ed ifconfig: Add an allmulti verb
Similar to "promisc", this allows the IFF_ALLMULTI flag to be toggled
from userspace if it happens to be useful to disable multicast packet
filtering.  One use-case is when implementing IPv6 neighbour discovery
over netmap.

Reviewed by:	zlei, glebius
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D46525

(cherry picked from commit 00c9a6806c9cf3357b62f6708e5acd1ffd166613)
2024-09-20 11:39:16 +00:00
Kristof Provost
cfd744a663 pfctl tests: fix dependency
Ensure that we rebuild the test binary when we add tests (i.e. modify
pfctl_test_list.inc).

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 250e074e5f609194e0e4cd0775d99b0a616bfcf3)
2024-09-04 10:38:14 +02:00
Warner Losh
86a8ea7444 nvmecontrol: Allow optional /dev/ for device names
nvmecontrol operates on devices. Allow a user to specify the /dev/ if
they want. Any device that starts with / will be treated as if it was a
full path for maximum flexbility.

Sponsored by:		Netflix

(cherry picked from commit b12cae88cfb6286bc85a47b36ddd84f52b5c38ca)
2024-08-27 12:35:34 -04:00
Warner Losh
1d56b7ed63 nvmecontrol: Flesh out nvmecontrol format information
The format command takes a number of different parameters. Include a
brief summary of what the values mean, though since the driver's support
for metadata is at best weak, 0's are almost always used for values
other than -f format. Add an example that ties it all together.

Sponsored by:		Netflix
Reviewed by:		pauamma@gundo.com, chuck
Differential Revision:	https://reviews.freebsd.org/D44958

(cherry picked from commit ce3b53ffcc3ecc00fa6283542c60ff1fe697d853)
2024-08-27 12:35:34 -04:00
Gordon Bergling
af6673e6a5 nvmecontrol(8): Remove a double word in a source code comment
- s/the the/the/

MFC after:	3 days

(cherry picked from commit 6573ce292fc5ddc6c846860b3fa98473e3f5d1c6)
2024-08-27 12:35:34 -04:00
Elyes Haouas
169c76b9b6 camcontrol: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
(cherry picked from commit 7028e630d6110789502cfc0f17b36b6f513ec297)
2024-08-27 12:35:34 -04:00
Yi-Chen Li
152a9cfe6d camcontrol(8): Fix grammar: a ATA -> an ATA
Event:		Advanced UNIX Programming Course (Fall'23) at NTHU.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1030

(cherry picked from commit 9977fb8042a4b2f2b3386684e137dfb42bf1707f)
2024-08-27 12:35:34 -04:00
Che-Yu Chang
c4fa138c2a camcontrol(8): Fix typos
On line 748, "bigger than" is mistyped as "bigger then", and on line
765, "more than" is mistyped as "more then".

Event: Advanced UNIX Programming Course (Fall’23) at NTHU.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/949

(cherry picked from commit f8f3b16b6cb671649345352c16894f59679c096f)
2024-08-27 12:35:34 -04:00
John Baldwin
a3a8eabcdc nvmecontrol: Always build instead of being conditional on WITH_NVME
This now builds fine on all platforms so always include it similar
to other tools such as camcontrol.

Reviewed by:	imp, emaste
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44842

(cherry picked from commit 2d51a9898e26c87586ba50e71b6b3fdf1591713d)
2024-08-27 11:54:45 -04:00
John Baldwin
8f586587da camcontrol: Enable WITH_NVME unconditionally
MK_NVME is no longer marked broken for any platforms, so just include
support for it always as we do for ATA and SCSI.

Reviewed by:	emaste
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44841

(cherry picked from commit 2b676a66c00af03e4b64d072658d2478dbdf0a97)
2024-08-27 11:54:45 -04:00
Warner Losh
e13b9fb02f camcontrol: One file per line in Makefile
We have enough files now that moving to one file per line makes sense.

Sponsored by:		Netflix

(cherry picked from commit 69ae43a1e6a53a1b8898a31c6b7140bf52b2c3ad)
2024-08-27 11:54:45 -04:00
Warner Losh
37eb64d7d2 nvmecontrol: One file per line
Move to a one file per line setup, and sort the files alphabetically.

Sponsored by:		Netflix
Reviewed by:		chuck, jhb
Differential Revision:	https://reviews.freebsd.org/D44684

(cherry picked from commit 49ea0889f2cb5e786e166fa9536c84f4a9994a6b)
2024-08-26 14:31:03 -04:00
Warner Losh
efb91b313c nvmecontrol: Add nvme 2.0 fields to read_logpage
Add the lpo, ot, csi and uuid_index fields to read_logpage. The logpage
command has not been updated to allow these to be specified.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D44683

(cherry picked from commit 98ab7d0a30f8d0fc9c51e1e97ac29f87750b526c)
2024-08-26 14:31:03 -04:00
Warner Losh
aaac429c12 nvmecontrol: Preliminary namespace documentation
Provide preliminary namespace subcommand documentation, along with some
basic definitions from the NVM standards relating to namespaces.

Sponsored by:		Netflix
Reviewed by:		jhb
Differential Revision:	https://reviews.freebsd.org/D44682

(cherry picked from commit 383a44fc0bcb36bf67127856f0c5fabfea522bab)
2024-08-26 14:31:03 -04:00
Warner Losh
37109ba0ec nvmecontrol: add newlines where needed for ns command printfs
Sponsored by:		Netflix
Reviewed by:		chuck, jhb
Differential Revision:	https://reviews.freebsd.org/D44681

(cherry picked from commit e39873820da7ddfddb59823efc3421125b92c17a)
2024-08-26 14:31:03 -04:00
Warner Losh
4e7cc8f545 nvmecontrol: Move intel temperature page printing to little endian orderinng
Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44658

(cherry picked from commit f0f7e9616da052e3d77b6e41301ccd655ae434fa)
2024-08-26 14:31:03 -04:00
Warner Losh
1bc8c6d40d nvmecontrol: Move sanitize status page printing to little endian orderinng
Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44657

(cherry picked from commit 55a1679ece1f56beda5f68e929a6b2fc553fb501)
2024-08-26 14:31:03 -04:00
Warner Losh
36269290fc nvmecontrol: Move reservation notifcation page printing to little endian orderinng
Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44656

(cherry picked from commit 3d28a9c608a382af669e22e9e8eda7fd0bc02cad)
2024-08-26 14:31:03 -04:00
Warner Losh
71484bbbff nvmecontrol: Move command effeccts page printing to little endian orderinng
Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44655

(cherry picked from commit b850caf7b7099636fd4323cb47a82f5201309fed)
2024-08-26 14:31:03 -04:00
Warner Losh
067abd7d0b nvmecontrol: Move self test status page printing to little endian orderinng
Also, add printing vnedor_specific field, which doesn't have a valid
bit, so is always valid.

Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44654

(cherry picked from commit 98f841efd8ce387d9cd060174b9dcc9ff9850648)
2024-08-26 14:31:02 -04:00
Warner Losh
0c66083c03 nvmecontrol: Move namespace change page printing to little endian orderinng
Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44653

(cherry picked from commit acdf72f7bbe582b8eabf09576dc93eb4fcfbd19b)
2024-08-26 14:31:02 -04:00
Warner Losh
4d144d4ceb nvmecontrol: Move smart/health printing to little endian orderinng
Move health printing to little endian ordering...

Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44652

(cherry picked from commit 729ee4c88f2af4560adec39fd709ff89bb597e4a)
2024-08-26 14:31:02 -04:00
Warner Losh
650c012e51 nvmecontrol: Fix to128 for big endian targets
The source is always 128-bits in little endian format. For big endian
hosts, we have to convert, or we print bogus numbers.

Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44651

(cherry picked from commit 1c4b7effa7f9df64bf72c6291b4719cffb2ffe22)
2024-08-26 14:31:02 -04:00
Warner Losh
78e2c1882b nvmecontrol: Have to truncate on all 32-bit architectures
armv7, powerpc, powerpcspe and i386 all lack 128-bit integer
types. Adjust the comment and #ifdef. I don't think we support nvme on
any of these other architectures at the moment, but it won't hurt to be
more precise.

Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44650

(cherry picked from commit e098d24b5290a9f59734587ded783c19d4dc6e31)
2024-08-26 14:31:02 -04:00
Warner Losh
d20b149786 nvmecontrol: Make the error log page work on native format
As the number of page types proliferates, it becomes untennable to
convert them in read_logpage (especailly since new UUID page types will
need to be supported). Convert the error page printing code to operate
on little endian data.

Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44680

(cherry picked from commit 85656a9a015339f3d412e5b1888e798bb3e7d4ba)
2024-08-26 14:31:02 -04:00
Warner Losh
05fe058843 nvmecontrol: Create letoh to generically convert to host order
Using _Generic, create letoh which will generically convert uintXX_t
types from little endian to host, regardless of the size. This name has
been floated as a possible addition to endian.h.

Sponsored by:		Netflix
Discussed with:		jhb
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44649

(cherry picked from commit 67163bc485a56d960b72fb26f19685682b92dd6b)
2024-08-26 14:31:02 -04:00
Warner Losh
4837e07cd2 nvme: Add my copyright to logpage.c
Reflect the command line refactoring I did, and other changes. git blame
says I'm to blame for ~1/4 of this file.

Sponsored by:		Netflix

(cherry picked from commit fe83abacd4d097342cabef94b3128cd12c5fdccb)
2024-08-26 14:31:02 -04:00