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