luci-app-flowoffload: fix filter-aaaa setting
This commit is contained in:
parent
22452590e9
commit
2dedd96cf4
@ -3,6 +3,7 @@ config flow
|
||||
option flow_offloading '0'
|
||||
option flow_offloading_hw '0'
|
||||
option bbr '0'
|
||||
option filter_aaaa '1'
|
||||
option dns '0'
|
||||
option dnscache_enable '1'
|
||||
option dns_server '114.114.114.114,114.114.115.115,223.5.5.5,223.6.6.6,180.76.76.76,119.29.29.29,119.28.28.28,1.2.4.8,210.2.4.8'
|
||||
|
||||
@ -219,13 +219,6 @@ start_service(){
|
||||
dns=$(uci get flowoffload.@flow[0].dns 2>/dev/null)
|
||||
dnscache_enable=$(uci get flowoffload.@flow[0].dnscache_enable 2>/dev/null)
|
||||
bbr=$(uci get flowoffload.@flow[0].bbr 2>/dev/null)
|
||||
aaaa=$(uci get flowoffload.@flow[0].filter_aaaa 2>/dev/null)
|
||||
if [ $aaaa -eq 1 ]; then
|
||||
sed -i '/filter-aaaa/d' /etc/dnsmasq.conf
|
||||
echo "filter-aaaa" >> /etc/dnsmasq.conf
|
||||
else
|
||||
sed -i '/filter-aaaa/d' /etc/dnsmasq.conf
|
||||
fi
|
||||
|
||||
if [ $dns -eq 1 ]; then
|
||||
stop_dnscache
|
||||
@ -256,6 +249,10 @@ start_service(){
|
||||
uci set firewall.@defaults[0].flow_offloading=$(uci get flowoffload.@flow[0].flow_offloading)
|
||||
uci set firewall.@defaults[0].flow_offloading_hw=$(uci get flowoffload.@flow[0].flow_offloading_hw)
|
||||
uci commit firewall
|
||||
|
||||
uci set dhcp.@dnsmasq[0].filter_aaaa=$(uci get flowoffload.@flow[0].filter_aaaa)
|
||||
uci commit dhcp
|
||||
|
||||
if [ "$DNSMASQ_RESTART" = N ]; then
|
||||
/etc/init.d/dnsmasq restart && echo "DNSMASQ change"
|
||||
/etc/init.d/firewall restart
|
||||
|
||||
Loading…
Reference in New Issue
Block a user