summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base/luasrc')
-rw-r--r--modules/luci-base/luasrc/cbi/datatypes.lua9
-rw-r--r--modules/luci-base/luasrc/model/network.lua7
-rw-r--r--modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua8
3 files changed, 17 insertions, 7 deletions
diff --git a/modules/luci-base/luasrc/cbi/datatypes.lua b/modules/luci-base/luasrc/cbi/datatypes.lua
index df23aaf135..a7e02f350a 100644
--- a/modules/luci-base/luasrc/cbi/datatypes.lua
+++ b/modules/luci-base/luasrc/cbi/datatypes.lua
@@ -169,8 +169,13 @@ function ipmask6(val)
end
function ip6hostid(val)
- if val and val:match("^[a-fA-F0-9:]+$") and (#val > 2) then
- return (ip6addr("2001:db8:0:0" .. val) or ip6addr("2001:db8:0:0:" .. val))
+ if val == "eui64" or val == "random" then
+ return true
+ else
+ local addr = ip.IPv6(val)
+ if addr and addr:prefix() == 128 and addr:lower("::1:0:0:0:0") then
+ return true
+ end
end
return false
diff --git a/modules/luci-base/luasrc/model/network.lua b/modules/luci-base/luasrc/model/network.lua
index 6f405a1314..9ea8e369da 100644
--- a/modules/luci-base/luasrc/model/network.lua
+++ b/modules/luci-base/luasrc/model/network.lua
@@ -998,7 +998,12 @@ function protocol.ip6addrs(self)
if type(addrs) == "table" then
for n, addr in ipairs(addrs) do
- rv[#rv+1] = "%s1/%d" %{ addr.address, addr.mask }
+ if type(addr["local-address"]) == "table" then
+ rv[#rv+1] = "%s/%d" %{
+ addr["local-address"].address,
+ addr["local-address"].mask
+ }
+ end
end
end
diff --git a/modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua b/modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua
index 48ae5747c0..6668dad839 100644
--- a/modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua
+++ b/modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua
@@ -51,7 +51,7 @@ TZ = {
{ 'Africa/Nouakchott', 'GMT0' },
{ 'Africa/Ouagadougou', 'GMT0' },
{ 'Africa/Porto-Novo', 'WAT-1' },
- { 'Africa/Sao Tome', 'GMT0' },
+ { 'Africa/Sao Tome', 'WAT-1' },
{ 'Africa/Tripoli', 'EET-2' },
{ 'Africa/Tunis', 'CET-1' },
{ 'Africa/Windhoek', 'CAT-2' },
@@ -85,7 +85,7 @@ TZ = {
{ 'America/Bogota', '<-05>5' },
{ 'America/Boise', 'MST7MDT,M3.2.0,M11.1.0' },
{ 'America/Cambridge Bay', 'MST7MDT,M3.2.0,M11.1.0' },
- { 'America/Campo Grande', '<-04>4<-03>,M10.3.0/0,M2.3.0/0' },
+ { 'America/Campo Grande', '<-04>4<-03>,M11.1.0/0,M2.3.0/0' },
{ 'America/Cancun', 'EST5' },
{ 'America/Caracas', '<-04>4' },
{ 'America/Cayenne', '<-03>3' },
@@ -94,7 +94,7 @@ TZ = {
{ 'America/Chihuahua', 'MST7MDT,M4.1.0,M10.5.0' },
{ 'America/Costa Rica', 'CST6' },
{ 'America/Creston', 'MST7' },
- { 'America/Cuiaba', '<-04>4<-03>,M10.3.0/0,M2.3.0/0' },
+ { 'America/Cuiaba', '<-04>4<-03>,M11.1.0/0,M2.3.0/0' },
{ 'America/Curacao', 'AST4' },
{ 'America/Danmarkshavn', 'GMT0' },
{ 'America/Dawson', 'PST8PDT,M3.2.0,M11.1.0' },
@@ -181,7 +181,7 @@ TZ = {
{ 'America/Santarem', '<-03>3' },
{ 'America/Santiago', '<-04>4<-03>,M8.2.6/24,M5.2.6/24' },
{ 'America/Santo Domingo', 'AST4' },
- { 'America/Sao Paulo', '<-03>3<-02>,M10.3.0/0,M2.3.0/0' },
+ { 'America/Sao Paulo', '<-03>3<-02>,M11.1.0/0,M2.3.0/0' },
{ 'America/Scoresbysund', '<-01>1<+00>,M3.5.0/0,M10.5.0/1' },
{ 'America/Sitka', 'AKST9AKDT,M3.2.0,M11.1.0' },
{ 'America/St Barthelemy', 'AST4' },