mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-26 20:20:53 +03:00
blockcheck: simplify
This commit is contained in:
parent
d746805aec
commit
0cf17165d7
@ -122,11 +122,9 @@ ipt6_has_raw()
|
||||
ipt_has_nfq()
|
||||
{
|
||||
# cannot just check /proc/net/ip_tables_targets because of iptables-nft or modules not loaded yet
|
||||
local ret ipt
|
||||
local ipt
|
||||
for ipt in iptables ip6tables; do
|
||||
$ipt -A OUTPUT -t mangle -p 255 -j NFQUEUE --queue-num $QNUM --queue-bypass 2>/dev/null
|
||||
ret=$?
|
||||
[ $ret = 0 ] || return 1
|
||||
$ipt -A OUTPUT -t mangle -p 255 -j NFQUEUE --queue-num $QNUM --queue-bypass 2>/dev/null || return 1
|
||||
$ipt -D OUTPUT -t mangle -p 255 -j NFQUEUE --queue-num $QNUM --queue-bypass 2>/dev/null
|
||||
done
|
||||
return 0
|
||||
|
Loading…
Reference in New Issue
Block a user