mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-13 02:51:50 +00:00
Force IPv6 disabled for LAN interface
This commit is contained in:
parent
a9b513f2b1
commit
952566517a
2 changed files with 8 additions and 3 deletions
|
@ -1169,10 +1169,13 @@ function set_ipv6_state(disable_ipv6)
|
|||
-- Disable/Enable route announce of IPv6
|
||||
if disable_ipv6 == "1" then
|
||||
ucic:set("dhcp","lan","ra_default","0")
|
||||
ucic:set("network","lan","ipv6","0")
|
||||
--else
|
||||
-- ucic:set("dhcp","lan","ra_default","1")
|
||||
end
|
||||
|
||||
ucic:set("network","lan","ipv6","0")
|
||||
|
||||
-- Disable/Enable IPv6 DHCP and change Shadowsocks listen address
|
||||
if disable_ipv6 == "1" then
|
||||
luci.sys.call("uci -q del dhcp.lan.dhcpv6")
|
||||
|
|
|
@ -31,12 +31,14 @@ set_ipv6_state() {
|
|||
uci -q commit firewall
|
||||
if [ "$disable_ipv6" == "1" ]; then
|
||||
uci -q set dhcp.lan.ra_default="0"
|
||||
uci -q set network.lan.ipv6="0"
|
||||
fi
|
||||
|
||||
if [ "$disable_ipv6" == "1" ]; then
|
||||
uci -q del dhcp.lan.dhcpv6
|
||||
uci -q del dhcp.lan.ra
|
||||
uci -q del dhcp.lan.ra_default
|
||||
uci -q delete network.lan.ipv6
|
||||
uci -q delete dhcp.lan.dhcpv6
|
||||
uci -q delete dhcp.lan.ra
|
||||
uci -q delete dhcp.lan.ra_default
|
||||
uci -q set shadowsocks-libev.hi.local_address="0.0.0.0"
|
||||
else
|
||||
uci -q set shadowsocks-libev.hi.local_address="::"
|
||||
|
|
Loading…
Reference in a new issue