Skip to content

ip link: add hsr type support#32

Merged
cathay4t merged 1 commit into
rust-netlink:mainfrom
cathay4t:main
Jun 4, 2026
Merged

ip link: add hsr type support#32
cathay4t merged 1 commit into
rust-netlink:mainfrom
cathay4t:main

Conversation

@cathay4t

@cathay4t cathay4t commented Jun 4, 2026

Copy link
Copy Markdown
Member

Introduced ip link add type hsr command and ip link show hsr
display.

Supported arguments: slave1 (required), slave2 (required), interlink,
supervision, version, proto.

Integration test case included to verify creation and detailed show
output match iproute2.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for High-availability Seamless Redundancy (HSR) network interfaces, including configuration, display, and integration tests. It also generalizes the link resolution logic from VxLAN-specific to a generic link resolver. The review feedback suggests several code quality improvements: optimizing string allocation in resolve_link using unwrap_or_else, removing redundant local variables in CliLinkInfoDataHsr::from, and updating a code comment to reflect the generalized link resolution.

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.

Comment thread src/ip/link/ifaces/hsr.rs
Comment thread src/ip/link/ifaces/hsr.rs
Comment thread src/ip/link/ifaces/hsr.rs
Comment thread src/ip/link/show.rs Outdated
Introduced `ip link add type hsr` command and `ip link show hsr`
display.

Supported arguments: slave1 (required), slave2 (required), interlink,
supervision, version, proto.

Integration test case included to verify creation and detailed show
output match iproute2.

Signed-off-by: Gris Ge <cnfourt@gmail.com>
@cathay4t cathay4t enabled auto-merge (rebase) June 4, 2026 11:57
@cathay4t cathay4t merged commit 16b4e01 into rust-netlink:main Jun 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant