Skip to content

Commit ab76f6c

Browse files
committed
Update dependencies, most notably to netlink-packet-route 0.21
Minor API break: LinkMessageBuilder::arp_validate now requires an argument of type BondArpValidate instead of u32 as before.
1 parent 5fca904 commit ab76f6c

3 files changed

Lines changed: 17 additions & 17 deletions

File tree

Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ tokio_socket = ["netlink-proto/tokio_socket", "tokio"]
1818
smol_socket = ["netlink-proto/smol_socket", "async-global-executor"]
1919

2020
[dependencies]
21-
futures = "0.3.11"
22-
log = "0.4.8"
23-
thiserror = "1"
21+
futures = "0.3.31"
22+
log = "0.4.22"
23+
thiserror = "2"
2424
netlink-sys = { version = "0.8" }
2525
netlink-packet-utils = { version = "0.5" }
26-
netlink-packet-route = { version = "0.20" }
26+
netlink-packet-route = { version = "0.21" }
2727
netlink-packet-core = { version = "0.7" }
2828
netlink-proto = { default-features = false, version = "0.11" }
29-
nix = { version = "0.27.1", default-features = false, features = ["fs", "mount", "sched", "signal"] }
30-
tokio = { version = "1.0.1", features = ["rt"], optional = true}
31-
async-global-executor = { version = "2.0.2", optional = true }
29+
nix = { version = "0.29.0", default-features = false, features = ["fs", "mount", "sched", "signal"] }
30+
tokio = { version = "1.42.0", features = ["rt"], optional = true}
31+
async-global-executor = { version = "2.4.1", optional = true }
3232

3333
[dev-dependencies]
34-
env_logger = "0.10.0"
35-
ipnetwork = "0.18.0"
36-
tokio = { version = "1.0.1", features = ["macros", "rt", "rt-multi-thread"] }
37-
async-std = { version = "1.9.0", features = ["attributes"]}
34+
env_logger = "0.11.5"
35+
ipnetwork = "0.20.0"
36+
tokio = { version = "1.42.0", features = ["macros", "rt", "rt-multi-thread"] }
37+
async-std = { version = "1.13.0", features = ["attributes"]}
3838
macaddr = "1.0"

src/link/bond.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::net::{Ipv4Addr, Ipv6Addr};
44

55
use crate::{
66
link::LinkMessageBuilder,
7-
packet_route::link::{BondMode, InfoBond, InfoData, InfoKind},
7+
packet_route::link::{BondArpValidate, BondMode, InfoBond, InfoData, InfoKind},
88
};
99

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

src/link/vxlan.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl LinkMessageBuilder<LinkVxlan> {
8787
/// This function takes an IPv4 address
8888
/// WARNING: only one between `remote` and `group` can be present.
8989
pub fn group(self, addr: std::net::Ipv4Addr) -> Self {
90-
self.append_info_data(InfoVxlan::Group(addr.octets().to_vec()))
90+
self.append_info_data(InfoVxlan::Group(addr))
9191
}
9292

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

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

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

142142
/// Adds the `tos` attribute to the VXLAN

0 commit comments

Comments
 (0)