mirror of
https://github.com/ValdikSS/GoodbyeDPI.git
synced 2024-11-22 10:05:44 +01:00
Add safekeeping TTL value for Auto TTL
This commit is contained in:
parent
a5c2f9fac9
commit
e1e09f9103
@ -222,11 +222,17 @@ int tcp_get_auto_ttl(const uint8_t ttl, const uint8_t decrease_for) {
|
||||
uint8_t ttl_of_fake_packet = 0;
|
||||
|
||||
if (ttl > 64 && ttl < 128) {
|
||||
/* Safekeeping */
|
||||
if (128 - ttl > decrease_for + 1) {
|
||||
ttl_of_fake_packet = 128 - ttl - decrease_for;
|
||||
}
|
||||
}
|
||||
else if (ttl > 34 && ttl < 64) {
|
||||
/* Safekeeping */
|
||||
if (64 - ttl > decrease_for + 1) {
|
||||
ttl_of_fake_packet = 64 - ttl - decrease_for;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ttl_of_fake_packet = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user