virtual_oss.8: Document `/dev/bluetooth/` prefix magic
Without this one could be led to believe they should have an actual
`/dev/bluetooth/xxx` device in devfs from just reading the examples.
Event: Halifax Hackathon 202606
Reviewed by: christos
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D57818
(cherry picked from commit 7ecd9afd3b28b9e1a112b5925a8f5902e121b128)
virtual_oss.8: Use `.Pa` macro to refer to devices
Suggested by: christos
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
(cherry picked from commit 31461c8bc9c16004feae9cc17b89fd5213a09ae0)
ng_socket: plug node reference leak
There is no need to reference node in its constructor, the framework
already granted us a reference. This extraneous reference was later given
back on socket detach. However, if node is destroyed before the socket,
the node was leaked. This leak was harmless until VIMAGE, where
vnet_netgraph_uninit() would cycle through all nodes and shut them down
expecting them to not exist after the shutdown.
Fixes: 19284374970533e1aa04020d4f840e8877ed6266
ng_socket: simplify protosw(9) methods
- so_pcb can't be non-NULL in pr_attach.
- so_pcb can't be NULL in all other methods.
- Short circuit data socket attach down to the common attach.
- Short circuit both detach methods down to common one.
- Inline control socket attach.
- Inline control pr_bind.
- Inline data pr_connect.
- Rely on pr_connect_notsupp() for control connect(2).
- Don't use cast on so_pcb, it is void *.
Should be no functional change.
loader: Test GCC cross builds as part of universe.sh
Sicne we have gcc15 in Jenkins, and since people are actually using it,
add cross building tests to universe.sh to avoid build breakage when
hacking on loader.efi (and others). UEFI makes it too easy to mix
pointers and integers since it deals in an odd mix of
EFI_PHYSICAL_ADDRESS and pointers...
Sponsored by: Netflix
loader.efi: Fix build with gcc due to pointer / int issues on 32-bit build
Use (uintptr_t) casts to cast the EFI_PHYSICAL_ADDDRESS to a pointer.
Fixes: afee781523e4 ("loader.efi: Recognize new memdisk=<url> and memcd=<url> options")
Sponsored by: Netflix
Reviewed by: rlibby
Differential Revision: https://reviews.freebsd.org/D57893
libpfctl: fix memory leak
When we snl_init_writer() we allocate memory in the struct snl_state in the struct pfctl_handle.
This memory was never released again, leading to a memory leak. We still
had a reference to the memory and would release it on pfctl_close()
(so valgrind did not detect it as a leak), but long-lived users (e.g.
bsnmpd) would eventually run out of memory.
Explicitly reset the snl_state when we're done to prevent this.
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit fcb31b57112425a4eb64241651a0206108105298)
libpfctl: retrieve family id only once
Look up the pfctl family id when we open the handle, rather than for
every function call.
This saves us a lot of netlink calls, at the expense of storing one
extra int in the handle.
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 2a478dfc7f9cd60037939e121026bf26a01e8c41)
ping/tests: expect bell chars from stderr after initial status
After 141bb85798 and 8bda488114f3, ping(8) first writes and flushes the
initial status to stdout, then writes notification bell characters to stderr.
This patch corrects the expected order of the output to stdout and stderr.
This is a temporary fix; the test should be rewritten to separate the output
streams and run expectations on each individually.
Reviewed by: des
MFC after: 3 days
Sponsored by: The FreeBSD Foundation