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

Add IPv6 checkbox for interface in wizard and fix modemmanager support

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-02-15 15:35:04 +01:00
parent 3112e3c28d
commit 9152cfc85f
3 changed files with 28 additions and 11 deletions

View file

@ -240,6 +240,7 @@ function wizard_add()
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 ipv6 = luci.http.formvalue("cbid.network.%s.ipv6" % intf) or "0"
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 ""
@ -282,6 +283,7 @@ function wizard_add()
ucic:set("network",intf,"auth",auth)
ucic:set("network",intf,"mode",mode)
ucic:set("network",intf,"label",label)
ucic:set("network",intf,"ipv6",ipv6)
if lan == "1" then
ucic:set("network",intf,"multipath","off")
else
@ -1077,7 +1079,13 @@ end
function get_device(interface)
local dump = require("luci.util").ubus("network.interface.%s" % interface, "status", {})
if dump ~= nil then
return dump['l3_device']
if dump['l3_device'] ~= nil then
return dump['l3_device']
elseif dump['device'] ~= nil then
return dump['device']
else
return ""
end
else
return ""
end