Skip to content

Commit 18a2237

Browse files
update deps
1 parent 1f9f262 commit 18a2237

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

Cargo.lock

Lines changed: 24 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ socket2-ext = { version = "0.1" }
3030

3131
netstack-smoltcp = { git = "https://github.com/automesh-network/netstack-smoltcp.git", rev = "62260478079d96b42fa524caa855609312c2cf43" }
3232
netstack-lwip = { git = "https://github.com/Watfaq/netstack-lwip.git", rev = "2817bf82740e04bbee6b7bf1165f55657a6ed163" }
33-
netstack-system = { git = "https://github.com/Watfaq/netstack-system.git", rev = "d8ffc602137cd826c6bf426432f07a1725c6d33f" }
33+
netstack-system = { git = "https://github.com/Watfaq/netstack-system.git", rev = "73373ff" }
3434

3535
[[bin]]
3636
name = "netstack-smoltcp"

src/netstack-system.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ async fn main_exec(opt: Opt) {
8888
println!("created device: {:?}", device.address());
8989

9090
let framed = device.into_framed();
91-
let (tun_sink, mut tun_stream) = framed.split();
91+
let (mut tun_sink, mut tun_stream) = framed.split();
9292

9393
let mut futs = vec![];
9494

@@ -99,7 +99,12 @@ async fn main_exec(opt: Opt) {
9999
let listener = listener.unwrap();
100100
let udp_socket = udp_socket.unwrap();
101101

102-
futs.push(stack.process_loop(tun_sink));
102+
futs.push(tokio_spawn!(async move {
103+
let mut stream = Box::pin(stack.stream());
104+
while let Some(pkt) = stream.next().await {
105+
let _ = tun_sink.send(pkt).await;
106+
}
107+
}));
103108

104109
futs.push(tokio_spawn!(async move {
105110
while let Some(pkt) = tun_stream.next().await {

0 commit comments

Comments
 (0)