Skip to content

Commit 23ff71e

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

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ log = "0.4.8"
2323
thiserror = "1"
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"] }
29+
nix = { version = "0.29.0", default-features = false, features = ["fs", "mount", "sched", "signal"] }
3030
tokio = { version = "1.0.1", features = ["rt"], optional = true}
3131
async-global-executor = { version = "2.0.2", optional = true }
3232

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

src/link/bond.rs

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

55
use crate::{
66
link::LinkMessageBuilder,
7-
packet_route::link::{BondMode, InfoBond, InfoData, InfoKind},
7+
packet_route::link::{
8+
BondArpValidate, BondMode, InfoBond, InfoData, InfoKind,
9+
},
810
};
911

1012
///
@@ -116,7 +118,7 @@ impl LinkMessageBuilder<LinkBond> {
116118
/// Adds the `arp_validate` attribute to the bond
117119
/// This is equivalent to `ip link add name NAME type bond arp_validate
118120
/// ARP_VALIDATE`.
119-
pub fn arp_validate(self, arp_validate: u32) -> Self {
121+
pub fn arp_validate(self, arp_validate: BondArpValidate) -> Self {
120122
self.append_info_data(InfoBond::ArpValidate(arp_validate))
121123
}
122124

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)