Skip to content

Commit ceb2aff

Browse files
committed
Use netlink-packet-route 0.31.0
Signed-off-by: Gris Ge <cnfourt@gmail.com>
1 parent e92b23f commit ceb2aff

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ futures-channel = "0.3.11"
2323
log = "0.4.8"
2424
thiserror = "2"
2525
netlink-sys = { version = "0.8" }
26-
netlink-packet-route = { version = "0.30" }
26+
netlink-packet-route = { version = "0.31.0" }
2727
netlink-packet-core = { version = "0.8" }
2828
netlink-proto = { default-features = false, version = "0.12.0" }
2929
nix = { version = "0.30.0", default-features = false, features = ["fs", "mount", "sched", "signal"] }

src/link/iptun.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@ impl LinkMessageBuilder<LinkIpIp> {
108108
/// This is equivalent to `external` in command
109109
/// `ip link add name NAME type ipip external`.
110110
pub fn collect_metadata(self, enabled: bool) -> Self {
111-
self.append_info_data(InfoIpTunnel::CollectMetadata(enabled))
111+
if enabled {
112+
self.append_info_data(InfoIpTunnel::CollectMetadata)
113+
} else {
114+
self
115+
}
112116
}
113117

114118
/// This is equivalent to `fwmark MARK` in command

0 commit comments

Comments
 (0)