diff options
Diffstat (limited to 'usr.sbin')
48 files changed, 606 insertions, 954 deletions
diff --git a/usr.sbin/adduser/adduser.8 b/usr.sbin/adduser/adduser.8 index e21a7653f250..eacc12a8f3ce 100644 --- a/usr.sbin/adduser/adduser.8 +++ b/usr.sbin/adduser/adduser.8 @@ -459,7 +459,7 @@ command appeared in .An -nosplit This manual page and the original script, in Perl, was written by .An Wolfram Schneider Aq Mt wosch@FreeBSD.org . -The replacement script, written as a Bourne +The replacement script, written as a POSIX shell script with some enhancements, and the man page modification that came with it were done by .An Mike Makonnen Aq Mt mtm@identd.net . diff --git a/usr.sbin/bhyve/iov.c b/usr.sbin/bhyve/iov.c index 16d7765b437b..aadea1d67933 100644 --- a/usr.sbin/bhyve/iov.c +++ b/usr.sbin/bhyve/iov.c @@ -110,16 +110,16 @@ check_iov_len(const struct iovec *iov, size_t niov, size_t len) return (false); } -ssize_t +size_t iov_to_buf(const struct iovec *iov, size_t niov, void **buf) { size_t ptr, total; size_t i; total = count_iov(iov, niov); - *buf = realloc(*buf, total); + *buf = reallocf(*buf, total); if (*buf == NULL) - return (-1); + return (0); for (i = 0, ptr = 0; i < niov; i++) { memcpy((uint8_t *)*buf + ptr, iov[i].iov_base, iov[i].iov_len); @@ -129,7 +129,7 @@ iov_to_buf(const struct iovec *iov, size_t niov, void **buf) return (total); } -ssize_t +size_t buf_to_iov(const void *buf, size_t buflen, const struct iovec *iov, size_t niov) { size_t off = 0, len; @@ -141,5 +141,5 @@ buf_to_iov(const void *buf, size_t buflen, const struct iovec *iov, size_t niov) off += len; } - return ((ssize_t)off); + return (off); } diff --git a/usr.sbin/bhyve/iov.h b/usr.sbin/bhyve/iov.h index e14a9bc7e019..788e8da84b8b 100644 --- a/usr.sbin/bhyve/iov.h +++ b/usr.sbin/bhyve/iov.h @@ -40,7 +40,7 @@ struct iovec *split_iov(struct iovec *, size_t *, size_t, size_t *); size_t count_iov(const struct iovec *, size_t); bool check_iov_len(const struct iovec *, size_t, size_t); -ssize_t iov_to_buf(const struct iovec *, size_t, void **); -ssize_t buf_to_iov(const void *, size_t, const struct iovec *, size_t); +size_t iov_to_buf(const struct iovec *, size_t, void **); +size_t buf_to_iov(const void *, size_t, const struct iovec *, size_t); #endif /* _IOV_H_ */ diff --git a/usr.sbin/bluetooth/hccontrol/le.c b/usr.sbin/bluetooth/hccontrol/le.c index 6d5440643b45..fbcee1451b0a 100644 --- a/usr.sbin/bluetooth/hccontrol/le.c +++ b/usr.sbin/bluetooth/hccontrol/le.c @@ -182,7 +182,7 @@ parse_param(int argc, char *argv[], char *buf, int *len) uint16_t value; optreset = 1; optind = 0; - while ((ch = getopt(argc, argv , "n:f:u:")) != -1) { + while ((ch = getopt(argc, argv , "n:f:u:b:")) != -1) { switch(ch){ case 'n': datalen = strlen(optarg); @@ -218,7 +218,24 @@ parse_param(int argc, char *argv[], char *buf, int *len) curbuf += 2; *lenpos += 2; } - + break; + case 'b': + datalen = 1; + token = optarg; + while ((token = strchr(token, ',')) != NULL) { + datalen++; + token++; + } + if ((curbuf + datalen + 1) >= buflast) + goto done; + curbuf[0] = datalen; + curbuf++; + token = optarg; + while ((token = strsep(&optarg, ",")) != NULL) { + value = strtol(token, NULL, 16); + curbuf[0] = value & 0xff; + curbuf++; + } } } done: @@ -1297,7 +1314,7 @@ struct hci_command le_commands[] = { }, { "le_set_advertising_data", - "le_set_advertising_data -n $name -f $flag -u $uuid16,$uuid16 \n" + "le_set_advertising_data -n $name -f $flag -u $uuid16,$uuid16 -b $byte,$byte,...,$byte\n" "set LE device advertising packed data", &le_set_advertising_data }, diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c b/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c index 3a5cd9d42658..f71aacd6f2e9 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c @@ -31,6 +31,7 @@ #include <sys/endian.h> #include <sys/stat.h> +#include <assert.h> #include <err.h> #include <errno.h> #include <fcntl.h> @@ -192,3 +193,107 @@ iwmbt_get_fwname_tlv(struct iwmbt_version_tlv *ver, const char *prefix, return (fwname); } + +int +iwmbt_parse_tlv(uint8_t *data, uint8_t datalen, + struct iwmbt_version_tlv *version) +{ + uint8_t status, type, len; + + status = *data++; + if (status != 0) + return (-1); + datalen--; + + while (datalen >= 2) { + type = *data++; + len = *data++; + datalen -= 2; + + if (datalen < len) + return (-1); + + switch (type) { + case IWMBT_TLV_CNVI_TOP: + assert(len == 4); + version->cnvi_top = le32dec(data); + break; + case IWMBT_TLV_CNVR_TOP: + assert(len == 4); + version->cnvr_top = le32dec(data); + break; + case IWMBT_TLV_CNVI_BT: + assert(len == 4); + version->cnvi_bt = le32dec(data); + break; + case IWMBT_TLV_CNVR_BT: + assert(len == 4); + version->cnvr_bt = le32dec(data); + break; + case IWMBT_TLV_DEV_REV_ID: + assert(len == 2); + version->dev_rev_id = le16dec(data); + break; + case IWMBT_TLV_IMAGE_TYPE: + assert(len == 1); + version->img_type = *data; + break; + case IWMBT_TLV_TIME_STAMP: + assert(len == 2); + version->min_fw_build_cw = data[0]; + version->min_fw_build_yy = data[1]; + version->timestamp = le16dec(data); + break; + case IWMBT_TLV_BUILD_TYPE: + assert(len == 1); + version->build_type = *data; + break; + case IWMBT_TLV_BUILD_NUM: + assert(len == 4); + version->min_fw_build_nn = *data; + version->build_num = le32dec(data); + break; + case IWMBT_TLV_SECURE_BOOT: + assert(len == 1); + version->secure_boot = *data; + break; + case IWMBT_TLV_OTP_LOCK: + assert(len == 1); + version->otp_lock = *data; + break; + case IWMBT_TLV_API_LOCK: + assert(len == 1); + version->api_lock = *data; + break; + case IWMBT_TLV_DEBUG_LOCK: + assert(len == 1); + version->debug_lock = *data; + break; + case IWMBT_TLV_MIN_FW: + assert(len == 3); + version->min_fw_build_nn = data[0]; + version->min_fw_build_cw = data[1]; + version->min_fw_build_yy = data[2]; + break; + case IWMBT_TLV_LIMITED_CCE: + assert(len == 1); + version->limited_cce = *data; + break; + case IWMBT_TLV_SBE_TYPE: + assert(len == 1); + version->sbe_type = *data; + break; + case IWMBT_TLV_OTP_BDADDR: + memcpy(&version->otp_bd_addr, data, sizeof(bdaddr_t)); + break; + default: + /* Ignore other types */ + break; + } + + datalen -= len; + data += len; + } + + return (0); +} diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.h b/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.h index eb6909a1f91d..1763f8688ed0 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.h +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.h @@ -152,5 +152,7 @@ extern char *iwmbt_get_fwname(struct iwmbt_version *ver, const char *suffix); extern char *iwmbt_get_fwname_tlv(struct iwmbt_version_tlv *ver, const char *prefix, const char *suffix); +extern int iwmbt_parse_tlv(uint8_t *data, uint8_t datalen, + struct iwmbt_version_tlv *ver); #endif diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c b/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c index 255181b8f4bc..81f1fbe7c5ce 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c @@ -30,7 +30,6 @@ #include <sys/endian.h> #include <sys/stat.h> -#include <assert.h> #include <err.h> #include <errno.h> #include <stddef.h> @@ -409,6 +408,29 @@ iwmbt_load_fwfile(struct libusb_device_handle *hdl, } int +iwmbt_bt_reset(struct libusb_device_handle *hdl) +{ + int ret, transferred; + static struct iwmbt_hci_cmd cmd = { + .opcode = htole16(0x0c03), + .length = 0, + }; + uint8_t buf[IWMBT_HCI_MAX_EVENT_SIZE]; + + ret = iwmbt_hci_command(hdl, + &cmd, + buf, + sizeof(buf), + &transferred, + IWMBT_HCI_CMD_TIMEOUT); + + if (ret < 0) + iwmbt_debug("HCI reset command failed: code=%d", ret); + + return (ret); +} + +int iwmbt_enter_manufacturer(struct libusb_device_handle *hdl) { int ret, transferred; @@ -502,8 +524,8 @@ iwmbt_get_version(struct libusb_device_handle *hdl, } int -iwmbt_get_version_tlv(struct libusb_device_handle *hdl, - struct iwmbt_version_tlv *version) +iwmbt_read_version_tlv(struct libusb_device_handle *hdl, + uint8_t *data, uint8_t *datalen) { int ret, transferred; struct iwmbt_hci_event_cmd_compl *event; @@ -512,8 +534,6 @@ iwmbt_get_version_tlv(struct libusb_device_handle *hdl, .length = 1, .data = { 0xff }, }; - uint8_t status, datalen, type, len; - uint8_t *data; uint8_t buf[255]; memset(buf, 0, sizeof(buf)); @@ -533,106 +553,30 @@ iwmbt_get_version_tlv(struct libusb_device_handle *hdl, } event = (struct iwmbt_hci_event_cmd_compl *)buf; - memcpy(version, event->data, sizeof(struct iwmbt_version)); + *datalen = event->header.length - IWMBT_HCI_EVENT_COMPL_HEAD_SIZE; + memcpy(data, event->data, *datalen); - datalen = event->header.length - IWMBT_HCI_EVENT_COMPL_HEAD_SIZE; - data = event->data; - status = *data++; - if (status != 0) - return (-1); - datalen--; + return (0); +} - while (datalen >= 2) { - type = *data++; - len = *data++; - datalen -= 2; +int +iwmbt_get_version_tlv(struct libusb_device_handle *hdl, + struct iwmbt_version_tlv *version) +{ - if (datalen < len) - return (-1); + uint8_t data[255]; + uint8_t datalen; + int ret; - switch (type) { - case IWMBT_TLV_CNVI_TOP: - assert(len == 4); - version->cnvi_top = le32dec(data); - break; - case IWMBT_TLV_CNVR_TOP: - assert(len == 4); - version->cnvr_top = le32dec(data); - break; - case IWMBT_TLV_CNVI_BT: - assert(len == 4); - version->cnvi_bt = le32dec(data); - break; - case IWMBT_TLV_CNVR_BT: - assert(len == 4); - version->cnvr_bt = le32dec(data); - break; - case IWMBT_TLV_DEV_REV_ID: - assert(len == 2); - version->dev_rev_id = le16dec(data); - break; - case IWMBT_TLV_IMAGE_TYPE: - assert(len == 1); - version->img_type = *data; - break; - case IWMBT_TLV_TIME_STAMP: - assert(len == 2); - version->min_fw_build_cw = data[0]; - version->min_fw_build_yy = data[1]; - version->timestamp = le16dec(data); - break; - case IWMBT_TLV_BUILD_TYPE: - assert(len == 1); - version->build_type = *data; - break; - case IWMBT_TLV_BUILD_NUM: - assert(len == 4); - version->min_fw_build_nn = *data; - version->build_num = le32dec(data); - break; - case IWMBT_TLV_SECURE_BOOT: - assert(len == 1); - version->secure_boot = *data; - break; - case IWMBT_TLV_OTP_LOCK: - assert(len == 1); - version->otp_lock = *data; - break; - case IWMBT_TLV_API_LOCK: - assert(len == 1); - version->api_lock = *data; - break; - case IWMBT_TLV_DEBUG_LOCK: - assert(len == 1); - version->debug_lock = *data; - break; - case IWMBT_TLV_MIN_FW: - assert(len == 3); - version->min_fw_build_nn = data[0]; - version->min_fw_build_cw = data[1]; - version->min_fw_build_yy = data[2]; - break; - case IWMBT_TLV_LIMITED_CCE: - assert(len == 1); - version->limited_cce = *data; - break; - case IWMBT_TLV_SBE_TYPE: - assert(len == 1); - version->sbe_type = *data; - break; - case IWMBT_TLV_OTP_BDADDR: - memcpy(&version->otp_bd_addr, data, sizeof(bdaddr_t)); - break; - default: - /* Ignore other types */ - break; - } + memset(data, 0, sizeof(data)); - datalen -= len; - data += len; + ret = iwmbt_read_version_tlv(hdl, data, &datalen); + if (ret < 0) { + iwmbt_debug("Can't get version tlv"); + return (-1); } - return (0); + return (iwmbt_parse_tlv(data, datalen, version)); } int diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h b/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h index aac885dfd153..f1f1f56e0ca2 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h @@ -101,11 +101,14 @@ extern int iwmbt_load_ecdsa_header(struct libusb_device_handle *hdl, const struct iwmbt_firmware *fw); extern int iwmbt_load_fwfile(struct libusb_device_handle *hdl, const struct iwmbt_firmware *fw, uint32_t *boot_param, int offset); +extern int iwmbt_bt_reset(struct libusb_device_handle *hdl); extern int iwmbt_enter_manufacturer(struct libusb_device_handle *hdl); extern int iwmbt_exit_manufacturer(struct libusb_device_handle *hdl, enum iwmbt_mm_exit mode); extern int iwmbt_get_version(struct libusb_device_handle *hdl, struct iwmbt_version *version); +extern int iwmbt_read_version_tlv(struct libusb_device_handle *hdl, + uint8_t *data, uint8_t *datalen); extern int iwmbt_get_version_tlv(struct libusb_device_handle *hdl, struct iwmbt_version_tlv *version); extern int iwmbt_get_boot_params(struct libusb_device_handle *hdl, diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 index ac32a675aa63..342656613421 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 15, 2025 +.Dd April 2, 2026 .Dt IWMBTFW 8 .Os .Sh NAME @@ -48,9 +48,10 @@ device. .Pp This utility will .Em only -work with Intel Wireless 7260/8260/9260 chip based Bluetooth USB devices -and some of their successors. -The identification is currently based on USB vendor ID/product ID pair. +work with Intel Wireless 7260/8260/9260 and newer chip based Bluetooth +USB devices, including AX and BE series wireless adapters. +The identification is currently based on USB vendor ID/product ID pair +and result of HCI queries. The vendor ID should be 0x8087 .Pq Dv USB_VENDOR_INTEL2 and the product ID should be one of the supported devices. @@ -78,6 +79,8 @@ device name. Specify the directory containing the firmware files to search and upload. .It Fl h Display usage message and exit. +.It Fl p +Use only USB vendor ID/product ID pair for device model identification. .El .Sh EXIT STATUS .Ex -std diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.conf b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.conf index e30a3c15ccaa..d48206827f90 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.conf +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.conf @@ -7,6 +7,6 @@ notify 100 { match "subsystem" "DEVICE"; match "type" "ATTACH"; match "vendor" "0x8087"; - match "product" "(0x07dc|0x0a2a|0x0aa7|0x0a2b|0x0aaa|0x0025|0x0026|0x0029|0x0032|0x0033)"; + match "product" "(0x07dc|0x0a2a|0x0aa7|0x0a2b|0x0aaa|0x0025|0x0026|0x0029|0x0032|0x0033|0x0035|0x0036)"; action "/usr/sbin/iwmbtfw -d $cdev -f /usr/local/share/iwmbt-firmware"; }; diff --git a/usr.sbin/bluetooth/iwmbtfw/main.c b/usr.sbin/bluetooth/iwmbtfw/main.c index b27c5ad62239..560735fabd67 100644 --- a/usr.sbin/bluetooth/iwmbtfw/main.c +++ b/usr.sbin/bluetooth/iwmbtfw/main.c @@ -35,6 +35,7 @@ #include <errno.h> #include <fcntl.h> #include <libgen.h> +#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -50,6 +51,7 @@ int iwmbt_do_debug = 0; int iwmbt_do_info = 0; +static bool iwmbt_do_pidvid = false; enum iwmbt_device { IWMBT_DEVICE_UNKNOWN, @@ -81,6 +83,8 @@ static struct iwmbt_devid iwmbt_list[] = { /* Intel Wireless 9260/9560 and successors */ { .vendor_id = 0x8087, .product_id = 0x0032, .device = IWMBT_DEVICE_9260 }, { .vendor_id = 0x8087, .product_id = 0x0033, .device = IWMBT_DEVICE_9260 }, + { .vendor_id = 0x8087, .product_id = 0x0035, .device = IWMBT_DEVICE_9260 }, + { .vendor_id = 0x8087, .product_id = 0x0036, .device = IWMBT_DEVICE_9260 }, }; static enum iwmbt_device @@ -226,6 +230,65 @@ iwmbt_dump_version_tlv(struct iwmbt_version_tlv *ver) ver->build_num); } +static enum iwmbt_device +iwmbt_identify(libusb_device_handle *hdl, enum iwmbt_device device) +{ + uint8_t data[255]; + uint8_t datalen, hw_platform, hw_variant; + struct iwmbt_version *ver = (struct iwmbt_version *)data; + struct iwmbt_version_tlv ver_tlv; + int r; + + if (device == IWMBT_DEVICE_7260) { + r = iwmbt_bt_reset(hdl); + if (r < 0) { + iwmbt_debug("iwmbt_bt_reset() failed!"); + return (IWMBT_DEVICE_UNKNOWN); + } + } + + memset(data, 0, sizeof(data)); + r = iwmbt_read_version_tlv(hdl, data, &datalen); + if (r < 0) { + iwmbt_debug("iwmbt_read_version_tlv() failed"); + return (IWMBT_DEVICE_UNKNOWN); + } + + if (datalen == sizeof(*ver) && ver->hw_platform == 0x37) { + switch (ver->hw_variant) { + case 0x07: + case 0x08: + return (IWMBT_DEVICE_7260); + case 0x0b: + case 0x0c: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + return (IWMBT_DEVICE_8260); + default: + iwmbt_debug("Unsupported hw_variant (0x%2x)", + ver->hw_variant); + return (IWMBT_DEVICE_UNKNOWN); + } + } + + r = iwmbt_parse_tlv(data, datalen, &ver_tlv); + if (r < 0) { + iwmbt_debug("iwmbt_parse_tlv() failed"); + return (IWMBT_DEVICE_UNKNOWN); + } + + hw_platform = (ver_tlv.cnvi_bt >> 8) & 0xff; + hw_variant = (ver_tlv.cnvi_bt >> 16) & 0x3f; + + if (hw_platform != 0x37) { + iwmbt_debug("Unsupported hw_platform (0x%2x)", hw_platform); + return (IWMBT_DEVICE_UNKNOWN); + } + + return (hw_variant < 0x17 ? IWMBT_DEVICE_8260 : IWMBT_DEVICE_9260); +} static int iwmbt_init_firmware(libusb_device_handle *hdl, const char *firmware_path, @@ -375,11 +438,10 @@ usage(void) fprintf(stderr, " -f: firmware path (defaults to %s)\n", _DEFAULT_IWMBT_FIRMWARE_PATH); fprintf(stderr, " -I: enable informational output\n"); + fprintf(stderr, " -p: use PID/VID for model identification\n"); exit(127); } - - /* * Returns 0 on success. */ @@ -556,7 +618,6 @@ handle_9260(libusb_device_handle *hdl, char *firmware_dir) { int r; uint32_t boot_param; - struct iwmbt_version vl; struct iwmbt_version_tlv vt; char *firmware_path = NULL; @@ -616,9 +677,9 @@ handle_9260(libusb_device_handle *hdl, char *firmware_dir) /* Once device is running in operational mode we can ignore failures */ - r = iwmbt_get_version(hdl, &vl); + r = iwmbt_get_version_tlv(hdl, &vt); if (r == 0) - iwmbt_dump_version(&vl); + iwmbt_dump_version_tlv(&vt); /* Apply the device configuration (DDC) parameters */ firmware_path = iwmbt_get_fwname_tlv(&vt, firmware_dir, "ddc"); @@ -671,6 +732,9 @@ main(int argc, char *argv[]) case 'I': iwmbt_do_info = 1; break; + case 'p': + iwmbt_do_pidvid = true; + break; case 'h': default: usage(); @@ -728,6 +792,14 @@ main(int argc, char *argv[]) goto shutdown; } + if (!iwmbt_do_pidvid) { + iwmbt_device = iwmbt_identify(hdl, iwmbt_device); + if (iwmbt_device == IWMBT_DEVICE_UNKNOWN) { + iwmbt_err("Failed to identify device"); + goto shutdown; + } + } + switch(iwmbt_device) { case IWMBT_DEVICE_7260: retcode = handle_7260(hdl, firmware_dir); diff --git a/usr.sbin/bluetooth/rtlbtfw/main.c b/usr.sbin/bluetooth/rtlbtfw/main.c index 58503b8087b5..dc9ccd6c5fcd 100644 --- a/usr.sbin/bluetooth/rtlbtfw/main.c +++ b/usr.sbin/bluetooth/rtlbtfw/main.c @@ -57,21 +57,19 @@ struct rtlbt_devid { }; static struct rtlbt_devid rtlbt_list[] = { + /* + * Non-Realtek vendors using Realtek Bluetooth chipsets. + * Devices with vendor 0x0bda are already matched by the + * generic check in rtlbt_find_device(). + */ + /* Realtek 8821CE Bluetooth devices */ { .vendor_id = 0x13d3, .product_id = 0x3529 }, - /* Realtek 8822CE Bluetooth devices */ - { .vendor_id = 0x0bda, .product_id = 0xb00c }, - { .vendor_id = 0x0bda, .product_id = 0xc822 }, - /* Realtek 8851BE Bluetooth devices */ { .vendor_id = 0x13d3, .product_id = 0x3600 }, /* Realtek 8852AE Bluetooth devices */ - { .vendor_id = 0x0bda, .product_id = 0x2852 }, - { .vendor_id = 0x0bda, .product_id = 0xc852 }, - { .vendor_id = 0x0bda, .product_id = 0x385a }, - { .vendor_id = 0x0bda, .product_id = 0x4852 }, { .vendor_id = 0x04c5, .product_id = 0x165c }, { .vendor_id = 0x04ca, .product_id = 0x4006 }, { .vendor_id = 0x0cb8, .product_id = 0xc549 }, @@ -83,13 +81,11 @@ static struct rtlbt_devid rtlbt_list[] = { { .vendor_id = 0x13d3, .product_id = 0x3587 }, { .vendor_id = 0x13d3, .product_id = 0x3586 }, { .vendor_id = 0x13d3, .product_id = 0x3592 }, + { .vendor_id = 0x13d3, .product_id = 0x3612 }, { .vendor_id = 0x0489, .product_id = 0xe122 }, /* Realtek 8852BE Bluetooth devices */ { .vendor_id = 0x0cb8, .product_id = 0xc559 }, - { .vendor_id = 0x0bda, .product_id = 0x4853 }, - { .vendor_id = 0x0bda, .product_id = 0x887b }, - { .vendor_id = 0x0bda, .product_id = 0xb85b }, { .vendor_id = 0x13d3, .product_id = 0x3570 }, { .vendor_id = 0x13d3, .product_id = 0x3571 }, { .vendor_id = 0x13d3, .product_id = 0x3572 }, @@ -97,11 +93,7 @@ static struct rtlbt_devid rtlbt_list[] = { { .vendor_id = 0x0489, .product_id = 0xe123 }, { .vendor_id = 0x0489, .product_id = 0xe125 }, - /* Realtek 8852BT/8852BE-VT Bluetooth devices */ - { .vendor_id = 0x0bda, .product_id = 0x8520 }, - /* Realtek 8922AE Bluetooth devices */ - { .vendor_id = 0x0bda, .product_id = 0x8922 }, { .vendor_id = 0x13d3, .product_id = 0x3617 }, { .vendor_id = 0x13d3, .product_id = 0x3616 }, { .vendor_id = 0x0489, .product_id = 0xe130 }, @@ -123,7 +115,6 @@ static struct rtlbt_devid rtlbt_list[] = { { .vendor_id = 0x7392, .product_id = 0xa611 }, /* Realtek 8723DE Bluetooth devices */ - { .vendor_id = 0x0bda, .product_id = 0xb009 }, { .vendor_id = 0x2ff8, .product_id = 0xb011 }, /* Realtek 8761BUV Bluetooth devices */ @@ -131,7 +122,6 @@ static struct rtlbt_devid rtlbt_list[] = { { .vendor_id = 0x2357, .product_id = 0x0604 }, { .vendor_id = 0x0b05, .product_id = 0x190e }, { .vendor_id = 0x2550, .product_id = 0x8761 }, - { .vendor_id = 0x0bda, .product_id = 0x8771 }, { .vendor_id = 0x6655, .product_id = 0x8771 }, { .vendor_id = 0x7392, .product_id = 0xc611 }, { .vendor_id = 0x2b89, .product_id = 0x8761 }, @@ -157,7 +147,6 @@ static struct rtlbt_devid rtlbt_list[] = { { .vendor_id = 0x13d3, .product_id = 0x3555 }, { .vendor_id = 0x2ff8, .product_id = 0x3051 }, { .vendor_id = 0x1358, .product_id = 0xc123 }, - { .vendor_id = 0x0bda, .product_id = 0xc123 }, { .vendor_id = 0x0cb5, .product_id = 0xc547 }, }; diff --git a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf index 2ef56d2af93a..f27e0ee50ccc 100644 --- a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf +++ b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf @@ -26,16 +26,6 @@ notify 100 { action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; }; -# Realtek 8822CE Bluetooth devices -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; - match "vendor" "0x0bda"; - match "product" "(0xb00c|0xc822)"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; - # Realtek 8851BE Bluetooth devices notify 100 { match "system" "USB"; @@ -51,14 +41,6 @@ notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; - match "vendor" "0x0bda"; - match "product" "(0x2852|0xc852|0x385a|0x4852)"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; match "vendor" "0x04c5"; match "product" "0x165c"; action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; @@ -110,7 +92,7 @@ notify 100 { match "subsystem" "DEVICE"; match "type" "ATTACH"; match "vendor" "0x13d3"; - match "product" "(0x3587|0x3586|0x3592)"; + match "product" "(0x3587|0x3586|0x3592|0x3612)"; action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; }; notify 100 { @@ -135,14 +117,6 @@ notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; - match "vendor" "0x0bda"; - match "product" "(0x4853|0x887b|0xb85b)"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; match "vendor" "0x13d3"; match "product" "(0x3570|0x3571|0x3572|0x3591)"; action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; @@ -156,29 +130,11 @@ notify 100 { action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; }; -# Realtek 8852BT/8852BE-VT Bluetooth devices -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; - match "vendor" "0x0bda"; - match "product" "0x8520"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; - # Realtek 8922AE Bluetooth devices notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; - match "vendor" "0x0bda"; - match "product" "0x8922"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; match "vendor" "0x13d3"; match "product" "(0x3617|0x3616)"; action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; @@ -251,14 +207,6 @@ notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; - match "vendor" "0x0bda"; - match "product" "0xb009"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; match "vendor" "0x2ff8"; match "product" "0xb011"; action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; @@ -301,14 +249,6 @@ notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; - match "vendor" "0x0bda"; - match "product" "0x8771"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; match "vendor" "0x6655"; match "product" "0x8771"; action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; @@ -419,14 +359,6 @@ notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; - match "vendor" "0x0bda"; - match "product" "0xc123"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; match "vendor" "0x0cb5"; match "product" "0xc547"; action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; diff --git a/usr.sbin/bsdconfig/share/common.subr b/usr.sbin/bsdconfig/share/common.subr index 830279168ff2..f4fda1a22ac2 100644 --- a/usr.sbin/bsdconfig/share/common.subr +++ b/usr.sbin/bsdconfig/share/common.subr @@ -440,7 +440,7 @@ f_yesno() # f_noyes $format [$arguments ...] # # Display a message in a dialog yes/no box using printf(1) syntax. -# NOTE: THis is just like the f_yesno function except "No" is default. +# NOTE: This is just like the f_yesno function except "No" is default. # f_noyes() { diff --git a/usr.sbin/bsdinstall/scripts/mirrorselect b/usr.sbin/bsdinstall/scripts/mirrorselect index 65a662b2df62..835db62b220c 100755 --- a/usr.sbin/bsdinstall/scripts/mirrorselect +++ b/usr.sbin/bsdinstall/scripts/mirrorselect @@ -40,6 +40,7 @@ MIRROR=`bsddialog --backtitle "$OSNAME Installer" \ --title "Mirror Selection" --extra-button --extra-label "Other" \ --menu "Please select the best suitable site for you or \"other\" if you want to specify a different choice. The \"Main Site\" directs users to the nearest project managed mirror via GeoDNS (they carry the full range of possible distributions and support both IPv4 and IPv6). All other sites are known as \"Community Mirrors\"; not every site listed here carries more than the base distribution kits. Select a site!" \ 0 0 16 \ + http://download.freebsd.org "Main Site (GeoDNS, CDN, HTTP)"\ http://ftp.freebsd.org "Main Site (GeoDNS, HTTP)"\ ftp://ftp.freebsd.org "Main Site (GeoDNS, FTP)"\ http://ftp.au.freebsd.org "Australia - IPv6"\ @@ -102,7 +103,17 @@ case ${_UNAME_R} in ;; esac -BSDINSTALL_DISTSITE="$MIRROR/pub/FreeBSD/${RELDIR}/`uname -m`/`uname -p`/${_UNAME_R}" +case ${MIRROR} in + *ftp*) + BSDINSTALL_DISTSITE="$MIRROR/pub/FreeBSD" + ;; + *) + BSDINSTALL_DISTSITE="$MIRROR" + ;; + +esac + +BSDINSTALL_DISTSITE="${BSDINSTALL_DISTSITE}/${RELDIR}/`uname -m`/`uname -p`/${_UNAME_R}" case $MIRROR_BUTTON in $BSDDIALOG_ERROR | $BSDDIALOG_CANCEL | $BSDDIALOG_ESC) diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c index 341438730a6d..9158d6404b29 100644 --- a/usr.sbin/daemon/daemon.c +++ b/usr.sbin/daemon/daemon.c @@ -194,6 +194,7 @@ main(int argc, char *argv[]) /* * Supervision mode is enabled if one of the following options are used: + * --output-file -o * --child-pidfile -p * --supervisor-pidfile -P * --restart -r / --restart-delay -R diff --git a/usr.sbin/diskinfo/diskinfo.8 b/usr.sbin/diskinfo/diskinfo.8 index 970bafd4f8e5..aea4c123048a 100644 --- a/usr.sbin/diskinfo/diskinfo.8 +++ b/usr.sbin/diskinfo/diskinfo.8 @@ -35,7 +35,7 @@ .Nd get information about disk device .Sh SYNOPSIS .Nm -.Op Fl citSvw +.Op Fl ciStvw .Ar disk ... .Nm .Op Fl l @@ -52,9 +52,7 @@ utility prints out information about a disk device, and optionally runs a naive performance test on the device. .Pp The following options are available: -.Bl -tag -width ".Fl v" -.It Fl v -Print fields one per line with a descriptive comment. +.Bl -tag -width "-c" .It Fl c Perform a simple measurement of the I/O read command overhead. .It Fl i @@ -70,16 +68,18 @@ character as a separator. Return the physical path of the disk. This is a string that identifies the physical path to the disk in the storage enclosure. -.It Fl s -Return the disk ident, usually the serial number. .It Fl S Perform synchronous random write test (ZFS SLOG test), measuring time required to write data blocks of different size and flush disk cache. Blocks of more then 128KB are written with multiple parallel operations. +.It Fl s +Return the disk ident, usually the serial number. .It Fl t Perform a simple and rather naive benchmark of the disks seek and transfer performance. +.It Fl v +Print fields one per line with a descriptive comment. .It Fl w Allow disruptive write tests. .El diff --git a/usr.sbin/diskinfo/diskinfo.c b/usr.sbin/diskinfo/diskinfo.c index f091d0ccfbea..d8a79d430edb 100644 --- a/usr.sbin/diskinfo/diskinfo.c +++ b/usr.sbin/diskinfo/diskinfo.c @@ -58,7 +58,7 @@ static void usage(void) { - fprintf(stderr, "usage: diskinfo [-ciStvw] disk ...\n" + fprintf(stderr, "usage: diskinfo [-citSvw] disk ...\n" " diskinfo [-l] -p disk ...\n" " diskinfo [-l] -s disk ...\n" ); @@ -91,7 +91,7 @@ main(int argc, char **argv) u_int sectorsize, fwsectors, fwheads, zoned = 0, isreg; uint32_t zone_mode; - while ((ch = getopt(argc, argv, "cilpsStvw")) != -1) { + while ((ch = getopt(argc, argv, "cilpSstvw")) != -1) { switch (ch) { case 'c': opt_c = 1; @@ -107,13 +107,13 @@ main(int argc, char **argv) case 'p': opt_p = 1; break; - case 's': - opt_s = 1; - break; case 'S': opt_S = 1; opt_v = 1; break; + case 's': + opt_s = 1; + break; case 't': opt_t = 1; opt_v = 1; diff --git a/usr.sbin/efibootmgr/efibootmgr.8 b/usr.sbin/efibootmgr/efibootmgr.8 index e5054023e40c..62ca0d6da3b2 100644 --- a/usr.sbin/efibootmgr/efibootmgr.8 +++ b/usr.sbin/efibootmgr/efibootmgr.8 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 22, 2024 +.Dd April 11, 2026 .Dt EFIBOOTMGR 8 .Os .Sh NAME @@ -84,7 +84,7 @@ boot method to be tried once upon the next boot. The UEFI standard defines how hosts may control what is used to bootstrap the system. Each method is encapsulated within a persistent UEFI variable, -stored by the UEFI BIOS of the form +stored by the UEFI firmware of the form .Cm Boot Ns Em XXXX (where XXXX are uppercase hexadecimal digits). These variables are numbered, each describing where to load the bootstrap diff --git a/usr.sbin/ifmcstat/ifmcstat.8 b/usr.sbin/ifmcstat/ifmcstat.8 index aa148e802ea7..c885aac936e3 100644 --- a/usr.sbin/ifmcstat/ifmcstat.8 +++ b/usr.sbin/ifmcstat/ifmcstat.8 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 27, 2009 +.Dd March 18, 2026 .Dt IFMCSTAT 8 .Os .Sh NAME @@ -65,30 +65,6 @@ they are suppressed by default. It may not be specified for .Fl f Ar link . Source lists for each group will also be printed. -.Pp -If specified twice, and -.Xr kvm 3 -is in use, the control plane timers for each interface -and the source list counters for each group -will also be printed. -.El -.Pp -The following options are only available if -.Nm -has been built with support for -.Xr kvm 3 : -.Bl -tag -width Fl -.It Fl K -attempts to use -.Xr kvm 3 -to retrieve the multicast group information. -.It Fl M Ar core -extracts values associated with the name list from the specified core, -instead of the default -.Pa /dev/kmem . -.It Fl N Ar system -extracts the name list from the specified kernel instead of the -default, which is the kernel image the system has booted from. .El .Sh IMPLEMENTATION NOTES .Nm @@ -102,26 +78,7 @@ option, .Nm may print multicast MAC addresses twice if they are referenced by a layer 3 protocol. -.Pp -When run with -.Xr kvm 3 -support, -the names of all interfaces configured in the system will be -printed in the first column of output, even if no multicast -group memberships are present on those interfaces. -The output may also be slightly different, as the kernel -data structures are being traversed with minimal post-processing -of the output. -.Pp -When built without -.Xr kvm 3 -support, the information displayed by -.Nm -is more limited. -This support is recommended for debugging purposes. -It requires super-user privilege if used to inspect a running kernel. .Sh SEE ALSO .Xr netstat 1 , .Xr getifaddrs 3 , .Xr getifmaddrs 3 , -.Xr kvm 3 diff --git a/usr.sbin/ifmcstat/ifmcstat.c b/usr.sbin/ifmcstat/ifmcstat.c index 503c1000d82d..72f5ad765dad 100644 --- a/usr.sbin/ifmcstat/ifmcstat.c +++ b/usr.sbin/ifmcstat/ifmcstat.c @@ -76,17 +76,6 @@ #include <sysexits.h> #include <unistd.h> -#ifdef KVM -/* - * Currently the KVM build is broken. To be fixed it requires uncovering - * large amount of _KERNEL code in include files, and it is also very - * tentative to internal kernel ABI changes. If anyone wishes to restore - * it, please move it out of src/usr.sbin to src/tools/tools. - */ -#include <kvm.h> -#include <nlist.h> -#endif - /* XXX: This file currently assumes INET support in the base system. */ #ifndef INET #define INET @@ -109,9 +98,6 @@ typedef union sockunion sockunion_t; uint32_t ifindex = 0; int af = AF_UNSPEC; -#ifdef WITH_KVM -int Kflag = 0; -#endif int vflag = 0; #define sa_dl_equal(a1, a2) \ @@ -121,41 +107,6 @@ int vflag = 0; LLADDR((struct sockaddr_dl *)(a2)), \ ((struct sockaddr_dl *)(a1))->sdl_alen) == 0)) -/* - * Most of the code in this utility is to support the use of KVM for - * post-mortem debugging of the multicast code. - */ -#ifdef WITH_KVM - -#ifdef INET -static void if_addrlist(struct ifaddr *); -static struct in_multi * - in_multientry(struct in_multi *); -#endif /* INET */ - -#ifdef INET6 -static void if6_addrlist(struct ifaddr *); -static struct in6_multi * - in6_multientry(struct in6_multi *); -#endif /* INET6 */ - -static void kread(u_long, void *, int); -static void ll_addrlist(struct ifaddr *); - -static int ifmcstat_kvm(const char *kernel, const char *core); - -#define KREAD(addr, buf, type) \ - kread((u_long)addr, (void *)buf, sizeof(type)) - -kvm_t *kvmd; -struct nlist nl[] = { - { "_ifnet", 0, 0, 0, 0, }, - { "", 0, 0, 0, 0, }, -}; -#define N_IFNET 0 - -#endif /* WITH_KVM */ - static int ifmcstat_getifmaddrs(void); #ifdef INET static void in_ifinfo(struct igmp_ifinfo *); @@ -172,29 +123,16 @@ usage() { fprintf(stderr, - "usage: ifmcstat [-i interface] [-f address family]" - " [-v]" -#ifdef WITH_KVM - " [-K] [-M core] [-N system]" -#endif - "\n"); + "usage: ifmcstat [-i interface] [-f address family] [-v]\n"); exit(EX_USAGE); } -static const char *options = "i:f:vM:N:" -#ifdef WITH_KVM - "K" -#endif - ; +static const char *options = "i:f:vM:N:"; int main(int argc, char **argv) { int c, error; -#ifdef WITH_KVM - const char *kernel = NULL; - const char *core = NULL; -#endif while ((c = getopt(argc, argv, options)) != -1) { switch (c) { @@ -228,26 +166,10 @@ main(int argc, char **argv) /*NOTREACHED*/ break; -#ifdef WITH_KVM - case 'K': - ++Kflag; - break; -#endif - case 'v': ++vflag; break; -#ifdef WITH_KVM - case 'M': - core = strdup(optarg); - break; - - case 'N': - kernel = strdup(optarg); - break; -#endif - default: usage(); break; @@ -258,15 +180,6 @@ main(int argc, char **argv) if (af == AF_LINK && vflag) usage(); -#ifdef WITH_KVM - if (Kflag) - error = ifmcstat_kvm(kernel, core); - /* - * If KVM failed, and user did not explicitly specify a core file, - * or force KVM backend to be disabled, try the sysctl backend. - */ - if (!Kflag || (error != 0 && (core == NULL && kernel == NULL))) -#endif error = ifmcstat_getifmaddrs(); if (error != 0) exit(EX_OSERR); @@ -322,417 +235,6 @@ inm_mode(u_int mode) #endif /* INET */ -#ifdef WITH_KVM - -static int -ifmcstat_kvm(const char *kernel, const char *core) -{ - char buf[_POSIX2_LINE_MAX], ifname[IFNAMSIZ]; - struct ifnet *ifp, *nifp, ifnet; - - if ((kvmd = kvm_openfiles(kernel, core, NULL, O_RDONLY, buf)) == - NULL) { - perror("kvm_openfiles"); - return (-1); - } - if (kvm_nlist(kvmd, nl) < 0) { - perror("kvm_nlist"); - return (-1); - } - if (nl[N_IFNET].n_value == 0) { - printf("symbol %s not found\n", nl[N_IFNET].n_name); - return (-1); - } - KREAD(nl[N_IFNET].n_value, &ifp, struct ifnet *); - while (ifp) { - KREAD(ifp, &ifnet, struct ifnet); - nifp = ifnet.if_link.tqe_next; - if (ifindex && ifindex != ifnet.if_index) - goto next; - - printf("%s:\n", if_indextoname(ifnet.if_index, ifname)); -#ifdef INET - if_addrlist(TAILQ_FIRST(&ifnet.if_addrhead)); -#endif -#ifdef INET6 - if6_addrlist(TAILQ_FIRST(&ifnet.if_addrhead)); -#endif - if (vflag) - ll_addrlist(TAILQ_FIRST(&ifnet.if_addrhead)); - next: - ifp = nifp; - } - - return (0); -} - -static void -kread(u_long addr, void *buf, int len) -{ - - if (kvm_read(kvmd, addr, buf, len) != len) { - perror("kvm_read"); - exit(EX_OSERR); - } -} - -static void -ll_addrlist(struct ifaddr *ifap) -{ - char addrbuf[NI_MAXHOST]; - struct ifaddr ifa; - struct sockaddr sa; - struct sockaddr_dl sdl; - struct ifaddr *ifap0; - - if (af && af != AF_LINK) - return; - - ifap0 = ifap; - while (ifap) { - KREAD(ifap, &ifa, struct ifaddr); - if (ifa.ifa_addr == NULL) - goto nextifap; - KREAD(ifa.ifa_addr, &sa, struct sockaddr); - if (sa.sa_family != PF_LINK) - goto nextifap; - KREAD(ifa.ifa_addr, &sdl, struct sockaddr_dl); - if (sdl.sdl_alen == 0) - goto nextifap; - addrbuf[0] = '\0'; - getnameinfo((struct sockaddr *)&sdl, sdl.sdl_len, - addrbuf, sizeof(addrbuf), NULL, 0, NI_NUMERICHOST); - printf("\tlink %s\n", addrbuf); - nextifap: - ifap = ifa.ifa_link.tqe_next; - } - if (ifap0) { - struct ifnet ifnet; - struct ifmultiaddr ifm, *ifmp = 0; - - KREAD(ifap0, &ifa, struct ifaddr); - KREAD(ifa.ifa_ifp, &ifnet, struct ifnet); - if (TAILQ_FIRST(&ifnet.if_multiaddrs)) - ifmp = TAILQ_FIRST(&ifnet.if_multiaddrs); - while (ifmp) { - KREAD(ifmp, &ifm, struct ifmultiaddr); - if (ifm.ifma_addr == NULL) - goto nextmulti; - KREAD(ifm.ifma_addr, &sa, struct sockaddr); - if (sa.sa_family != AF_LINK) - goto nextmulti; - KREAD(ifm.ifma_addr, &sdl, struct sockaddr_dl); - addrbuf[0] = '\0'; - getnameinfo((struct sockaddr *)&sdl, - sdl.sdl_len, addrbuf, sizeof(addrbuf), - NULL, 0, NI_NUMERICHOST); - printf("\t\tgroup %s refcnt %d\n", - addrbuf, ifm.ifma_refcount); - nextmulti: - ifmp = TAILQ_NEXT(&ifm, ifma_link); - } - } -} - -#ifdef INET6 - -static void -if6_addrlist(struct ifaddr *ifap) -{ - struct ifnet ifnet; - struct ifaddr ifa; - struct sockaddr sa; - struct in6_ifaddr if6a; - struct ifaddr *ifap0; - - if (af && af != AF_INET6) - return; - ifap0 = ifap; - while (ifap) { - KREAD(ifap, &ifa, struct ifaddr); - if (ifa.ifa_addr == NULL) - goto nextifap; - KREAD(ifa.ifa_addr, &sa, struct sockaddr); - if (sa.sa_family != PF_INET6) - goto nextifap; - KREAD(ifap, &if6a, struct in6_ifaddr); - printf("\tinet6 %s\n", inet6_n2a(&if6a.ia_addr.sin6_addr, - if6a.ia_addr.sin6_scope_id)); - /* - * Print per-link MLD information, if available. - */ - if (ifa.ifa_ifp != NULL) { - struct in6_ifextra ie; - struct mld_ifinfo mli; - - KREAD(ifa.ifa_ifp, &ifnet, struct ifnet); - KREAD(ifnet.if_afdata[AF_INET6], &ie, - struct in6_ifextra); - if (ie.mld_ifinfo != NULL) { - KREAD(ie.mld_ifinfo, &mli, struct mld_ifinfo); - in6_ifinfo(&mli); - } - } - nextifap: - ifap = ifa.ifa_link.tqe_next; - } - if (ifap0) { - struct ifnet ifnet; - struct ifmultiaddr ifm, *ifmp = 0; - struct sockaddr_dl sdl; - - KREAD(ifap0, &ifa, struct ifaddr); - KREAD(ifa.ifa_ifp, &ifnet, struct ifnet); - if (TAILQ_FIRST(&ifnet.if_multiaddrs)) - ifmp = TAILQ_FIRST(&ifnet.if_multiaddrs); - while (ifmp) { - KREAD(ifmp, &ifm, struct ifmultiaddr); - if (ifm.ifma_addr == NULL) - goto nextmulti; - KREAD(ifm.ifma_addr, &sa, struct sockaddr); - if (sa.sa_family != AF_INET6) - goto nextmulti; - (void)in6_multientry((struct in6_multi *) - ifm.ifma_protospec); - if (ifm.ifma_lladdr == 0) - goto nextmulti; - KREAD(ifm.ifma_lladdr, &sdl, struct sockaddr_dl); - printf("\t\t\tmcast-macaddr %s refcnt %d\n", - ether_ntoa((struct ether_addr *)LLADDR(&sdl)), - ifm.ifma_refcount); - nextmulti: - ifmp = TAILQ_NEXT(&ifm, ifma_link); - } - } -} - -static struct in6_multi * -in6_multientry(struct in6_multi *mc) -{ - struct in6_multi multi; - - KREAD(mc, &multi, struct in6_multi); - printf("\t\tgroup %s", inet6_n2a(&multi.in6m_addr, 0)); - printf(" refcnt %u\n", multi.in6m_refcount); - - return (multi.in6m_entry.le_next); -} - -#endif /* INET6 */ - -#ifdef INET - -static void -if_addrlist(struct ifaddr *ifap) -{ - struct ifaddr ifa; - struct ifnet ifnet; - struct sockaddr sa; - struct in_ifaddr ia; - struct ifaddr *ifap0; - - if (af && af != AF_INET) - return; - ifap0 = ifap; - while (ifap) { - KREAD(ifap, &ifa, struct ifaddr); - if (ifa.ifa_addr == NULL) - goto nextifap; - KREAD(ifa.ifa_addr, &sa, struct sockaddr); - if (sa.sa_family != PF_INET) - goto nextifap; - KREAD(ifap, &ia, struct in_ifaddr); - printf("\tinet %s\n", inet_ntoa(ia.ia_addr.sin_addr)); - /* - * Print per-link IGMP information, if available. - */ - if (ifa.ifa_ifp != NULL) { - struct in_ifinfo ii; - struct igmp_ifinfo igi; - - KREAD(ifa.ifa_ifp, &ifnet, struct ifnet); - KREAD(ifnet.if_afdata[AF_INET], &ii, struct in_ifinfo); - if (ii.ii_igmp != NULL) { - KREAD(ii.ii_igmp, &igi, struct igmp_ifinfo); - in_ifinfo(&igi); - } - } - nextifap: - ifap = ifa.ifa_link.tqe_next; - } - if (ifap0) { - struct ifmultiaddr ifm, *ifmp = 0; - struct sockaddr_dl sdl; - - KREAD(ifap0, &ifa, struct ifaddr); - KREAD(ifa.ifa_ifp, &ifnet, struct ifnet); - if (TAILQ_FIRST(&ifnet.if_multiaddrs)) - ifmp = TAILQ_FIRST(&ifnet.if_multiaddrs); - while (ifmp) { - KREAD(ifmp, &ifm, struct ifmultiaddr); - if (ifm.ifma_addr == NULL) - goto nextmulti; - KREAD(ifm.ifma_addr, &sa, struct sockaddr); - if (sa.sa_family != AF_INET) - goto nextmulti; - (void)in_multientry((struct in_multi *) - ifm.ifma_protospec); - if (ifm.ifma_lladdr == 0) - goto nextmulti; - KREAD(ifm.ifma_lladdr, &sdl, struct sockaddr_dl); - printf("\t\t\tmcast-macaddr %s refcnt %d\n", - ether_ntoa((struct ether_addr *)LLADDR(&sdl)), - ifm.ifma_refcount); - nextmulti: - ifmp = TAILQ_NEXT(&ifm, ifma_link); - } - } -} - -static const char *inm_states[] = { - "not-member", - "silent", - "idle", - "lazy", - "sleeping", - "awakening", - "query-pending", - "sg-query-pending", - "leaving" -}; - -static const char * -inm_state(u_int state) -{ - - if (state >= IGMP_NOT_MEMBER && state <= IGMP_LEAVING_MEMBER) - return (inm_states[state]); - return (NULL); -} - -#if 0 -static struct ip_msource * -ims_min_kvm(struct in_multi *pinm) -{ - struct ip_msource ims0; - struct ip_msource *tmp, *parent; - - parent = NULL; - tmp = RB_ROOT(&pinm->inm_srcs); - while (tmp) { - parent = tmp; - KREAD(tmp, &ims0, struct ip_msource); - tmp = RB_LEFT(&ims0, ims_link); - } - return (parent); /* kva */ -} - -/* XXX This routine is buggy. See RB_NEXT in sys/tree.h. */ -static struct ip_msource * -ims_next_kvm(struct ip_msource *ims) -{ - struct ip_msource ims0, ims1; - struct ip_msource *tmp; - - KREAD(ims, &ims0, struct ip_msource); - if (RB_RIGHT(&ims0, ims_link)) { - ims = RB_RIGHT(&ims0, ims_link); - KREAD(ims, &ims1, struct ip_msource); - while ((tmp = RB_LEFT(&ims1, ims_link))) { - KREAD(tmp, &ims0, struct ip_msource); - ims = RB_LEFT(&ims0, ims_link); - } - } else { - tmp = RB_PARENT(&ims0, ims_link); - if (tmp) { - KREAD(tmp, &ims1, struct ip_msource); - if (ims == RB_LEFT(&ims1, ims_link)) - ims = tmp; - } else { - while ((tmp = RB_PARENT(&ims0, ims_link))) { - KREAD(tmp, &ims1, struct ip_msource); - if (ims == RB_RIGHT(&ims1, ims_link)) { - ims = tmp; - KREAD(ims, &ims0, struct ip_msource); - } else - break; - } - ims = RB_PARENT(&ims0, ims_link); - } - } - return (ims); /* kva */ -} - -static void -inm_print_sources_kvm(struct in_multi *pinm) -{ - struct ip_msource ims0; - struct ip_msource *ims; - struct in_addr src; - int cnt; - uint8_t fmode; - - cnt = 0; - fmode = pinm->inm_st[1].iss_fmode; - if (fmode == MCAST_UNDEFINED) - return; - for (ims = ims_min_kvm(pinm); ims != NULL; ims = ims_next_kvm(ims)) { - if (cnt == 0) - printf(" srcs "); - KREAD(ims, &ims0, struct ip_msource); - /* Only print sources in-mode at t1. */ - if (fmode != ims_get_mode(pinm, ims, 1)) - continue; - src.s_addr = htonl(ims0.ims_haddr); - printf("%s%s", (cnt++ == 0 ? "" : ","), inet_ntoa(src)); - } -} -#endif - -static struct in_multi * -in_multientry(struct in_multi *pinm) -{ - struct in_multi inm; - const char *state, *mode; - - KREAD(pinm, &inm, struct in_multi); - printf("\t\tgroup %s", inet_ntoa(inm.inm_addr)); - printf(" refcnt %u", inm.inm_refcount); - - state = inm_state(inm.inm_state); - if (state) - printf(" state %s", state); - else - printf(" state (%d)", inm.inm_state); - - mode = inm_mode(inm.inm_st[1].iss_fmode); - if (mode) - printf(" mode %s", mode); - else - printf(" mode (%d)", inm.inm_st[1].iss_fmode); - - if (vflag >= 2) { - printf(" asm %u ex %u in %u rec %u", - (u_int)inm.inm_st[1].iss_asm, - (u_int)inm.inm_st[1].iss_ex, - (u_int)inm.inm_st[1].iss_in, - (u_int)inm.inm_st[1].iss_rec); - } - -#if 0 - /* Buggy. */ - if (vflag) - inm_print_sources_kvm(&inm); -#endif - - printf("\n"); - return (NULL); -} - -#endif /* INET */ - -#endif /* WITH_KVM */ - #ifdef INET6 static void diff --git a/usr.sbin/ipfwpcap/ipfwpcap.c b/usr.sbin/ipfwpcap/ipfwpcap.c index a9cead99bd07..2032387aaa0b 100644 --- a/usr.sbin/ipfwpcap/ipfwpcap.c +++ b/usr.sbin/ipfwpcap/ipfwpcap.c @@ -41,11 +41,7 @@ #include <net/bpf.h> -/* XXX normally defined in config.h */ -#define HAVE_STRLCPY 1 -#define HAVE_SNPRINTF 1 -#define HAVE_VSNPRINTF 1 -#include <pcap-int.h> /* see pcap(3) and /usr/src/contrib/libpcap/. */ +#include <pcap.h> #ifdef IP_MAXPACKET #define BUFMAX IP_MAXPACKET @@ -295,8 +291,7 @@ if (debug) fprintf(stderr, " sendto(%d) = %d\n", sd, r); (void) gettimeofday(&(phd.ts), NULL); phd.caplen = phd.len = nr; pcap_dump((u_char *)dp, &phd, buf); - if (ferror((FILE *)dp)) { perror(dumpf); quit(14); } - (void) fflush((FILE *)dp); + if (pcap_dump_flush(dp) == -1) { pcap_perror(p, dumpf); quit(14); } } quit(0); diff --git a/usr.sbin/jail/command.c b/usr.sbin/jail/command.c index 9da4fe51673a..8a1d281eff4f 100644 --- a/usr.sbin/jail/command.c +++ b/usr.sbin/jail/command.c @@ -814,8 +814,8 @@ run_command(struct cfjail *j) if (!injail) { if (string_param(j->intparams[KP_JID])) setenv("JID", string_param(j->intparams[KP_JID]), 1); - setenv("JNAME", string_param(j->intparams[KP_NAME]), 1); - + if (string_param(j->intparams[KP_NAME])) + setenv("JNAME", string_param(j->intparams[KP_NAME]), 1); path = string_param(j->intparams[KP_PATH]); setenv("JPATH", path ? path : "", 1); } diff --git a/usr.sbin/mfiutil/Makefile b/usr.sbin/mfiutil/Makefile index 49c0e688e8e2..d7ccb1f2d9c1 100644 --- a/usr.sbin/mfiutil/Makefile +++ b/usr.sbin/mfiutil/Makefile @@ -9,7 +9,7 @@ MLINKS= mfiutil.8 mrsasutil.8 CFLAGS.gcc+= -fno-builtin-strftime -LIBADD= sbuf util +LIBADD= cam sbuf util # Here be dragons .ifdef DEBUG diff --git a/usr.sbin/mfiutil/mfi_drive.c b/usr.sbin/mfiutil/mfi_drive.c index c7c5aeb02f14..88d24623ae27 100644 --- a/usr.sbin/mfiutil/mfi_drive.c +++ b/usr.sbin/mfiutil/mfi_drive.c @@ -42,6 +42,7 @@ #include <string.h> #include <strings.h> #include <unistd.h> +#include <cam/cam.h> #include <cam/scsi/scsi_all.h> #include "mfiutil.h" @@ -279,50 +280,14 @@ mfi_pd_get_info(int fd, uint16_t device_id, struct mfi_pd_info *info, sizeof(struct mfi_pd_info), mbox, 2, statusp)); } -static void -cam_strvis(char *dst, const char *src, int srclen, int dstlen) -{ - - /* Trim leading/trailing spaces, nulls. */ - while (srclen > 0 && src[0] == ' ') - src++, srclen--; - while (srclen > 0 - && (src[srclen-1] == ' ' || src[srclen-1] == '\0')) - srclen--; - - while (srclen > 0 && dstlen > 1) { - char *cur_pos = dst; - - if (*src < 0x20) { - /* SCSI-II Specifies that these should never occur. */ - /* non-printable character */ - if (dstlen > 4) { - *cur_pos++ = '\\'; - *cur_pos++ = ((*src & 0300) >> 6) + '0'; - *cur_pos++ = ((*src & 0070) >> 3) + '0'; - *cur_pos++ = ((*src & 0007) >> 0) + '0'; - } else { - *cur_pos++ = '?'; - } - } else { - /* normal character */ - *cur_pos++ = *src; - } - src++; - srclen--; - dstlen -= cur_pos - dst; - dst = cur_pos; - } - *dst = '\0'; -} - /* Borrowed heavily from scsi_all.c:scsi_print_inquiry(). */ const char * mfi_pd_inq_string(struct mfi_pd_info *info) { struct scsi_inquiry_data iqd, *inq_data = &iqd; - char vendor[16], product[48], revision[16], rstr[12], serial[SID_VENDOR_SPECIFIC_0_SIZE]; - static char inq_string[64]; + char vendor[SID_VENDOR_SIZE+1], product[SID_PRODUCT_SIZE+1], + revision[SID_REVISION_SIZE+1], rstr[9], serial[SID_VENDOR_SPECIFIC_0_SIZE+1]; + static char inq_string[80]; memcpy(inq_data, info->inquiry_data, (sizeof (iqd) < sizeof (info->inquiry_data))? @@ -334,14 +299,14 @@ mfi_pd_inq_string(struct mfi_pd_info *info) if (SID_QUAL(inq_data) != SID_QUAL_LU_CONNECTED) return (NULL); - cam_strvis(vendor, inq_data->vendor, sizeof(inq_data->vendor), - sizeof(vendor)); - cam_strvis(product, inq_data->product, sizeof(inq_data->product), - sizeof(product)); - cam_strvis(revision, inq_data->revision, sizeof(inq_data->revision), - sizeof(revision)); - cam_strvis(serial, (char *)inq_data->vendor_specific0, sizeof(inq_data->vendor_specific0), - sizeof(serial)); + cam_strvis_flag(vendor, inq_data->vendor, sizeof(inq_data->vendor), + sizeof(vendor), CAM_STRVIS_FLAG_NONASCII_TRIM); + cam_strvis_flag(product, inq_data->product, sizeof(inq_data->product), + sizeof(product), CAM_STRVIS_FLAG_NONASCII_TRIM); + cam_strvis_flag(revision, inq_data->revision, sizeof(inq_data->revision), + sizeof(revision), CAM_STRVIS_FLAG_NONASCII_TRIM); + cam_strvis_flag(serial, (char *)inq_data->vendor_specific0, sizeof(inq_data->vendor_specific0), + sizeof(serial), CAM_STRVIS_FLAG_NONASCII_SPC); /* Hack for SATA disks, no idea how to tell speed. */ if (strcmp(vendor, "ATA") == 0) { diff --git a/usr.sbin/mfiutil/mfiutil.8 b/usr.sbin/mfiutil/mfiutil.8 index 9f8cacf7f16d..5d0e425872be 100644 --- a/usr.sbin/mfiutil/mfiutil.8 +++ b/usr.sbin/mfiutil/mfiutil.8 @@ -480,7 +480,8 @@ The firmware should kick off an array rebuild on its own if a failed drive is marked as a rebuild drive. .It Cm syspd Ar drive Present the drive to the host operating system as a disk SYSPD block device in -the format /dev/mfisyspdX. +the format +.Pa /dev/mfisyspdX . Clear this flag with .Cm good .Ar drive diff --git a/usr.sbin/ndp/Makefile b/usr.sbin/ndp/Makefile index 998860d00a69..aad2380bc879 100644 --- a/usr.sbin/ndp/Makefile +++ b/usr.sbin/ndp/Makefile @@ -23,11 +23,6 @@ LIBADD= xo CFLAGS+= -I. -I${.CURDIR} CFLAGS+= -D_U_="" -.if ${MK_EXPERIMENTAL} != "no" -CFLAGS+= -DEXPERIMENTAL -CFLAGS+= -DDRAFT_IETF_6MAN_IPV6ONLY_FLAG -.endif - .if ${MK_NETLINK_SUPPORT} != "no" SRCS+= ndp_netlink.c .else diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index cbca8ec20941..7521be752c80 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1225,12 +1225,7 @@ rtrlist(void) *pflags++ = 'O'; xo_emit("{el:%s}", "other"); } -#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG - if (p->flags & ND_RA_FLAG_IPV6_ONLY) { - *pflags++ = 'S'; - xo_emit("{el:%s}", "ipv6only"); - } -#endif + xo_close_list("flags_pretty"); xo_emit(", flags={:flags/%s}", rflags); diff --git a/usr.sbin/newsyslog/newsyslog.8 b/usr.sbin/newsyslog/newsyslog.8 index aa89ef4b779a..eb927f7e0a68 100644 --- a/usr.sbin/newsyslog/newsyslog.8 +++ b/usr.sbin/newsyslog/newsyslog.8 @@ -14,12 +14,12 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd September 22, 2025 +.Dd March 8, 2026 .Dt NEWSYSLOG 8 .Os .Sh NAME .Nm newsyslog -.Nd maintain system log files to manageable sizes +.Nd rotate system message log files to maintain manageable sizes .Sh SYNOPSIS .Nm .Op Fl CFNPnrsv diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 084aeb36b052..fc8ba7df79af 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -1955,9 +1955,9 @@ do_rotate(const struct conf_entry *ent) if (noaction) printf("\tmv %s %s\n", zfile1, zfile2); - else { - /* XXX - Ought to be checking for failure! */ - (void)rename(zfile1, zfile2); + else if (rename(zfile1, zfile2) != 0) { + warn("can't mv %s to %s", zfile1, zfile2); + continue; } change_attrs(zfile2, ent); if (ent->compress && strlen(logfile_suffix) == 0) { diff --git a/usr.sbin/newsyslog/newsyslog.conf.5 b/usr.sbin/newsyslog/newsyslog.conf.5 index b0c1e78eb085..b26df4bb1a61 100644 --- a/usr.sbin/newsyslog/newsyslog.conf.5 +++ b/usr.sbin/newsyslog/newsyslog.conf.5 @@ -18,14 +18,12 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd February 4, 2026 +.Dd April 15, 2026 .Dt NEWSYSLOG.CONF 5 .Os .Sh NAME .Nm newsyslog.conf -.Nd -.Xr newsyslog 8 -configuration file +.Nd system message log rotator configuration file .Sh DESCRIPTION The .Nm @@ -157,10 +155,10 @@ When the size of the log file reaches .Ar size , in kilobytes by default, or with suffixes like k, M, G, ... as supported by .Xr expand_number 3 , -the log file will be trimmed as described above. +the log file will be rotated. If this field contains an asterisk .Pq Ql * , -the log file will not be trimmed based on size. +the log file will not be rotated based on size. .It Ar when The .Ar when @@ -185,10 +183,10 @@ Additionally, the format may also be constructed with a sign along with a rotation time specification of once a day, once a week, or once a month. .Pp -Time based trimming happens only if +Time based rotation happens only if .Xr newsyslog 8 is run within one hour of the specified time. -If an interval is specified, the log file will be trimmed if that many +If an interval is specified, the log file will be rotated if that many hours have passed since the last rotation. When both a time and an interval are specified then both conditions must be satisfied for the rotation to diff --git a/usr.sbin/nfsd/nfsv4.4 b/usr.sbin/nfsd/nfsv4.4 index e96e507e23ad..9ec775613b47 100644 --- a/usr.sbin/nfsd/nfsv4.4 +++ b/usr.sbin/nfsd/nfsv4.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 8, 2024 +.Dd April, 8, 2026 .Dt NFSV4 4 .Os .Sh NAME @@ -106,16 +106,23 @@ The allows a limited subset of operations to be performed on non-exported subtrees of the local file system, so that traversal of the tree to the exported subtrees is possible. -As such, the ``<rootdir>'' can be in a non-exported file system. +As such, the +.Ql <rootdir> +can be in a non-exported file system. The exception is ZFS, which checks exports and, as such, all ZFS file systems -below the ``<rootdir>'' must be exported. +below the +.Ql <rootdir> +must be exported. However, the entire tree that is rooted at that point must be in local file systems that are of types that can be NFS exported. Since the .Nm -file system is rooted at ``<rootdir>'', setting this to anything other -than ``/'' will result in clients being required to use different mount +file system is rooted at +.Ql <rootdir> , +setting this to anything other than +.Ql / +will result in clients being required to use different mount paths for .Nm than for NFS Version 2 or 3. @@ -132,9 +139,12 @@ take the form: <user>@<dns.domain> .Ed .sp -where ``<dns.domain>'' is not the same as the DNS domain used +where +.Ql <dns.domain> +is not the same as the DNS domain used for host name lookups, but is usually set to the same string. -Most systems set this ``<dns.domain>'' +Most systems set this +.Ql <dns.domain> to the domain name part of the machine's .Xr hostname 1 by default. @@ -154,26 +164,32 @@ either client or server, this daemon must be running. The form where the numbers are in the strings can only be used for AUTH_SYS. To configure your systems this way, the .Xr nfsuserd 8 -daemon does not need to be running on the server, but the following sysctls -need to be set to 1 on the server. +daemon should not be running on the NFS systems, +but the following sysctls +need to be set to 1 on the NFS server. .sp .Bd -literal -offset indent -compact vfs.nfs.enable_uidtostring vfs.nfsd.enable_stringtouid .Ed .sp -On the client, the sysctl +However, on the NFS client +only the sysctl .sp .Bd -literal -offset indent -compact vfs.nfs.enable_uidtostring .Ed .sp -must be set to 1 and the -.Xr nfsuserd 8 -daemon does not need to be running. +needs to be set to 1. .Pp -If these strings are not configured correctly, ``ls -l'' will typically -report a lot of ``nobody'' and ``nogroup'' ownerships. +If these strings are not configured correctly, +.Ql ls -l +will typically +report a lot of +.Ql nobody +and +.Ql nogroup +ownerships. .Pp Although uid/gid numbers are no longer used in the .Nm @@ -204,8 +220,12 @@ plus nfsuserd_enable="YES" .Ed .sp -if the server is using the ``<user>@<domain>'' form of user/group strings or -is using the ``-manage-gids'' option for +if the server is using the +.Ql <user>@<domain> +form of user/group strings or +is using the +.Ql -manage-gids +option for .Xr nfsuserd 8 . .Pp In addition, you can set: @@ -216,7 +236,9 @@ nfsv4_server_only="YES" .sp to disable support for NFSv2 and NFSv3. .Pp -You will also need to add at least one ``V4:'' line to the +You will also need to add at least one +.Ql V4: +line to the .Xr exports 5 file for .Nm @@ -246,7 +268,9 @@ Disabling local locking can only be done if neither local accesses to the exported file systems nor the NLM is operating on them. .El .sp -Note that Samba server access would be considered ``local access'' for the above +Note that Samba server access would be considered +.Ql local access +for the above discussion. .Pp To build a kernel with the NFS server that supports @@ -263,12 +287,16 @@ file. .Sh CLIENT MOUNTS To do an .Nm -mount, specify the ``nfsv4'' option on the +mount, specify the +.Ql nfsv4 +option on the .Xr mount_nfs 8 command line. This will force use of the client that supports .Nm -plus set ``tcp'' and +plus set +.Ql tcp +and .Nm . .Pp The @@ -326,8 +354,8 @@ where the first 4 Ns are the host IP address and the last two are the port# in network byte order (all decimal #s in the range 0-255). .Pp For NFSv4.1 and NFSv4.2, the callback path (called a backchannel) uses the -same TCP connection as the mount, so none of the above applies and should -work through gateways without any issues. +same TCP connection as the mount and, as such, no additional +configuration is needed for the callback path. .Pp To build a kernel with the client that supports .Nm @@ -345,7 +373,10 @@ Options can be specified for the .Xr nfsuserd 8 and .Xr nfscbd 8 -daemons at boot time via the ``nfsuserd_flags'' and ``nfscbd_flags'' +daemons at boot time via the +.Ql nfsuserd_flags +and +.Ql nfscbd_flags .Xr rc.conf 5 variables. .Pp @@ -356,6 +387,105 @@ It occurs when an nfsd thread tries to do an NFSv4 / Close RPC as part of acquiring a new vnode. If all other nfsd threads are blocked waiting for lock(s) held by this nfsd thread, then there is no nfsd thread to service the Close RPC. +.Sh NFSv4 ROOT FILE SYSTEM +.Pp +For an +.Nm +root file system, there are a few things that need +to be done beyond what is needed for an NFSv3 root file system. +The NFS server must be configured with the +.Ql <rootdir> +as +.Pa / +so that +the mount path is the same for +.Nm +as NFSv3. +This is required because the bootstrap code still uses NFSv3. +.Pp +The following additional changes are required in the exported +root file system. +.sp +In +.Xr fstab 5 , +the +.Ql nfsv4 +mount option must be specified in +the line for the root mount. +.sp +In +.Pa /boot/loader.conf +the line +.sp +.Bd -literal -offset indent -compact +boot.nfsroot.options="nfsv4" +.Ed +.sp +is needed to tell the kernel to use +.Nm +for the root mount. +Additional mount options may be specified. +.sp +If your +.Nm +setup is using the form where the uid/gid numbers are in strings, +the sysctl +.Ql vfs.nfs.enable_uidtostring +must be set to one before any NFSv4 read/write mounts are done. +The recommended way to do this is to put +.sp +.Bd -literal -offset indent -compact +vfs.nfs.enable_uidtostring=1 +.Ed +.sp +in +.Pa /etc/sysctl.conf +in the FS exported root file system. +Alternately, if your +.Nm +setup is using +.Ql <user>@<dns.domain> +via +.Xr nfsuserd 8 +for uids/gids, then you need the following additional line in +.Pa /boot/loader.conf +.sp +.Bd -literal -offset indent -compact +boot.nfsroot.user_domain="<dns.domain>" +.Ed +.sp +which tells the booting kernel that you are going to be +doing mapping via +.Xr nfsuserd 8 +and what your +.Ql <dns.domain> +is. +The booting kernel will set a few critical mappings to allow +the boot to proceed until the +.Xr nfsuserd 8 +daemon is started. +Then in +.Pa /etc/rc.conf +you need the lines +.sp +.Bd -literal -offset indent -compact +nfsuserd_enable="YES" +nfsuserd_flags="-domain <dns.domain>" +.Ed +.sp +to start the daemon. +.Pp +Beyond this, the setup should be the same as would be used +for an NFSv3 root file system. +See section +.Ql Diskless Operation with PXE +in the +.Ql Advanced Networking +chapter of the +.Ql FreeBSD Handbook , +although configuring hosts as fixed addresses in your +.Ql dhcpd.conf +might be preferable. .Sh FILES .Bl -tag -width /var/db/nfs-stablerestart.bak -compact .It Pa /var/db/nfs-stablerestart diff --git a/usr.sbin/nfsuserd/nfsuserd.c b/usr.sbin/nfsuserd/nfsuserd.c index 058253beaf95..9326dd9018e0 100644 --- a/usr.sbin/nfsuserd/nfsuserd.c +++ b/usr.sbin/nfsuserd/nfsuserd.c @@ -50,6 +50,7 @@ #include <fs/nfs/nfsproto.h> #include <fs/nfs/nfskpiport.h> #include <fs/nfs/nfs.h> +#include <fs/nfs/nfsid.h> #include <ctype.h> #include <err.h> diff --git a/usr.sbin/periodic/etc/daily/404.status-zfs b/usr.sbin/periodic/etc/daily/404.status-zfs index 052f794c0bbc..64b67a2dc008 100755 --- a/usr.sbin/periodic/etc/daily/404.status-zfs +++ b/usr.sbin/periodic/etc/daily/404.status-zfs @@ -25,13 +25,15 @@ case "$daily_status_zfs_enable" in ;; esac sout=`zpool status -x` - echo "$sout" # zpool status -x always exits with 0, so we have to interpret its # output to see what's going on. if [ "$sout" = "all pools are healthy" \ -o "$sout" = "no pools available" ]; then + echo "$sout" rc=0 else + # Show verbose status so we can see which files are affected + zpool status -v rc=1 fi ;; diff --git a/usr.sbin/pmcstat/pmcstat.8 b/usr.sbin/pmcstat/pmcstat.8 index edb9ff106092..c78a13f910f9 100644 --- a/usr.sbin/pmcstat/pmcstat.8 +++ b/usr.sbin/pmcstat/pmcstat.8 @@ -23,7 +23,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.Dd April 19, 2025 +.Dd April 15, 2026 .Dt PMCSTAT 8 .Os .Sh NAME @@ -220,6 +220,30 @@ specified in .It Fl R Ar logfilename Perform offline analysis using sampling data in file .Ar logfilename . +Each decoded record is printed as a single line with the following fields: +a record type (e.g., +.Dq callchain , +.Dq initlog ) , +type-specific data, and a trailing 20-digit raw TSC value recording the +CPU cycle at which the event occurred. +The +.Dq initlog +record additionally prints +.Dq Li tsc_freq=<hz> , +the TSC tick rate in Hz measured by the kernel at boot. +To convert a TSC delta to nanoseconds: +.Pp +.Dl elapsed_ns = (tsc_end - tsc_start) * 1e9 / tsc_freq +.Pp +TSC-based timestamps and +.Dq Li tsc_freq +are only meaningful on x86 architectures +.Pq amd64 and i386 . +On all other architectures +.Pq including arm64 and powerpc +the +.Dq Li tsc_freq +field will be zero. .It Fl S Ar event-spec Allocate a system mode sampling PMC measuring hardware events specified in diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c index 1809dae7bc4c..a78062a5b6e0 100644 --- a/usr.sbin/pmcstat/pmcstat.c +++ b/usr.sbin/pmcstat/pmcstat.c @@ -739,8 +739,11 @@ main(int argc, char **argv) STAILQ_INSERT_TAIL(&args.pa_events, ev, ev_next); - if ((caps & PMC_CAP_SYSWIDE) == PMC_CAP_SYSWIDE) - break; + if ((caps & PMC_CAP_SYSWIDE) == PMC_CAP_SYSWIDE) { + CPU_ZERO(&cpumask); + CPU_SET(0, &cpumask); + args.pa_flags |= FLAGS_HAS_CPUMASK; + } if ((caps & PMC_CAP_DOMWIDE) == PMC_CAP_DOMWIDE) { CPU_ZERO(&cpumask); /* diff --git a/usr.sbin/pmcstat/pmcstat.h b/usr.sbin/pmcstat/pmcstat.h index 67571ce4b2ee..6131d7a50404 100644 --- a/usr.sbin/pmcstat/pmcstat.h +++ b/usr.sbin/pmcstat/pmcstat.h @@ -50,8 +50,9 @@ #define PMCSTAT_PRINT_ENTRY(T,...) do { \ (void) fprintf(args.pa_printfile, "%-9s", T); \ - (void) fprintf(args.pa_printfile, " " __VA_ARGS__); \ - (void) fprintf(args.pa_printfile, "\n"); \ + (void) fprintf(args.pa_printfile, " " __VA_ARGS__); \ + (void) fprintf(args.pa_printfile, " %20ju\n", \ + (uintmax_t)_pmcstat_current_tsc); \ } while (0) #define PMCSTAT_PL_NONE 0 diff --git a/usr.sbin/pmcstat/pmcstat_log.c b/usr.sbin/pmcstat/pmcstat_log.c index db9cbfabd9da..9af2ccc4e365 100644 --- a/usr.sbin/pmcstat/pmcstat_log.c +++ b/usr.sbin/pmcstat/pmcstat_log.c @@ -194,6 +194,7 @@ static struct pmc_plugins plugins[] = { }; static int pmcstat_mergepmc; +static uint64_t _pmcstat_current_tsc; /* TSC for PMCSTAT_PRINT_ENTRY */ int pmcstat_pmcinfilter = 0; /* PMC filter for top mode. */ float pmcstat_threshold = 0.5; /* Cost filter for top mode. */ @@ -471,6 +472,7 @@ pmcstat_print_log(void) while (pmclog_read(args.pa_logparser, &ev) == 0) { assert(ev.pl_state == PMCLOG_OK); + _pmcstat_current_tsc = ev.pl_tsc; switch (ev.pl_type) { case PMCLOG_TYPE_CALLCHAIN: PMCSTAT_PRINT_ENTRY("callchain", @@ -496,9 +498,11 @@ pmcstat_print_log(void) PMCSTAT_PRINT_ENTRY("drop",); break; case PMCLOG_TYPE_INITIALIZE: - PMCSTAT_PRINT_ENTRY("initlog","0x%x \"%s\"", + PMCSTAT_PRINT_ENTRY("initlog", + "0x%x \"%s\" tsc_freq=%" PRIu64, ev.pl_u.pl_i.pl_version, - pmc_name_of_cputype(ev.pl_u.pl_i.pl_arch)); + pmc_name_of_cputype(ev.pl_u.pl_i.pl_arch), + ev.pl_u.pl_i.pl_tsc_freq); if ((ev.pl_u.pl_i.pl_version & 0xFF000000) != PMC_VERSION_MAJOR << 24) warnx( diff --git a/usr.sbin/rtadvd/Makefile b/usr.sbin/rtadvd/Makefile index 583f9db88ceb..4ed2d7182a6b 100644 --- a/usr.sbin/rtadvd/Makefile +++ b/usr.sbin/rtadvd/Makefile @@ -20,11 +20,6 @@ MAN= rtadvd.conf.5 rtadvd.8 SRCS= rtadvd.c rrenum.c advcap.c if.c config.c timer.c timer_subr.c \ control.c control_server.c -.if ${MK_EXPERIMENTAL} != "no" -CFLAGS+= -DEXPERIMENTAL -CFLAGS+= -DDRAFT_IETF_6MAN_IPV6ONLY_FLAG -.endif - LIBADD= util WARNS?= 1 diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c index 83b2efb68303..8b7079c17822 100644 --- a/usr.sbin/rtadvd/config.c +++ b/usr.sbin/rtadvd/config.c @@ -442,10 +442,6 @@ getconfig(struct ifinfo *ifi) } val |= ND_RA_FLAG_RTPREF_LOW; } -#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG - if (strchr(flagstr, 'S')) - val |= ND_RA_FLAG_IPV6_ONLY; -#endif } else MAYHAVE(val, "raflags", 0); @@ -461,9 +457,6 @@ getconfig(struct ifinfo *ifi) __func__, rai->rai_rtpref, ifi->ifi_ifname); goto getconfig_free_rai; } -#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG - rai->rai_ipv6onlyflg = val & ND_RA_FLAG_IPV6_ONLY; -#endif MAYHAVE(val, "rltime", rai->rai_maxinterval * 3); if ((uint16_t)val && ((uint16_t)val < rai->rai_maxinterval || @@ -619,7 +612,7 @@ getconfig_free_pfx: get_prefix(rai); MAYHAVE(val64, "mtu", 0); - if (val < 0 || val64 > 0xffffffff) { + if (val64 < 0 || val64 > 0xffffffff) { syslog(LOG_ERR, "<%s> mtu (%" PRIu64 ") on %s out of range", __func__, val64, ifi->ifi_ifname); @@ -1028,12 +1021,15 @@ getconfig_free_prf64: } else { struct rdnss *rdn; struct dnssl *dns; + struct rtinfo *rti; rai_old->rai_lifetime = 0; TAILQ_FOREACH(rdn, &rai_old->rai_rdnss, rd_next) rdn->rd_ltime = 0; TAILQ_FOREACH(dns, &rai_old->rai_dnssl, dn_next) dns->dn_ltime = 0; + TAILQ_FOREACH(rti, &rai_old->rai_route, rti_next) + rti->rti_ltime = 0; ifi->ifi_rainfo_trans = rai_old; ifi->ifi_state = IFI_STATE_TRANSITIVE; @@ -1485,10 +1481,6 @@ make_packet(struct rainfo *rai) rai->rai_managedflg ? ND_RA_FLAG_MANAGED : 0; ra->nd_ra_flags_reserved |= rai->rai_otherflg ? ND_RA_FLAG_OTHER : 0; -#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG - ra->nd_ra_flags_reserved |= - rai->rai_ipv6onlyflg ? ND_RA_FLAG_IPV6_ONLY : 0; -#endif ra->nd_ra_router_lifetime = htons(rai->rai_lifetime); ra->nd_ra_reachable = htonl(rai->rai_reachabletime); ra->nd_ra_retransmit = htonl(rai->rai_retranstimer); diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c index 1eb8f12a7338..b772f78845d8 100644 --- a/usr.sbin/rtadvd/rtadvd.c +++ b/usr.sbin/rtadvd/rtadvd.c @@ -138,6 +138,7 @@ union nd_opt { #define NDOPT_FLAG_RDNSS (1 << 5) #define NDOPT_FLAG_DNSSL (1 << 6) #define NDOPT_FLAG_PREF64 (1 << 7) +#define NDOPT_FLAG_ROUTEINFO (1 << 8) static uint32_t ndopt_flags[] = { [ND_OPT_SOURCE_LINKADDR] = NDOPT_FLAG_SRCLINKADDR, @@ -148,6 +149,7 @@ static uint32_t ndopt_flags[] = { [ND_OPT_RDNSS] = NDOPT_FLAG_RDNSS, [ND_OPT_DNSSL] = NDOPT_FLAG_DNSSL, [ND_OPT_PREF64] = NDOPT_FLAG_PREF64, + [ND_OPT_ROUTE_INFO] = NDOPT_FLAG_ROUTEINFO, }; static void rtadvd_shutdown(void); @@ -372,6 +374,7 @@ rtadvd_shutdown(void) struct rainfo *rai; struct rdnss *rdn; struct dnssl *dns; + struct rtinfo *rti; if (wait_shutdown) { syslog(LOG_INFO, @@ -416,6 +419,8 @@ rtadvd_shutdown(void) rdn->rd_ltime = 0; TAILQ_FOREACH(dns, &rai->rai_dnssl, dn_next) dns->dn_ltime = 0; + TAILQ_FOREACH(rti, &rai->rai_route, rti_next) + rti->rti_ltime = 0; } TAILQ_FOREACH(ifi, &ifilist, ifi_next) { if (!ifi->ifi_persist) @@ -1085,7 +1090,8 @@ ra_input(int len, struct nd_router_advert *nra, error = nd6_options((struct nd_opt_hdr *)(nra + 1), len - sizeof(struct nd_router_advert), &ndopts, NDOPT_FLAG_SRCLINKADDR | NDOPT_FLAG_PREFIXINFO | NDOPT_FLAG_MTU | - NDOPT_FLAG_RDNSS | NDOPT_FLAG_DNSSL | NDOPT_FLAG_PREF64); + NDOPT_FLAG_RDNSS | NDOPT_FLAG_DNSSL | NDOPT_FLAG_PREF64 | + NDOPT_FLAG_ROUTEINFO); if (error) { syslog(LOG_INFO, "<%s> ND option check failed for an RA from %s on %s", @@ -1148,19 +1154,6 @@ ra_input(int len, struct nd_router_advert *nra, sizeof(ntopbuf)), on_off[rai->rai_otherflg]); inconsistent++; } -#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG - /* S "IPv6-Only" (Six, Silence-IPv4) flag */ - if ((nra->nd_ra_flags_reserved & ND_RA_FLAG_IPV6_ONLY) != - rai->rai_ipv6onlyflg) { - syslog(LOG_NOTICE, - "S flag inconsistent on %s:" - " %s from %s, %s from us", - ifi->ifi_ifname, on_off[!rai->rai_ipv6onlyflg], - inet_ntop(AF_INET6, &from->sin6_addr, ntopbuf, - sizeof(ntopbuf)), on_off[rai->rai_ipv6onlyflg]); - inconsistent++; - } -#endif /* Reachable Time */ reachabletime = ntohl(nra->nd_ra_reachable); if (reachabletime && rai->rai_reachabletime && @@ -1431,7 +1424,8 @@ nd6_options(struct nd_opt_hdr *hdr, int limit, if (hdr->nd_opt_type > ND_OPT_MTU && hdr->nd_opt_type != ND_OPT_RDNSS && hdr->nd_opt_type != ND_OPT_DNSSL && - hdr->nd_opt_type != ND_OPT_PREF64) { + hdr->nd_opt_type != ND_OPT_PREF64 && + hdr->nd_opt_type != ND_OPT_ROUTE_INFO) { syslog(LOG_INFO, "<%s> unknown ND option(type %d)", __func__, hdr->nd_opt_type); continue; @@ -1465,6 +1459,11 @@ nd6_options(struct nd_opt_hdr *hdr, int limit, case ND_OPT_PREFIX_INFORMATION: if (optlen == sizeof(struct nd_opt_prefix_info)) break; + goto skip; + case ND_OPT_ROUTE_INFO: + if (optlen >= 8 && optlen <= 24 && + (optlen - sizeof(struct nd_opt_route_info)) % 8 == 0) + break; skip: syslog(LOG_INFO, "<%s> invalid option length", __func__); @@ -1477,6 +1476,7 @@ skip: case ND_OPT_RDNSS: case ND_OPT_DNSSL: case ND_OPT_PREF64: + case ND_OPT_ROUTE_INFO: break; /* we don't care about these options */ case ND_OPT_SOURCE_LINKADDR: case ND_OPT_MTU: diff --git a/usr.sbin/rtadvd/rtadvd.h b/usr.sbin/rtadvd/rtadvd.h index 5ecfd1b56423..5b9037b2dcf3 100644 --- a/usr.sbin/rtadvd/rtadvd.h +++ b/usr.sbin/rtadvd/rtadvd.h @@ -204,9 +204,6 @@ struct rainfo { uint16_t rai_mininterval; /* MinRtrAdvInterval */ int rai_managedflg; /* AdvManagedFlag */ int rai_otherflg; /* AdvOtherConfigFlag */ -#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG - int rai_ipv6onlyflg; /* AdvIPv6OnlyFlag */ -#endif int rai_rtpref; /* router preference */ uint32_t rai_linkmtu; /* AdvLinkMTU */ diff --git a/usr.sbin/syslogd/syslog.conf.5 b/usr.sbin/syslogd/syslog.conf.5 index 691f2cdd7062..f641aedee3e5 100644 --- a/usr.sbin/syslogd/syslog.conf.5 +++ b/usr.sbin/syslogd/syslog.conf.5 @@ -25,14 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 10, 2020 +.Dd March 8, 2026 .Dt SYSLOG.CONF 5 .Os .Sh NAME .Nm syslog.conf -.Nd -.Xr syslogd 8 -configuration file +.Nd syslogd system message log configuration file .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 1b894ae54fc6..59cb56fd5970 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -781,15 +781,21 @@ main(int argc, char *argv[]) case EVFILT_SIGNAL: switch (ev.ident) { case SIGHUP: + /* Reload */ init(true); break; case SIGINT: case SIGQUIT: + /* Ignore these unless -F and / or -d */ + if (!Foreground && !Debug) + break; + /* FALLTHROUGH */ case SIGTERM: - if (ev.ident == SIGTERM || Debug) - die(ev.ident); + /* Terminate */ + die(ev.ident); break; case SIGALRM: + /* Mark and flush */ markit(); break; } @@ -2814,7 +2820,7 @@ prop_filter_compile(const char *cfilter) pfilter.cmp_type = FILT_CMP_REGEX; else if (strcasecmp(argv[1], "ereregex") == 0) { pfilter.cmp_type = FILT_CMP_REGEX; - pfilter.cmp_flags |= REG_EXTENDED; + pfilter.cmp_flags |= FILT_FLAG_EXTENDED; } else { dprintf("unknown cmp function"); goto error; diff --git a/usr.sbin/syslogd/tests/syslogd_test.sh b/usr.sbin/syslogd/tests/syslogd_test.sh index 1f235c476c49..253a26258959 100644 --- a/usr.sbin/syslogd/tests/syslogd_test.sh +++ b/usr.sbin/syslogd/tests/syslogd_test.sh @@ -238,6 +238,28 @@ prop_filter_body() syslogd_check_log_nomatch "prop1: FreeBSD" syslogd_check_log_nomatch "prop2: freebsd" syslogd_check_log "prop3: Solaris" + + printf ":msg,ereregex,\"substring1|substring2\"\nuser.debug\t${SYSLOGD_LOGFILE}\n" \ + > "${SYSLOGD_CONFIG}" + syslogd_reload + + syslogd_log -p user.debug -t "prop1" -h "${SYSLOGD_LOCAL_SOCKET}" "substring1" + syslogd_check_log "prop1: substring1" + syslogd_log -p user.debug -t "prop2" -h "${SYSLOGD_LOCAL_SOCKET}" "substring2" + syslogd_check_log "prop2: substring2" + syslogd_log -p user.debug -t "prop3" -h "${SYSLOGD_LOCAL_SOCKET}" "substring3" + syslogd_check_log_nomatch "prop3: substring3" + + printf ":msg,!ereregex,\"substring1|substring2\"\nuser.debug\t${SYSLOGD_LOGFILE}\n" \ + > "${SYSLOGD_CONFIG}" + syslogd_reload + + syslogd_log -p user.debug -t "prop1" -h "${SYSLOGD_LOCAL_SOCKET}" "substring1" + syslogd_check_log_nomatch "prop1: substring1" + syslogd_log -p user.debug -t "prop2" -h "${SYSLOGD_LOCAL_SOCKET}" "substring2" + syslogd_check_log_nomatch "prop2: substring2" + syslogd_log -p user.debug -t "prop3" -h "${SYSLOGD_LOCAL_SOCKET}" "substring3" + syslogd_check_log "prop3: substring3" } prop_filter_cleanup() { diff --git a/usr.sbin/tcpdump/tcpdump/Makefile b/usr.sbin/tcpdump/tcpdump/Makefile index 21c5f9ac7fdf..27270cd34dfb 100644 --- a/usr.sbin/tcpdump/tcpdump/Makefile +++ b/usr.sbin/tcpdump/tcpdump/Makefile @@ -116,7 +116,6 @@ SRCS= addrtoname.c \ print-openflow-1.0.c \ print-ospf.c \ print-ospf6.c \ - print-otv.c \ print-pgm.c \ print-pim.c \ print-pktap.c \ diff --git a/usr.sbin/tcpdump/tcpdump/config.h b/usr.sbin/tcpdump/tcpdump/config.h index 5e343d5ed0c3..1ccdbaf7647b 100644 --- a/usr.sbin/tcpdump/tcpdump/config.h +++ b/usr.sbin/tcpdump/tcpdump/config.h @@ -3,9 +3,17 @@ /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ + +#ifndef TCPDUMP_CONFIG_H_ +#define TCPDUMP_CONFIG_H_ + + /* Define to 1 if arpa/inet.h declares `ether_ntohost' */ /* #undef ARPA_INET_H_DECLARES_ETHER_NTOHOST */ +/* define if you want to build the instrument functions code */ +/* #undef ENABLE_INSTRUMENT_FUNCTIONS */ + /* define if you want to build the possibly-buggy SMB printer */ #define ENABLE_SMB 1 @@ -43,9 +51,6 @@ /* Define to 1 if you have the `EVP_DecryptInit_ex' function. */ #define HAVE_EVP_DECRYPTINIT_EX 1 -/* Define to 1 if you have the <fcntl.h> header file. */ -#define HAVE_FCNTL_H 1 - /* Define to 1 if you have the `fork' function. */ #define HAVE_FORK 1 @@ -64,32 +69,23 @@ /* Define to 1 if you have the `cap-ng' library (-lcap-ng). */ /* #undef HAVE_LIBCAP_NG */ -/* Define to 1 if you have the `crypto' library (-lcrypto). */ +/* Define to 1 if you have a usable `crypto' library (-lcrypto). */ /* See Makefile */ /* #undef HAVE_LIBCRYPTO */ /* Define to 1 if you have the `rpc' library (-lrpc). */ /* #undef HAVE_LIBRPC */ -/* Define to 1 if you have the <memory.h> header file. */ -#define HAVE_MEMORY_H 1 - /* Define to 1 if you have the <net/if.h> header file. */ #define HAVE_NET_IF_H 1 -/* Define to 1 if printf(3) does not support the z length modifier. */ -/* #undef HAVE_NO_PRINTF_Z */ - /* Define to 1 if you have the `openat' function. */ #define HAVE_OPENAT 1 -/* Define to 1 if you have the <openssl/evp.h> header file. */ -#define HAVE_OPENSSL_EVP_H 1 - /* define if the OS provides AF_INET6 and struct in6_addr */ #define HAVE_OS_IPV6_SUPPORT 1 -/* if there's an os_proto.h for this platform, to use additional prototypes */ +/* if there's an os-proto.h for this platform, to use additional prototypes */ /* #undef HAVE_OS_PROTO_H */ /* Define to 1 if you have the `pcap_breakloop' function. */ @@ -179,6 +175,9 @@ /* Define to 1 if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1 +/* Define to 1 if you have the <stdio.h> header file. */ +#define HAVE_STDIO_H 1 + /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 @@ -237,7 +236,7 @@ #define PACKAGE_NAME "tcpdump" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "tcpdump 4.99.5" +#define PACKAGE_STRING "tcpdump 4.99.6" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "tcpdump" @@ -246,12 +245,11 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "4.99.5" - -/* The size of `void *', as computed by sizeof. */ -/* #undef SIZEOF_VOID_P */ +#define PACKAGE_VERSION "4.99.6" -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #define STDC_HEADERS 1 /* Define to 1 if sys/ethernet.h declares `ether_ntohost' */ @@ -293,3 +291,7 @@ /* Define to the type of an unsigned integer type wide enough to hold a pointer, if such a type exists, and if the system does not define it. */ /* #undef uintptr_t */ + + +#endif // TCPDUMP_CONFIG_H_ + diff --git a/usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 b/usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 index 6aa9f1289b35..b607f45cd369 100644 --- a/usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 +++ b/usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd September 3, 2024 +.Dd April 17, 2026 .Dt VIRTUAL_OSS 8 .Os .Sh NAME @@ -325,17 +325,6 @@ server: virtual_oss -S -b 16 -C 2 -c 2 -r 48000 -s 4ms \\ -f /dev/sndio/default -d dsp .Ed -.Pp -How to set intel based CPUs in performance mode: -.Bd -literal -offset indent -sysctl -aN | fgrep dev.hwpstate | fgrep epp | \ -while read OID -do -sysctl ${OID}=0 -done - -sysctl kern.sched.preempt_thresh=224 -.Ed .Sh NOTES All character devices are created using the 0666 mode which gives everyone in the system access. |
