mirror of
https://github.com/bol-van/zapret2.git
synced 2026-10-29 14:09:23 +00:00
zapret-auto: reset parameter to standard_detector
This commit is contained in:
1 parent
347c35e588
commit
a6e11540ff
2 files changed
+37
No files matched your search
@@ -762,6 +762,33 @@ function fix_ip6_next(ip6, last_proto)
|
||||
end
|
||||
end
|
||||
|
||||
-- reverses ip addresses, ports and seq/ack
|
||||
function dis_reverse(dis)
|
||||
local temp
|
||||
if dis.ip then
|
||||
temp = dis.ip.ip_src
|
||||
dis.ip.ip_src = dis.ip.ip_dst
|
||||
dis.ip.ip_dst = temp
|
||||
end
|
||||
if dis.ip6 then
|
||||
temp = dis.ip6.ip6_src
|
||||
dis.ip6.ip6_src = dis.ip6.ip6_dst
|
||||
dis.ip6.ip6_dst = temp
|
||||
end
|
||||
if dis.tcp then
|
||||
temp = dis.tcp.th_sport
|
||||
dis.tcp.th_sport = dis.tcp.th_dport
|
||||
dis.tcp.th_dport = temp
|
||||
temp = dis.tcp.th_ack
|
||||
dis.tcp.th_ack = dis.tcp.th_seq
|
||||
dis.tcp.th_seq = temp
|
||||
end
|
||||
if dis.udp then
|
||||
temp = dis.udp.uh_sport
|
||||
dis.udp.uh_sport = dis.udp.uh_dport
|
||||
dis.udp.uh_dport = temp
|
||||
end
|
||||
end
|
||||
|
||||
-- parse autottl : delta,min-max
|
||||
function parse_autottl(s)
|
||||
|
||||
Reference in new issue
Block a user