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