src changed to dst

This commit is contained in:
asxalex 2024-10-22 16:09:31 +08:00
parent 893eef5871
commit 53b0be35a7

View File

@ -831,14 +831,18 @@ async fn handle_tun_packet(
let v =
encode_to_udp_message(Some(data), PacketType::Data as u8).unwrap();
println!("xxxx send arp reply");
send_packet_to_net(edge, arp.shwaddr, &v, 0).await;
println!(
"xxxx send arp reply to [{}], selfmac=[{}]",
mac_to_string(&arp.dhwaddr),
mac_to_string(&self_mac)
);
send_packet_to_net(edge, arp.dhwaddr, &v, 0).await;
// send_to_sock(edge, &v, from_sock);
// edge.sock.send(v).await;
}
}
ARP_REPLY => {
println!("got arp reply");
println!("got arp reply",);
println!("mac {:?} is at {:?}", arp.shwaddr, from_ip.to_be_bytes());
if dest_ip == self_ip {