Browse Source

Update ttltrack.c

pull/319/head
SashaXser 2 years ago
committed by GitHub
parent
commit
4686e16d0e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/ttltrack.c

4
src/ttltrack.c

@ -241,7 +241,7 @@ int tcp_get_auto_ttl(const uint8_t ttl, const uint8_t autottl1,
ttl_of_fake_packet = nhops - autottl2; ttl_of_fake_packet = nhops - autottl2;
if (ttl_of_fake_packet < autottl2 && nhops <= 9) { if (ttl_of_fake_packet < autottl2 && nhops <= 9) {
ttl_of_fake_packet = nhops - autottl1 - trunc((autottl2 - autottl1) * ((float)nhops/10)); ttl_of_fake_packet = nhops - autottl1 - truncf((autottl2 - autottl1) * ((float)nhops/10));
} }
if (maxttl && ttl_of_fake_packet > maxttl) { if (maxttl && ttl_of_fake_packet > maxttl) {
@ -249,4 +249,4 @@ int tcp_get_auto_ttl(const uint8_t ttl, const uint8_t autottl1,
} }
return ttl_of_fake_packet; return ttl_of_fake_packet;
} }

Loading…
Cancel
Save