Skip to content

Bump socketcan from 3.5.0 to 3.6.1#130

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/socketcan-3.6.1
Open

Bump socketcan from 3.5.0 to 3.6.1#130
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/socketcan-3.6.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 15, 2026

Copy link
Copy Markdown
Contributor

Bumps socketcan from 3.5.0 to 3.6.1.

Release notes

Sourced from socketcan's releases.

Version 3.6.1

Fixed broken build in v3.6.0 for musl targets

  • #101 Add libc::ioctl fix for musl targets

Version 3.6.0

Timestamps & lots of fixes!

  • Added ability to get timestamp for received frames
    • New CanTimestamps type carrying socket-layer, network-stack software, and hardware receive timestamps
    • SocketOptions::set_recv_timestamp (SO_TIMESTAMPNS) and SocketOptions::set_timestamping (SO_TIMESTAMPING) to enable delivery on the socket
    • Socket::read_frame_with_timestamp, Socket::read_frame_with_timestamps, and Socket::read_frame_with_hw_timestamp on the Socket trait (default implementations return ENOSYS to preserve semver for out-of-tree Socket implementors)
    • CanSocket::has_hw_timestamps / CanFdSocket::has_hw_timestamps query interface capability via ETHTOOL_GET_TS_INFO
    • Re-exports for the SOF_TIMESTAMPING_* flag constants from the crate root
    • All read methods deliver the frame and ancillary timestamp data in a single recvmsg() call, eliminating the race window of the old SIOCGSTAMPNS approach
    • Async equivalents on the tokio::CanSocket/CanFdSocket and async_io::CanSocket/CanFdSocket wrappers
  • async_io::CanSocket and async_io::CanFdSocket gained open_if(ifindex: u32) and open_addr(&CanAddr) constructors (parity with the tokio wrappers, which previously had all three)
  • async_io::CanSocket and async_io::CanFdSocket now implement futures::Stream (yielding Result<CanFrame> / Result<CanAnyFrame>) and futures::Sink (over CanFrame / CanAnyFrame), parity with the tokio wrappers. The async-io, async-std, and smol features now pull in futures (previously it was wired in only via the tokio feature)
  • async_io::CanSocket and async_io::CanFdSocket gained try_read_frame() and try_write_frame() methods, parity with the tokio wrappers (added in #84). Both return WouldBlock when no frame is available / send buffer is full and go straight to the underlying non-blocking fd (bypassing the async-io reactor); mixing with the async-path methods is safe
  • New example tokio_recvts — tokio mirror of can_recvts, prints software and hardware timestamps alongside each frame
  • Bumped MSRV to v1.75.0
  • All frame types now derive PartialEq, Eq, and Hash — both the concrete frame structs (CanDataFrame, CanRemoteFrame, CanErrorFrame, CanFdFrame) and the wrapper enums (CanFrame, CanAnyFrame, CanRawFrame). Equality is field-wise on the underlying libc::can_frame / libc::canfd_frame, which means it includes every byte of the structure (id, dlc, flags, the libc __pad/__res0 fields, and the full data array). Note that set_data does not zero the unused trailing bytes of can_frame::data, so two semantically-equivalent frames built by different code paths may still compare unequal — callers should treat equality as "byte-identical wire image" rather than "same logical frame".
  • Enabled the extra_traits feature on the libc dependency so the trait derives can flow through (libc::can_frame / canfd_frame only derive(PartialEq, Eq, Hash) when that feature is on).
  • Bug fixes:
    • recvmsg() ancillary control buffer is now properly aligned and validated; MSG_TRUNC/MSG_CTRUNC handled correctly
    • timespec_to_duration no longer wraps on a negative tv_sec in release builds
    • From<canfd_frame> for CanFdFrame normalises non-spec lengths so dlc() and data() stay consistent and no uninitialised bytes can leak
    • TryFrom<can_frame> for CanErrorFrame forces can_dlc = CAN_MAX_DLEN so the len/dlc/data invariant holds
    • CanDataFrame::set_id and CanFdFrame::set_id preserve CAN_ERR_FLAG/CAN_RTR_FLAG bits in the ID word
    • CanId + u32 no longer panics on overflow in debug builds
    • AsPtr::as_bytes_mut now returns &mut [u8] instead of &[u8]
    • rcan CLI no longer contains duplicate loopback subcommand arms
    • examples/can_recvts.rs now requests the full set of timestamp flags so software and hardware timestamps actually arrive
    • examples/fd_send.rs now sends an actual CAN FD frame
    • fmt::UpperHex on classic frames uses raw_id() (no flag-bit leakage), zero-pads the ID to 3 chars (SFF) / 8 chars (EFF), joins data bytes without spaces, and emits #R<dlc> for remote frames so the output matches candump's log format
    • fmt::UpperHex on CanFdFrame prints the FD flags as a single hex nibble between ## and the data bytes (no stray space)
    • CanRemoteFrame::data() now returns &[] (spec-correct: remote frames carry only a DLC); use dlc() to read the requested length
    • CanInterface::create rejects names of length IFNAMSIZ and above (off-by-one — IFNAMSIZ includes the trailing NUL)
    • CAN_TERMINATION_DISABLED is now u16 (matches the rest of the termination API)
    • From<libudev::Error> preserves the underlying description on the wrapped io::Error
    • CanAddr gained hand-rolled PartialEq/Eq/Hash impls comparing (can_family, can_ifindex) only; deriving them would compare the can_addr union plus padding, which is unsound
    • CanAddr::Debug now renders the can_addr union bytes (J1939 / ISO-TP fields are no longer dropped)
    • From<sockaddr_can> for CanAddr now debug_assert!s can_family == AF_CAN
    • available_interfaces() was silently ignoring udev errors and returning an empty list of interfaces. It now returns an error on udev failure.
    • Tokio Sink::poll_close no longer attempts a spurious clear_ready(); Sink::start_send issues a single non-blocking write_frame() instead of busy-retrying via write_frame_insist
    • Typo: "socke options" → "socket options" in set_socket_option_mult doc
    • dump::Reader caps each line at 64 KiB so a malformed or hostile log can't OOM the reader; over-long lines produce InvalidCanFrame
    • dump::Reader requires exactly six mantissa digits on the timestamp (real candump format), and uses checked arithmetic so an overflow errors instead of producing a wrong timestamp
    • dump::Reader propagates remote-frame DLC parse errors via InvalidCanFrame (previously silently coerced to 0); the DLC is now parsed as a hex nibble matching candump's R<X> format

... (truncated)

Changelog

Sourced from socketcan's changelog.

Version 3.6.1 (2026-06-10)

  • #101 Add libc::ioctl fix for musl targets Fixed broken build in v3.6.0 for musl targets

Version 3.6.0 (2026-06-09)

  • Added ability to get timestamp for received frames
    • New CanTimestamps type carrying socket-layer, network-stack software, and hardware receive timestamps
    • SocketOptions::set_recv_timestamp (SO_TIMESTAMPNS) and SocketOptions::set_timestamping (SO_TIMESTAMPING) to enable delivery on the socket
    • Socket::read_frame_with_timestamp, Socket::read_frame_with_timestamps, and Socket::read_frame_with_hw_timestamp on the Socket trait (default implementations return ENOSYS to preserve semver for out-of-tree Socket implementors)
    • CanSocket::has_hw_timestamps / CanFdSocket::has_hw_timestamps query interface capability via ETHTOOL_GET_TS_INFO
    • Re-exports for the SOF_TIMESTAMPING_* flag constants from the crate root
    • All read methods deliver the frame and ancillary timestamp data in a single recvmsg() call, eliminating the race window of the old SIOCGSTAMPNS approach
    • Async equivalents on the tokio::CanSocket/CanFdSocket and async_io::CanSocket/CanFdSocket wrappers
  • async_io::CanSocket and async_io::CanFdSocket gained open_if(ifindex: u32) and open_addr(&CanAddr) constructors (parity with the tokio wrappers, which previously had all three)
  • async_io::CanSocket and async_io::CanFdSocket now implement futures::Stream (yielding Result<CanFrame> / Result<CanAnyFrame>) and futures::Sink (over CanFrame / CanAnyFrame), parity with the tokio wrappers. The async-io, async-std, and smol features now pull in futures (previously it was wired in only via the tokio feature)
  • async_io::CanSocket and async_io::CanFdSocket gained try_read_frame() and try_write_frame() methods, parity with the tokio wrappers (added in #84). Both return WouldBlock when no frame is available / send buffer is full and go straight to the underlying non-blocking fd (bypassing the async-io reactor); mixing with the async-path methods is safe
  • New example tokio_recvts — tokio mirror of can_recvts, prints software and hardware timestamps alongside each frame
  • Bumped MSRV to v1.75.0
  • All frame types now derive PartialEq, Eq, and Hash — both the concrete frame structs (CanDataFrame, CanRemoteFrame, CanErrorFrame, CanFdFrame) and the wrapper enums (CanFrame, CanAnyFrame, CanRawFrame). Equality is field-wise on the underlying libc::can_frame / libc::canfd_frame, which means it includes every byte of the structure (id, dlc, flags, the libc __pad/__res0 fields, and the full data array). Note that set_data does not zero the unused trailing bytes of can_frame::data, so two semantically-equivalent frames built by different code paths may still compare unequal — callers should treat equality as "byte-identical wire image" rather than "same logical frame".
  • Enabled the extra_traits feature on the libc dependency so the trait derives can flow through (libc::can_frame / canfd_frame only derive(PartialEq, Eq, Hash) when that feature is on).
  • Bug fixes:
    • recvmsg() ancillary control buffer is now properly aligned and validated; MSG_TRUNC/MSG_CTRUNC handled correctly
    • timespec_to_duration no longer wraps on a negative tv_sec in release builds
    • From<canfd_frame> for CanFdFrame normalises non-spec lengths so dlc() and data() stay consistent and no uninitialised bytes can leak
    • TryFrom<can_frame> for CanErrorFrame forces can_dlc = CAN_MAX_DLEN so the len/dlc/data invariant holds
    • CanDataFrame::set_id and CanFdFrame::set_id preserve CAN_ERR_FLAG/CAN_RTR_FLAG bits in the ID word
    • CanId + u32 no longer panics on overflow in debug builds
    • AsPtr::as_bytes_mut now returns &mut [u8] instead of &[u8]
    • rcan CLI no longer contains duplicate loopback subcommand arms
    • examples/can_recvts.rs now requests the full set of timestamp flags so software and hardware timestamps actually arrive
    • examples/fd_send.rs now sends an actual CAN FD frame
    • fmt::UpperHex on classic frames uses raw_id() (no flag-bit leakage), zero-pads the ID to 3 chars (SFF) / 8 chars (EFF), joins data bytes without spaces, and emits #R<dlc> for remote frames so the output matches candump's log format
    • fmt::UpperHex on CanFdFrame prints the FD flags as a single hex nibble between ## and the data bytes (no stray space)
    • CanRemoteFrame::data() now returns &[] (spec-correct: remote frames carry only a DLC); use dlc() to read the requested length
    • CanInterface::create rejects names of length IFNAMSIZ and above (off-by-one — IFNAMSIZ includes the trailing NUL)
    • CAN_TERMINATION_DISABLED is now u16 (matches the rest of the termination API)
    • From<libudev::Error> preserves the underlying description on the wrapped io::Error
    • CanAddr gained hand-rolled PartialEq/Eq/Hash impls comparing (can_family, can_ifindex) only; deriving them would compare the can_addr union plus padding, which is unsound
    • CanAddr::Debug now renders the can_addr union bytes (J1939 / ISO-TP fields are no longer dropped)
    • From<sockaddr_can> for CanAddr now debug_assert!s can_family == AF_CAN
    • available_interfaces() was silently ignoring udev errors and returning an empty list of interfaces. It now returns an error on udev failure.
    • Tokio Sink::poll_close no longer attempts a spurious clear_ready(); Sink::start_send issues a single non-blocking write_frame() instead of busy-retrying via write_frame_insist
    • Typo: "socke options" → "socket options" in set_socket_option_mult doc
    • dump::Reader caps each line at 64 KiB so a malformed or hostile log can't OOM the reader; over-long lines produce InvalidCanFrame
    • dump::Reader requires exactly six mantissa digits on the timestamp (real candump format), and uses checked arithmetic so an overflow errors instead of producing a wrong timestamp
    • dump::Reader propagates remote-frame DLC parse errors via InvalidCanFrame (previously silently coerced to 0); the DLC is now parsed as a hex nibble matching candump's R<X> format
    • dump::CanDumpRecord Display now emits parseable lines for error frames (<error_bits>#<8 hex bytes>) and FD frames (##<flag-nibble><bytes>), and zero-pads the ID width (3 hex for SFF, 8 hex for EFF) on all variants

... (truncated)

Commits
  • 7af0b4c Updated README and CHANGELOG for the v3.6.1 release
  • db35669 Merge pull request #101 from jscatena88/master
  • a995da4 Use const with as cast for conversion
  • 1d442bd silence clippy useless conversion warning
  • 2940250 Add libc::ioctl fix for musl targets
  • 5562e94 Updated README and CHANGELOG for the v3.6.0 release. Minor fixes. Added doc f...
  • 5d14bb4 Reverted #81, for now, due to failed semver check
  • 258f97a Added try read/write for async-io
  • 9655d13 Reformat
  • 07fb8ec Merge pull request #84 from mcbridejc/try-read-write
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [socketcan](https://github.com/mbr/socketcan-rs) from 3.5.0 to 3.6.1.
- [Release notes](https://github.com/mbr/socketcan-rs/releases)
- [Changelog](https://github.com/socketcan-rs/socketcan-rs/blob/master/CHANGELOG.md)
- [Commits](socketcan-rs/socketcan-rs@v3.5.0...v3.6.1)

---
updated-dependencies:
- dependency-name: socketcan
  dependency-version: 3.6.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants