Skip to content

Use panic-free netlink crate chain - #197

Open
cathay4t wants to merge 1 commit into
rust-netlink:mainfrom
cathay4t:panic_free
Open

cathay4t wants to merge 1 commit into
rust-netlink:mainfrom
cathay4t:panic_free

Conversation

@cathay4t

@cathay4t cathay4t commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Summary

Wire the local panic-free branch of the netlink crate chain into rtnetlink for end-to-end validation.

  • Use the core branch under review as a git dependency.
  • Keep route and proto as local path dependencies until their PRs land.
  • Add tests/panic_free_chain.rs, which exercises the full chain
    netlink-packet-core -> netlink-packet-route -> netlink-proto -> rtnetlink:
    • valid route messages encode and decode through netlink-proto
    • an oversized route attribute returns EncodeErrorKind::TooLarge without
      panicking or dirtying the destination buffer

Depends on:

Test plan

  • cargo test --test panic_free_chain
  • cargo check --all-targets
  • cargo test --lib traffic_control::test::test_get_qdiscs

Point the local build at the panic-free core, route, and proto crates and add
an integration test covering route message encoding through netlink-proto,
including the oversized-attribute error path.

Signed-off-by: Gris Ge <cnfourt@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant