ip link: add type bridge creation support#31
Conversation
Introduced support for `ip link add <name> type bridge [options]` with all 36 bridge-specific options matching the iproute2 CLI. Also fixed display of MulticastQuerierState fields (querier IPv4/IPv6 addresses) to match iproute2 output. Integration test cases added for bridge creation with various options. Signed-off-by: Gris Ge <cnfourt@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request adds support for creating and configuring bridge devices. It introduces the apply_bridge method to parse bridge-specific options, extracts multicast querier IP addresses, moves common parsing helpers to a shared parse module, and adds comprehensive integration tests. The review feedback suggests making the apply_bridge function synchronous since it does not perform any asynchronous operations, removing the corresponding .await call in add.rs, and refactoring the if let pattern in bridge.rs to match the existing codebase style.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
apply_bridge contains no .await calls, so the async annotation is unnecessary. Make it a regular fn and drop the .await at the call site in add.rs. Also replace the `if let Some(ref addr) = self.field` pattern with the more idiomatic Rust 2024 `if let Some(addr) = &self.field` style already used elsewhere in the file. Signed-off-by: Gris Ge <cnfourt@gmail.com>
Introduced support for
ip link add <name> type bridge [options]withall 36 bridge-specific options matching the iproute2 CLI.
Also fixed display of MulticastQuerierState fields (querier IPv4/IPv6
addresses) to match iproute2 output.
Integration test cases added for bridge creation with various options.