Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-13 22:03:09 +00:00

init.d: nft_detele_chain => nft_del_chain

This commit is contained in:
bol-van
2026-01-08 19:14:47 +03:00
parent 36731cd9b5
commit 577959f442
2 changed files with 5 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ nft_add_chain()
# $2 - params
nft add chain inet $ZAPRET_NFT_TABLE $1 "{ $2 }"
}
nft_delete_chain()
nft_del_chain()
{
# $1 - chain
nft delete chain inet $ZAPRET_NFT_TABLE $1

View File

@@ -37,16 +37,19 @@ zapret_custom_firewall_nft()
# router
nft_print_op "oifname @lanif $rule" "nfqws forward (qnum $QNUM)" "4+6"
nft_add_chain forward_dns_feed "type filter hook forward priority mangle;"
nft_flush_chain forward_dns_feed
nft_add_rule forward_dns_feed oifname @lanif $rule
# dns client
nft_print_op "$rule" "nfqws input (qnum $QNUM)" "4+6"
nft_add_chain input_dns_feed "type filter hook input priority mangle;"
nft_flush_chain input_dns_feed
nft_add_rule input_dns_feed $rule
# dns server
nft_print_op "$rule" "nfqws output (qnum $QNUM)" "4+6"
nft_add_chain output_dns_feed "type filter hook output priority mangle;"
nft_flush_chain output_dns_feed
nft_add_rule output_dns_feed $rule
}
@@ -54,6 +57,6 @@ zapret_custom_firewall_nft_flush()
{
local chain
for chain in forward_dns_feed input_dns_feed output_dns_feed; do
nft_delete_chain $chain 2>/dev/null
nft_del_chain $chain 2>/dev/null
done
}