Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ futures-channel = "0.3.11"
log = "0.4.8"
thiserror = "1"
netlink-sys = { version = "0.8" }
netlink-packet-route = { version = "0.28" }
netlink-packet-route = { version = "0.29" }
netlink-packet-core = { version = "0.8" }
netlink-proto = { default-features = false, version = "0.12.0" }
nix = { version = "0.30.0", default-features = false, features = ["fs", "mount", "sched", "signal"] }
Expand Down
8 changes: 4 additions & 4 deletions src/link/bond.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use std::net::{Ipv4Addr, Ipv6Addr};
use crate::{
link::LinkMessageBuilder,
packet_route::link::{
BondAllPortActive, BondArpAllTargets, BondArpValidate, BondFailOverMac,
BondLacpRate, BondMode, BondPrimaryReselect, BondXmitHashPolicy,
InfoBond, InfoData, InfoKind,
BondAdSelect, BondAllPortActive, BondArpAllTargets, BondArpValidate,
BondFailOverMac, BondLacpRate, BondMode, BondPrimaryReselect,
BondXmitHashPolicy, InfoBond, InfoData, InfoKind,
},
};

Expand Down Expand Up @@ -218,7 +218,7 @@ impl LinkMessageBuilder<LinkBond> {
/// Adds the `ad_select` attribute to the bond
/// This is equivalent to `ip link add name NAME type bond ad_select
/// AD_SELECT`.
pub fn ad_select(self, ad_select: u8) -> Self {
pub fn ad_select(self, ad_select: BondAdSelect) -> Self {

Choose a reason for hiding this comment

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

high

Changing the parameter ad_select from type u8 to BondAdSelect is a breaking API change. While this change is good because it improves type safety, it will break existing code that uses this function. To adhere to semantic versioning, a breaking change in a 0.x.y version requires a minor version bump (e.g., from 0.20.0 to 0.21.0). Please update the crate version in Cargo.toml as part of this PR.

self.append_info_data(InfoBond::AdSelect(ad_select))
}

Expand Down
2 changes: 1 addition & 1 deletion src/link/bridge_port.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl LinkMessageBuilder<LinkBridgePort> {
/// `ip link set name NAME type bridge_slave \
/// neigh_vlan_suppress { on | off }`.
pub fn neigh_vlan_suppress(self, v: bool) -> Self {
self.append_info_data(InfoBridgePort::NeighVlanSupress(v))
self.append_info_data(InfoBridgePort::NeighVlanSuppress(v))
}

/// This is equivalent to
Expand Down