Skip to content

Commit 17243ac

Browse files
committedJul 25, 2024·
Improve debugging
1 parent 9ac6520 commit 17243ac

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎proton_wap/src/ap.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl AccessPoint {
9191
let layer_4_task = task::spawn(Self::run_layer_4(nat, range));
9292

9393
match tokio::join!(layer_4_task) {
94-
(Ok (_),) => Ok (()),
94+
(Ok (Ok (_)),) => Ok (()),
9595
_ => todo!(),
9696
}
9797
}
@@ -110,7 +110,7 @@ impl AccessPoint {
110110
mut nat: NatTable,
111111
range: Ipv4Cidr,
112112
) -> AccessPointResult<()> {
113-
// Create an IPv4 protocol
113+
// Create a network layer protocol with TCP packets
114114
let protocol = Layer3 (IpNextHeaderProtocols::Tcp);
115115

116116
// Create a new transport protocol
@@ -137,6 +137,8 @@ impl AccessPoint {
137137
packet,
138138
addr,
139139
)?;
140+
141+
println!(" Translated packet: {:#?}", translated_packet);
140142

141143
// Send the translated packet
142144
if tx.send_to(translated_packet, translated_addr).is_err() {

0 commit comments

Comments
 (0)
Please sign in to comment.