We now support multiple lables on a rule, so 'rule' is an array of strings, not
just one string. Adjust the check for 'is there a label?'.
CID: 1471808
Sponsored by: Rubicon Communications, LLC ("Netgate")
On most platforms time_t is 64 bits wide, but we assign it to 32 bits
variables. Unfortunately these are SNMP fields that are defined to be 32 bits
wide, so we cannot change this. We are similarly unable to prevent the passage
of time, meaning that time_t must remain 64 bits wide as well.
Explicitly cast to tell Coverity that we're aware of these limitations and do
not wish to be reminded of them.
CID: 1553869
CID: 1557025
CID: 1592232
CID: 1592234
Sponsored by: Rubicon Communications, LLC ("Netgate")
After fixing the obvious build and cast error when moving this from tools
to usr.sbin and removing -Wno-cast-align, re-add it back as at least
powerpc* does not compile without it (amd64, arm64, and i386 were ok).
In general wlanstats may now get a bit more love after 22 years of
being in the tree and being moved at least twice.
But first unbreak things again.
Reported by: mmel, cperciva (weekly snapshots)
Sponsored by: The FreeBSD Foundation
Fixes: 61ce422531
MFC after: 3 days
wlanstats is an incredible tool to get a quick overview of state
of affairs of wireless by looking at the counters.
And it makes it simple.
Having landed the LinuxKPI HW_CRYPTO bits I was asked by users
what to check and I realised the answer is in wlanstats.
It is annoying even as a developer to manually build it for each
installation but given it's also useful to users and support
make it available with the general installation.
Probably very long overdue.
Adjust the Makefile and make build again on main.
Hook it up to the build conditional on MK_WIRELESS.
Discussed with: adrian
Sponsored by: The FreeBSD Foundation
TODO: man page
MFC after: 3 days
Some device models, LPC in particular, will call pci_host_read_config()
when probing for devices. Currently this results in pcifd_init()
opening /dev/pci, and thus bhyve holds the fd open even when it's not
needed.
Modify pci_host_{read,write}_config() to open /dev/pci independent of
the global pcifd. This means that these routines can only be used
during VM initialization, as capsicum will prevent further opens
afterward. Introduce internal wrappers which use the global pcifd,
intended for the passthru code.
Reviewed by: jhb
MFC after: 3 weeks
Fixes: 563fd2240e ("bhyve: export funcs for read/write pci config")
Differential Revision: https://reviews.freebsd.org/D48908
These keywords were setting the wrong configuration value (connection
timeout).
Reviewed by: asomers
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D48930
The lexer always allocates a duplicate string via strdup for STR
tokens. The parse handlers did not always free these duplicated
strings after consuming them.
Reviewed by: asomers
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D48929
- Convert a few variables from int to bool
- Return bool instead of inverted 0/1 from configuration parsing
functions and the auth check functions
- Invert the existing dont_daemonize bool into a daemonize boolx
Reviewed by: asomers
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D48928
Take a cue from vnet.subr and abstract module loading, jail creation and
cleanup.
Note that the way jails are created differs slightly from vnet.subr, to
maintain the current style of the tests.
Reported by: Jenkins
Reviewed by: markj
Approved by: emaste (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48949
Tracking newer versions of C (and C++) permits assuming newer language
features in the base system. Some C11 extensions are already used in
the base system but implemented on top of GNU C extensions such as
_Alignas and _Static_assert. In some cases the fallback versions in
cdefs.h are more limited than the native C11 extensions.
Even though C11 is the next major version of C, C17 is chosen instead
since C17 does not add new features to C but merely fixes defects in
C11. It is also well supported by a wide range of clang (7.0.0+) and
GCC (8.1+) versions.
Along with changing the default, this change also removes explicit
requests for c11 via the CSTD variable in various Makefiles.
Libraries and binaries for ZFS continue to use c99.
PR: 284039 (exp-run)
Reviewed by: imp, arichardson, emaste
Differential Revision: https://reviews.freebsd.org/D43237
portal_group_add_listen already uses the default TCP port if no port
is specified so this was redundant.
Reviewed by: asomers
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D48770
Similar to kernel SBI clean up patch, do clean up in userspace SBI part:
- use standard SBI error codes;
- remove unused function.
Differential Revision: https://reviews.freebsd.org/D48829
Apply 2e2b8afa52 for RISC-V:
As on amd64 and aarch64 APs will repeatedly exit until they are
brought online, so this hack helps avoid burning CPU time during
guest bootup.
Reviewed by: corvink, markj
Differential Revision: https://reviews.freebsd.org/D48811
Pass private data from supervisor as the second argument on secondary
CPU startup.
This is used by Linux guest.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D48807
Commit ac78e3e9c5 ("bsdinstall: Add "Finish" button to finalconfig")
removed the Exit entry from the menu, renamed OK to Select and added a
Finish in place of the old Exit entry. On the surface this seemed like a
good idea, as at a glance OK wasn't clear that it was selecting an entry
rather than just closing the box, Exit isn't the most obvious term
to use for proceeding through the installer without doing anything, and
it separated out the different cases of "do something extra" and
"continue". However, because bsddialog (and dialog) keep a menu entry
highlighted even when the Cancel (in this case, Finish) button is
selected, this now looks even more confusing, with users easily
believing that they are about to select the Add User option (being
either surprised when it doesn't actually do that, or being confused
about how to not select it).
Instead, go back to the old scheme that fits more with bsddialog's
supported functionality but tweak it to try and improve on the confusing
UI/UX from the past. Specifically, the UI changes compared with the
original version are as follows:
1. The OK button is renamed to Select, as in the current UI
2. The Exit entry is renamed to Finish, mirroring the label of the
button in the current UI that it replaces
This partially reverts commit ac78e3e9c5.
Reviewed by: khorben_defora.org
Differential Revision: https://reviews.freebsd.org/D47229
Historical network classes are deprecated, but currently still supported
in mountd with a LOG_WARNING-priority message added by Mike Karels in
2021. Upgrade the log to LOG_ERR well in advance of this becoming a
fatal error.
Reviewed by: rmacklem
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48795
Sort options using the slightly unusual convention used here as well.
MFC after: 3 days
Approved by: carlavilla (mentor), imp (src)
Differential Revision: https://reviews.freebsd.org/D48800
Remove CPU clock-frequency property as incorrectly constructed
and not needed.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D48712
With all the recent changes we don't need extra argument that specifies
what exactly the syscalls does, neither we need a copyout-able pointer,
just a pointer sized integer.
Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D48649
At normal NFS server runtime there is not much RPC traffic from kernel to
rpc.tlsservd. But as Rick rmacklem@ explained, the notion of multiple
workers exists to handle a situation when a server reboots and it has
several hundred or thousands of TLS/TCP connections from clients. Once it
comes back up, all the clients make TCP connections and do TLS handshakes.
So cleanup the remnants of the workers, that left after the conversion of
RPC over netlink(4) transport and restore desired parallelism with help of
pthread(3).
We are processing the TLS handshakes in separate threads, one per
handshake. Number of concurrent threads is capped by hw.ncpu / 2, but this
can be overriden with -N.
Differential Revision: https://reviews.freebsd.org/D48570
Since in the kernel and in the API this is now called socket cookie.
No functional change.
Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D48777
Userland counterpart of the previous commit.
Note: this change intentionally ignores aspect of multiple workers of
rpc.tlsservd(8). This also will be addressed in a future commit.
Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D48562
To register RPC bindings coming from the kernel. At the moment, we expect
such bindings only from the kernel NLM service.
Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D48556
Seems like there was an intention to use command line switches
-m, -p and -v (each with argument), but there is no handling
for them.
Also, some enhancements to the usage()/manpage:
- use FreeBSD manpage style -- square brackets -- for denoting
optional arguments in usage();
- show default directory path in usage();
- update manual: -f is the optional flag;
- show descriptions for -I/-D together: they are logically related.
Signed-off-by: Eygene Ryabinkin <rea@FreeBSD.org>
Reviewed by: wulf
MFC after: 1 month
One should not start firmware update sequence just to understand
that there is no firmware image to program: update sequence for 7260
requires leaving manufacturing mode and in the case of missing
firmware file it will trigger complete re-initialization of BT adapter.
Which, in turn, will make the USB device to go away and reappear.
Since devd(8) has hooks for USB device attachment, in the case
of missing firmware it used to
- trigger the (failing) firmware download,
- which triggers device reset,
- which creates USB notification and devd(8) kicks back in.
Nice infinite cycle with many notifications via syslog:
{{{
Jan 3 09:00:01 kernel: ugen0.2: <vendor 0x8087 product 0x0a2a> at usbus0
Jan 3 09:00:01 kernel: ugen0.2: <vendor 0x8087 product 0x0a2a> at usbus0 (disconnected)
Jan 3 09:00:02 kernel: ugen0.2: <vendor 0x8087 product 0x0a2a> at usbus0
Jan 3 09:00:02 kernel: ugen0.2: <vendor 0x8087 product 0x0a2a> at usbus0 (disconnected)
}}}
Signed-off-by: Eygene Ryabinkin <rea@FreeBSD.org>
Reviewed by: wulf
MFC after: 1 month
- Move logic for firmware download into different adapter types
to the own functions to allow main() to be simpler
- Use enums/typedefs for exit modes, image types, etc
- Purge most obvious comments: functions are named properly,
so most of their invocations self-document the code.
Signed-off-by: Eygene Ryabinkin <rea@FreeBSD.org>
Reviewed by: wulf
MFC after: 1 month