Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ smol_socket = ["netlink-proto/smol_socket", "async-std"]

[dependencies]
async-std = { version = "1.13.0", optional = true}
futures = "0.3.31"
futures-util = "0.3.11"
futures-channel = "0.3.11"
Comment on lines +24 to +25

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The versions specified for futures-util and futures-channel (0.3.11) are outdated. Using old versions of dependencies can introduce security vulnerabilities and bugs that have been fixed in newer releases. Please update to a more recent version, for example, 0.3.30.

Suggested change
futures-util = "0.3.11"
futures-channel = "0.3.11"
futures-util = "0.3.30"
futures-channel = "0.3.30"

log = "0.4.26"
genetlink = { default-features = false, version = "0.2.6"}
netlink-packet-core = { version = "0.8.0"}
Expand Down
2 changes: 1 addition & 1 deletion examples/dump_channels.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::stream::TryStreamExt;
use futures_util::stream::TryStreamExt;

// Once we find a way to load netsimdev kernel module in CI, we can convert this
// to a test
Expand Down
2 changes: 1 addition & 1 deletion examples/dump_coalesce.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::stream::TryStreamExt;
use futures_util::stream::TryStreamExt;

// Once we find a way to load netsimdev kernel module in CI, we can convert this
// to a test
Expand Down
2 changes: 1 addition & 1 deletion examples/dump_eeprom_page.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::stream::TryStreamExt;
use futures_util::stream::TryStreamExt;

fn main() {
let rt = tokio::runtime::Builder::new_current_thread()
Expand Down
2 changes: 1 addition & 1 deletion examples/dump_features.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::stream::TryStreamExt;
use futures_util::stream::TryStreamExt;

// Once we find a way to load netsimdev kernel module in CI, we can convert this
// to a test
Expand Down
2 changes: 1 addition & 1 deletion examples/dump_fec.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::stream::TryStreamExt;
use futures_util::stream::TryStreamExt;

// Once we find a way to load netsimdev kernel module in CI, we can convert this
// to a test
Expand Down
2 changes: 1 addition & 1 deletion examples/dump_link_mode.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::stream::TryStreamExt;
use futures_util::stream::TryStreamExt;

// Once we find a way to load netsimdev kernel module in CI, we can convert this
// to a test
Expand Down
2 changes: 1 addition & 1 deletion examples/dump_pause.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::stream::TryStreamExt;
use futures_util::stream::TryStreamExt;

// Once we find a way to load netsimdev kernel module in CI, we can convert this
// to a test
Expand Down
2 changes: 1 addition & 1 deletion examples/dump_rings.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::stream::TryStreamExt;
use futures_util::stream::TryStreamExt;

// Once we find a way to load netsimdev kernel module in CI, we can convert this
// to a test
Expand Down
2 changes: 1 addition & 1 deletion examples/dump_tsinfo.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::stream::TryStreamExt;
use futures_util::stream::TryStreamExt;

// Once we find a way to load netsimdev kernel module in CI, we can convert this
// to a test
Expand Down
2 changes: 1 addition & 1 deletion src/channel/get.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::TryStream;
use futures_util::TryStream;
use netlink_packet_generic::GenlMessage;

use crate::{ethtool_execute, EthtoolError, EthtoolHandle, EthtoolMessage};
Expand Down
2 changes: 1 addition & 1 deletion src/channel/set.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::StreamExt;
use futures_util::StreamExt;
use netlink_packet_core::{NetlinkMessage, NLM_F_ACK, NLM_F_REQUEST};
use netlink_packet_generic::GenlMessage;

Expand Down
2 changes: 1 addition & 1 deletion src/coalesce/get.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::TryStream;
use futures_util::TryStream;
use netlink_packet_generic::GenlMessage;

use crate::{ethtool_execute, EthtoolError, EthtoolHandle, EthtoolMessage};
Expand Down
2 changes: 1 addition & 1 deletion src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use std::io;

use futures::channel::mpsc::UnboundedReceiver;
use futures_channel::mpsc::UnboundedReceiver;
use genetlink::message::RawGenlMessage;
use netlink_packet_core::NetlinkMessage;
use netlink_proto::Connection;
Expand Down
2 changes: 1 addition & 1 deletion src/eeprom/get.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::TryStream;
use futures_util::TryStream;
use netlink_packet_generic::GenlMessage;

use crate::{ethtool_execute, EthtoolError, EthtoolHandle, EthtoolMessage};
Expand Down
2 changes: 1 addition & 1 deletion src/feature/get.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::TryStream;
use futures_util::TryStream;
use netlink_packet_generic::GenlMessage;

use crate::{ethtool_execute, EthtoolError, EthtoolHandle, EthtoolMessage};
Expand Down
2 changes: 1 addition & 1 deletion src/fec/get.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::TryStream;
use futures_util::TryStream;
use netlink_packet_generic::GenlMessage;

use crate::{ethtool_execute, EthtoolError, EthtoolHandle, EthtoolMessage};
Expand Down
9 changes: 5 additions & 4 deletions src/handle.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::{future::Either, FutureExt, Stream, StreamExt, TryStream};
use futures_util::{future::Either, FutureExt, Stream, StreamExt, TryStream};
use genetlink::GenetlinkHandle;
use netlink_packet_core::DecodeError;
use netlink_packet_core::{
Expand Down Expand Up @@ -106,9 +106,10 @@ pub(crate) async fn ethtool_execute(
Either::Left(response.map(move |msg| Ok(try_ethtool!(msg))))
}
Err(e) => Either::Right(
futures::future::err::<GenlMessage<EthtoolMessage>, EthtoolError>(
e,
)
futures_util::future::err::<
GenlMessage<EthtoolMessage>,
EthtoolError,
>(e)
.into_stream(),
),
}
Expand Down
2 changes: 1 addition & 1 deletion src/link_mode/get.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::TryStream;
use futures_util::TryStream;
use netlink_packet_generic::GenlMessage;

use crate::{ethtool_execute, EthtoolError, EthtoolHandle, EthtoolMessage};
Expand Down
2 changes: 1 addition & 1 deletion src/pause/get.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::TryStream;
use futures_util::TryStream;
use netlink_packet_generic::GenlMessage;

use crate::{ethtool_execute, EthtoolError, EthtoolHandle, EthtoolMessage};
Expand Down
2 changes: 1 addition & 1 deletion src/ring/get.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::TryStream;
use futures_util::TryStream;
use netlink_packet_generic::GenlMessage;

use crate::{ethtool_execute, EthtoolError, EthtoolHandle, EthtoolMessage};
Expand Down
2 changes: 1 addition & 1 deletion src/tsinfo/get.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::TryStream;
use futures_util::TryStream;
use netlink_packet_generic::GenlMessage;

use crate::{ethtool_execute, EthtoolError, EthtoolHandle, EthtoolMessage};
Expand Down
2 changes: 1 addition & 1 deletion tests/dump_link_modes.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::stream::TryStreamExt;
use futures_util::stream::TryStreamExt;

#[test]
// CI container normally have a veth for external communication which support
Expand Down
2 changes: 1 addition & 1 deletion tests/get_features_lo.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

use futures::stream::TryStreamExt;
use futures_util::stream::TryStreamExt;

#[test]
fn test_get_features_of_loopback() {
Expand Down