syndata desync mode

This commit is contained in:
bol-van
2024-03-19 13:50:20 +03:00
parent 148108785c
commit 684869e54f
7 changed files with 103 additions and 49 deletions

View File

@@ -560,6 +560,12 @@ bool ip_frag(
return false;
}
void rewrite_ttl(struct ip *ip, struct ip6_hdr *ip6, uint8_t ttl)
{
if (ip) ip->ip_ttl = ttl;
if (ip6) ip6->ip6_ctlun.ip6_un1.ip6_un1_hlim = ttl;
}
void extract_ports(const struct tcphdr *tcphdr, const struct udphdr *udphdr, uint8_t *proto, uint16_t *sport, uint16_t *dport)
{