vmd(8): drop packets if tap(4) returns ENOMEM.
If there are no mbufs available to queue a packet on write(2), we
should drop the packet instead of toggling the device reset state.
The virtio network device was inspecting the wrong errno as well.
Also drop packets if EMSGSIZE is set on error. Only in unexpected
cases should we flag the device needs a reset.
Issue reported by Mischa Peters.
ok bluhm@, jan@, mlarkin@ and makes sense to deraadt@
test: improve output log and report format
Bring the test framework output closer to the output of Go's testing
package, in order to make it easier to trace issues in the output from
very large tests with many sub-tests.
Also add test_skipnow(), and make test_skip/test_skipf wrappers around
test_logf_internal so skip reasons get the same call location prefix as
other log output.
This also makes it easier for a followup to add timing for tests, which
will help determine which tests are slow.
ok tb
vmd(8): place acpi tables in upper reserved memory
The original decision to place ACPI tables at 0x90000 caused "legacy" linux
bootloaders like lilo to overwrite the tables. While this doesn't damage
the vm, it does cause linux to revert to uniprocessor mode. Place the tables
in a mem reserved region adjacent to the pci mmio hole instead.
tested on various guest OSes
ok dv
Add TLSv1.2 error handling
Provide error handling for use with the TLSv1.2 context - for now this
is a duplicate of the TLSv1.3 error handling, which we may deduplicate
in the future.
ok tb@
Add TLSv1.2 handshake message handling.
Provide struct tls12_handshake_msg and wire it to the new TLSv1.2
stack, allowing handshake messages to be built and parsed.
ok beck@ tb@
Add a TLSv1.2 state machine and skeleton client/server.
This provides the basis for a new TLSv1.2 stack and is heavily based on
our TLSv1.3 implementation. All TLSv1.2 handshake messages are included,
however the state table only includes a minimal TLS connection - additional
state transitions will be added in due course.
This code is not currently used and further development will occur in tree.
ok beck@ tb@
On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr(3)
now implements the C23 behaviour where passing a const pointer to
strchr(3) also returns a const pointer.
Solve this by disentangling the horribly complicated logic in
tblcalc_literal() that did multiple checks on "mw". Instead, handle
the case "maximum width -> parse into words and break lines" which
needs a mutable copy of the content separately from the case
"unlimited width" which works with the original const char*.
This makes the code much more readable. No functional change.
Small issue found by Lexi Winter <ivy at FreeBSD.org>,
reported via Alexander Ziaee <ziaee at freebsd.org>.
Get x and y the right way round, fixes crash when opening a mode prompt
when the client is offset into the window; may be the crash reported by
sthen@.