mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-30 05:50:53 +03:00
rewrite fix for ip6hdr dereference
This commit is contained in:
parent
8a603f0b25
commit
9698c6b782
11
nfq/desync.c
11
nfq/desync.c
@ -1237,13 +1237,10 @@ static uint8_t dpi_desync_udp_packet_play(bool replay, size_t reasm_offset, uint
|
|||||||
|
|
||||||
uint32_t desync_fwmark = fwmark | params.desync_fwmark;
|
uint32_t desync_fwmark = fwmark | params.desync_fwmark;
|
||||||
|
|
||||||
if (ip6hdr) {
|
ttl_orig = ip ? ip->ip_ttl : (ip6hdr ? ip6hdr->ip6_ctlun.ip6_un1.ip6_un1_hlim : 0);
|
||||||
ttl_orig = ip ? ip->ip_ttl : ip6hdr->ip6_ctlun.ip6_un1.ip6_un1_hlim;
|
if (ip6hdr) ttl_fake = params.desync_ttl6 ? params.desync_ttl6 : ttl_orig;
|
||||||
ttl_fake = params.desync_ttl6 ? params.desync_ttl6 : ttl_orig;
|
else ttl_fake = params.desync_ttl ? params.desync_ttl : ttl_orig;
|
||||||
} else {
|
|
||||||
ttl_orig = ip ? ip->ip_ttl : 0;
|
|
||||||
ttl_fake = params.desync_ttl ? params.desync_ttl : ttl_orig;
|
|
||||||
}
|
|
||||||
extract_endpoints(ip, ip6hdr, NULL, udphdr, &src, &dst);
|
extract_endpoints(ip, ip6hdr, NULL, udphdr, &src, &dst);
|
||||||
|
|
||||||
if (len_payload)
|
if (len_payload)
|
||||||
|
Loading…
Reference in New Issue
Block a user