src changed to dst
This commit is contained in:
parent
893eef5871
commit
53b0be35a7
@ -831,14 +831,18 @@ async fn handle_tun_packet(
|
|||||||
|
|
||||||
let v =
|
let v =
|
||||||
encode_to_udp_message(Some(data), PacketType::Data as u8).unwrap();
|
encode_to_udp_message(Some(data), PacketType::Data as u8).unwrap();
|
||||||
println!("xxxx send arp reply");
|
println!(
|
||||||
send_packet_to_net(edge, arp.shwaddr, &v, 0).await;
|
"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);
|
// send_to_sock(edge, &v, from_sock);
|
||||||
// edge.sock.send(v).await;
|
// edge.sock.send(v).await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ARP_REPLY => {
|
ARP_REPLY => {
|
||||||
println!("got arp reply");
|
println!("got arp reply",);
|
||||||
|
|
||||||
println!("mac {:?} is at {:?}", arp.shwaddr, from_ip.to_be_bytes());
|
println!("mac {:?} is at {:?}", arp.shwaddr, from_ip.to_be_bytes());
|
||||||
if dest_ip == self_ip {
|
if dest_ip == self_ip {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user