Skip to content

Commit 510d8e5

Browse files
authored
Merge branch 'main' into connection-immutable
2 parents ced086b + 897d92d commit 510d8e5

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed

CHANGELOG

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
# Changelog
2+
## [0.11.2] - 2023-07-29
3+
### Breaking changes
4+
- N/A
5+
6+
### New features
7+
- N/A
8+
9+
### Bug fixes
10+
- Check for closed unsolicited messages channel. (2e14c59)
11+
- Use latest netlink-packet-core 0.7.0. (55fb44f)
12+
213
## [0.11.1] - 2023-01-28
314
### Breaking changes
415
- N/A

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
authors = ["Corentin Henry <[email protected]>"]
33
name = "netlink-proto"
4-
version = "0.11.1"
4+
version = "0.11.2"
55
edition = "2018"
66

77
homepage = "https://github.com/rust-netlink/netlink-proto"
@@ -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
@@ -250,8 +250,11 @@ where
250250
// dropping the last instance of that sender,
251251
// hence closing the channel and signaling the
252252
// handle that no more messages are expected.
253-
Noop | Done | Ack(_) => {
254-
trace!("not forwarding Noop/Ack/Done message to the handle");
253+
Noop | Done(_) => {
254+
trace!(
255+
"not forwarding Noop/Ack/Done message to \
256+
the handle"
257+
);
255258
continue;
256259
}
257260
// I'm not sure how we should handle overrun messages
@@ -260,7 +263,16 @@ where
260263
// that are part of the netlink subprotocol,
261264
// because only the user knows how they want to
262265
// handle them.
263-
Error(_) | InnerMessage(_) => {}
266+
Error(err_msg) => {
267+
if err_msg.code.is_none() {
268+
trace!(
269+
"not forwarding Noop/Ack/Done message to \
270+
the handle"
271+
);
272+
continue;
273+
}
274+
}
275+
InnerMessage(_) => {}
264276
_ => {}
265277
}
266278
}

0 commit comments

Comments
 (0)