Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/link/vxlan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,14 @@ impl LinkMessageBuilder<LinkVxlan> {
self.append_info_data(InfoVxlan::CollectMetadata(collect_metadata))
}

// Adds the `localbypass` attribute to the VXLAN
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The documentation comment for localbypass starts with // instead of ///. In Rust, /// is the standard prefix for doc comments that are parsed by rustdoc. Using // will prevent this line from appearing in the generated documentation.

Suggested change
// Adds the `localbypass` attribute to the VXLAN
/// Adds the localbypass attribute to the VXLAN
References
  1. In Rust, /// is the standard prefix for doc comments that are parsed by rustdoc. (link)

/// This is equivalent to `ip link add name NAME type vxlan id VNI
/// [no]localbypass`. \[no\]localbypass - specifies if the VXLAN
/// localbypass mode is turned on.
pub fn localbypass(self, localbypass: bool) -> Self {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Consider adding a unit test in src/link/test.rs to verify that the localbypass attribute is correctly serialized into the netlink message. While there are currently no VXLAN-specific tests in that file, adding one for this new feature would improve code quality and help prevent regressions.

self.append_info_data(InfoVxlan::Localbypass(localbypass))
}

// Adds the `udp_csum` attribute to the VXLAN
/// This is equivalent to `ip link add name NAME type vxlan id VNI
/// [no]udp_csum`. \[no\]udpcsum - specifies if UDP checksum is
Expand Down
Loading