@@ -72,7 +72,7 @@ async fn forward_packets<T: AsyncRead + AsyncWrite + Unpin>(
7272 msg. encode( & mut buf. as_mut_slice( ) ) ?;
7373 let len = msg. encoded_len( ) ;
7474
75- info!( "Sending IPC message: {len} {:?}" , & buf[ ..len] ) ;
75+ info!( "Sending IPC message to redirector : {len} {:?}" , & buf[ ..len] ) ;
7676
7777 channel. write_all( & buf[ ..len] ) . await . context( "failed to propagate interception config update" ) ?;
7878 } ,
@@ -93,8 +93,8 @@ async fn forward_packets<T: AsyncRead + AsyncWrite + Unpin>(
9393 warn!( "Receiving packet: {} {:?}" , len, & buf[ ..len] ) ;
9494
9595 let mut cursor = Cursor :: new( & buf[ ..len] ) ;
96- let Ok ( PacketWithMeta { data, tunnel_info: Some ( ipc :: TunnelInfo { pid , process_name } ) } ) = PacketWithMeta :: decode( & mut cursor) else {
97- return Err ( anyhow!( "Received invalid IPC message: {:?}" , & buf[ ..len] ) ) ;
96+ let Ok ( PacketWithMeta { data, tunnel_info} ) = PacketWithMeta :: decode( & mut cursor) else {
97+ return Err ( anyhow!( "Received invalid IPC message from redirector : {:?}" , & buf[ ..len] ) ) ;
9898 } ;
9999 assert_eq!( cursor. position( ) , len as u64 ) ;
100100
@@ -112,8 +112,8 @@ async fn forward_packets<T: AsyncRead + AsyncWrite + Unpin>(
112112 let event = NetworkEvent :: ReceivePacket {
113113 packet,
114114 tunnel_info: TunnelInfo :: LocalRedirector {
115- pid,
116- process_name,
115+ pid: tunnel_info . as_ref ( ) . and_then ( |t| t . pid ) ,
116+ process_name: tunnel_info . and_then ( |t| t . process_name ) ,
117117 remote_endpoint: None ,
118118 } ,
119119 } ;
0 commit comments