Skip to content

Commit 7e6685c

Browse files
committed
Use netlink-packet-core 0.7.0
Signed-off-by: Gris Ge <[email protected]>
1 parent 996fa0b commit 7e6685c

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bytes = "1.0"
1616
log = "0.4.8"
1717
futures = "0.3"
1818
tokio = { version = "1.0", default-features = false, features = ["io-util","time"] }
19-
netlink-packet-core = "0.5.0"
19+
netlink-packet-core = "0.7.0"
2020
netlink-sys = { default-features = false, version = "0.8.4" }
2121
thiserror = "1.0.30"
2222

src/connection.rs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,11 @@ where
244244
// dropping the last instance of that sender,
245245
// hence closing the channel and signaling the
246246
// handle that no more messages are expected.
247-
Noop | Done | Ack(_) => {
248-
trace!("not forwarding Noop/Ack/Done message to the handle");
247+
Noop | Done(_) => {
248+
trace!(
249+
"not forwarding Noop/Ack/Done message to \
250+
the handle"
251+
);
249252
continue;
250253
}
251254
// I'm not sure how we should handle overrun messages
@@ -254,7 +257,16 @@ where
254257
// that are part of the netlink subprotocol,
255258
// because only the user knows how they want to
256259
// handle them.
257-
Error(_) | InnerMessage(_) => {}
260+
Error(err_msg) => {
261+
if err_msg.code.is_none() {
262+
trace!(
263+
"not forwarding Noop/Ack/Done message to \
264+
the handle"
265+
);
266+
continue;
267+
}
268+
}
269+
InnerMessage(_) => {}
258270
_ => {}
259271
}
260272
}

0 commit comments

Comments
 (0)