1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Update wizard for WAN IPv6 support

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-01-20 16:39:16 +01:00
parent 00f8830d44
commit d29d25b95a
4 changed files with 47 additions and 9 deletions

View file

@ -223,8 +223,10 @@ function wizard_add()
local device_qmi = luci.http.formvalue("cbid.network.%s.device.qmi" % intf) or ""
local device_modemmanager = luci.http.formvalue("cbid.network.%s.device.modemmanager" % intf) or ""
local ipaddr = luci.http.formvalue("cbid.network.%s.ipaddr" % intf) or ""
local ip6addr = luci.http.formvalue("cbid.network.%s.ip6addr" % intf) or ""
local netmask = luci.http.formvalue("cbid.network.%s.netmask" % intf) or ""
local gateway = luci.http.formvalue("cbid.network.%s.gateway" % intf) or ""
local ip6gw = luci.http.formvalue("cbid.network.%s.ip6gw" % intf) or ""
local apn = luci.http.formvalue("cbid.network.%s.apn" % intf) or ""
local pincode = luci.http.formvalue("cbid.network.%s.pincode" % intf) or ""
local delay = luci.http.formvalue("cbid.network.%s.delay" % intf) or ""
@ -281,6 +283,13 @@ function wizard_add()
ucic:set("network",intf,"netmask","")
ucic:set("network",intf,"gateway","")
end
if ip6addr ~= "" then
ucic:set("network",intf,"ip6addr",ip6addr)
ucic:set("network",intf,"ip6gw",ip6gw)
else
ucic:set("network",intf,"ip6addr","")
ucic:set("network",intf,"ip6gw","")
end
ucic:delete("openmptcprouter",intf,"lc")
ucic:save("openmptcprouter")