fix(fake-tcp) use 64 as TTL value, fixes #11

This commit is contained in:
Datong Sun 2021-10-09 08:53:40 -07:00
parent ef96a5161d
commit 427fb7c19a

View File

@ -32,7 +32,7 @@ pub fn build_tcp_packet(
v4.set_version(4); v4.set_version(4);
v4.set_header_length(IPV4_HEADER_LEN as u8 / 4); v4.set_header_length(IPV4_HEADER_LEN as u8 / 4);
v4.set_next_level_protocol(ip::IpNextHeaderProtocols::Tcp); v4.set_next_level_protocol(ip::IpNextHeaderProtocols::Tcp);
v4.set_ttl(32); v4.set_ttl(64);
v4.set_source(*local_addr.ip()); v4.set_source(*local_addr.ip());
v4.set_destination(*remote_addr.ip()); v4.set_destination(*remote_addr.ip());
v4.set_total_length(total_len.try_into().unwrap()); v4.set_total_length(total_len.try_into().unwrap());