Skip to content

Commit

Permalink
Update dependencies, most notably to netlink-packet-route 0.21
Browse files Browse the repository at this point in the history
Minor API break: LinkMessageBuilder::arp_validate now requires an
argument of type BondArpValidate instead of u32 as before.
  • Loading branch information
mwanner committed Dec 19, 2024
1 parent 5fca904 commit ab76f6c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
22 changes: 11 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ tokio_socket = ["netlink-proto/tokio_socket", "tokio"]
smol_socket = ["netlink-proto/smol_socket", "async-global-executor"]

[dependencies]
futures = "0.3.11"
log = "0.4.8"
thiserror = "1"
futures = "0.3.31"
log = "0.4.22"
thiserror = "2"
netlink-sys = { version = "0.8" }
netlink-packet-utils = { version = "0.5" }
netlink-packet-route = { version = "0.20" }
netlink-packet-route = { version = "0.21" }
netlink-packet-core = { version = "0.7" }
netlink-proto = { default-features = false, version = "0.11" }
nix = { version = "0.27.1", default-features = false, features = ["fs", "mount", "sched", "signal"] }
tokio = { version = "1.0.1", features = ["rt"], optional = true}
async-global-executor = { version = "2.0.2", optional = true }
nix = { version = "0.29.0", default-features = false, features = ["fs", "mount", "sched", "signal"] }
tokio = { version = "1.42.0", features = ["rt"], optional = true}
async-global-executor = { version = "2.4.1", optional = true }

[dev-dependencies]
env_logger = "0.10.0"
ipnetwork = "0.18.0"
tokio = { version = "1.0.1", features = ["macros", "rt", "rt-multi-thread"] }
async-std = { version = "1.9.0", features = ["attributes"]}
env_logger = "0.11.5"
ipnetwork = "0.20.0"
tokio = { version = "1.42.0", features = ["macros", "rt", "rt-multi-thread"] }
async-std = { version = "1.13.0", features = ["attributes"]}
macaddr = "1.0"
4 changes: 2 additions & 2 deletions src/link/bond.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::net::{Ipv4Addr, Ipv6Addr};

use crate::{
link::LinkMessageBuilder,
packet_route::link::{BondMode, InfoBond, InfoData, InfoKind},
packet_route::link::{BondArpValidate, BondMode, InfoBond, InfoData, InfoKind},
};

///
Expand Down Expand Up @@ -116,7 +116,7 @@ impl LinkMessageBuilder<LinkBond> {
/// Adds the `arp_validate` attribute to the bond
/// This is equivalent to `ip link add name NAME type bond arp_validate
/// ARP_VALIDATE`.
pub fn arp_validate(self, arp_validate: u32) -> Self {
pub fn arp_validate(self, arp_validate: BondArpValidate) -> Self {
self.append_info_data(InfoBond::ArpValidate(arp_validate))
}

Expand Down
8 changes: 4 additions & 4 deletions src/link/vxlan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl LinkMessageBuilder<LinkVxlan> {
/// This function takes an IPv4 address
/// WARNING: only one between `remote` and `group` can be present.
pub fn group(self, addr: std::net::Ipv4Addr) -> Self {
self.append_info_data(InfoVxlan::Group(addr.octets().to_vec()))
self.append_info_data(InfoVxlan::Group(addr))
}

/// Adds the `group` attribute to the VXLAN
Expand All @@ -96,7 +96,7 @@ impl LinkMessageBuilder<LinkVxlan> {
/// This function takes an IPv6 address
/// WARNING: only one between `remote` and `group` can be present.
pub fn group6(self, addr: std::net::Ipv6Addr) -> Self {
self.append_info_data(InfoVxlan::Group6(addr.octets().to_vec()))
self.append_info_data(InfoVxlan::Group6(addr))
}

/// Adds the `remote` attribute to the VXLAN
Expand Down Expand Up @@ -128,15 +128,15 @@ impl LinkMessageBuilder<LinkVxlan> {
/// IPADDR`, local IPADDR - specifies the source IP address to use in
/// outgoing packets. This function takes an IPv4 address.
pub fn local(self, addr: std::net::Ipv4Addr) -> Self {
self.append_info_data(InfoVxlan::Local(addr.octets().to_vec()))
self.append_info_data(InfoVxlan::Local(addr))
}

/// Adds the `local` attribute to the VXLAN
/// This is equivalent to `ip link add name NAME type vxlan id VNI local
/// IPADDR`, local IPADDR - specifies the source IP address to use in
/// outgoing packets. This function takes an IPv6 address.
pub fn local6(self, addr: std::net::Ipv6Addr) -> Self {
self.append_info_data(InfoVxlan::Local6(addr.octets().to_vec()))
self.append_info_data(InfoVxlan::Local6(addr))
}

/// Adds the `tos` attribute to the VXLAN
Expand Down

0 comments on commit ab76f6c

Please sign in to comment.